CN111083168A - Configurable data transmission method and device of Internet of things platform gateway and gateway - Google Patents

Configurable data transmission method and device of Internet of things platform gateway and gateway Download PDF

Info

Publication number
CN111083168A
CN111083168A CN201911410801.4A CN201911410801A CN111083168A CN 111083168 A CN111083168 A CN 111083168A CN 201911410801 A CN201911410801 A CN 201911410801A CN 111083168 A CN111083168 A CN 111083168A
Authority
CN
China
Prior art keywords
data
message queue
database
service
rule data
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.)
Pending
Application number
CN201911410801.4A
Other languages
Chinese (zh)
Inventor
吴富林
周小伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong J Tech Intelligent Technology Co ltd
Original Assignee
Guangdong J Tech Intelligent 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 Guangdong J Tech Intelligent Technology Co ltd filed Critical Guangdong J Tech Intelligent Technology Co ltd
Priority to CN201911410801.4A priority Critical patent/CN111083168A/en
Publication of CN111083168A publication Critical patent/CN111083168A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a configurable data transmission method and device of an Internet of things platform gateway and the gateway. The method comprises the following steps: acquiring field data sent by hardware equipment; verifying the data integrity of the field data according to a preset database; if the data integrity of the field data meets the rules, the field data is used as rule data, whether a corresponding protocol analysis code which is configured in advance exists in a database is checked, and if the corresponding protocol analysis code exists, the rule data is analyzed based on the protocol analysis code; if not, checking whether a corresponding protocol exists in the database; if so, analyzing the rule data based on the protocol; issuing the analyzed rule data to a message queue; and operating the rule data in the message queue based on a preset subscription service. According to the arrangement, a flexible protocol analysis scheme is adopted, and the edge analysis capability is sunk to the gateway, so that the complexity and pressure of an upper-layer server for analyzing data are reduced, and the business of a business layer is focused more quickly.

Description

Configurable data transmission method and device of Internet of things platform gateway and gateway
Technical Field
The application relates to the technical field of internet of things, in particular to a configurable data transmission method and device for an internet of things platform gateway and the gateway.
Background
With The development of The Internet of Things (IoT), The technology is widely applied to The fields of daily life, production, transportation, and The like. Taking the industrial production field as an example, the method can be used for collecting the operation parameters or data of production equipment and the like, and uploading the operation parameters or data to an upper-layer server for data analysis, processing, storage and the like, thereby providing guarantee for the stable operation of the whole production system.
In the traditional data acquisition in the industrial field, data is generally directly uploaded to an upper-layer server, and the upper-layer server performs all the work of cleaning, analyzing, storing and the like on the data, but the form can generate a large amount of useless data transmission, so that the time and steps of the transmission process are increased; and the storage of large amounts of data can place excessive pressure on the upper level servers.
Disclosure of Invention
The application provides a configurable data transmission method and device of an Internet of things platform gateway and the gateway, and aims to solve the problems that the traditional data transmission process is complex and a large amount of useless data are stored to cause excessive pressure on a server in the Internet of things technology.
The above object of the present application is achieved by the following technical solutions:
in a first aspect, an embodiment of the present application provides a data transmission method for a configurable internet of things platform gateway, including:
acquiring field data sent by hardware equipment;
verifying the data integrity of the field data according to a preset database;
if the data integrity of the field data meets the rules, the field data is used as rule data, and whether a corresponding protocol analysis code which is configured in advance exists in a database or not is checked;
if the corresponding protocol analysis code exists in the database, analyzing the rule data based on the protocol analysis code; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database; if so, analyzing the rule data based on the protocol;
issuing the analyzed rule data to a message queue;
and operating the rule data in the message queue based on a preset subscription service.
Optionally, the configuration process of the protocol parsing code includes:
acquiring configuration information input by field personnel after accessing a configuration page, and generating a protocol analysis code;
and sending the generated protocol analysis code to a designated hardware device to complete adaptation, and sending the generated protocol analysis code to the database for storage.
Optionally, before the operation is performed on the rule data in the message queue based on the preset subscription service, the method further includes:
and if the corresponding protocol analysis code and the corresponding protocol do not exist in the database, directly transmitting the rule data to a message queue.
Optionally, the preset subscription service includes: a data upload service;
the operation on the rule data in the message queue based on the preset subscription service comprises the following steps:
and uploading the rule data in the message queue to an upper layer server based on the data uploading service.
Optionally, the preset subscription service further includes: data issuing service;
the operation is carried out on the rule data in the message queue based on the preset subscription service, including;
and based on the data issuing service, issuing the rule data returned to the message queue by the upper layer server to the corresponding hardware equipment.
Optionally, the preset subscription service includes: log monitoring services;
the operation is carried out on the rule data in the message queue based on the preset subscription service, including;
and sending the rule data in the message queue to a local log file for storage based on the log monitoring service.
In a second aspect, an embodiment of the present application further provides a data transmission device for a configurable internet of things platform gateway, including:
the acquisition module is used for acquiring field data sent by the hardware equipment;
the checking module is used for checking the data integrity of the field data according to a preset database;
the inspection module is used for taking the field data as rule data if the data integrity of the field data meets the rules and inspecting whether a corresponding protocol analysis code which is configured in advance exists in a database or not;
the analysis module is used for analyzing the rule data based on the protocol analysis codes if the corresponding protocol analysis codes exist in the database; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database; if so, analyzing the rule data based on the protocol;
the issuing module is used for issuing the analyzed rule data to a message queue;
and the subscription module is used for operating the rule data in the message queue based on preset subscription service.
Optionally, the preset subscription service includes: a data upload service;
the subscription module comprises:
and the data uploading unit is used for uploading the rule data in the message queue to an upper-layer server based on the data uploading service.
Optionally, the preset subscription service includes: log monitoring services;
the subscription module comprises:
and the log monitoring unit is used for sending the rule data in the message queue to a local log file for storage based on the log monitoring service.
In a third aspect, an embodiment of the present application further provides a configurable internet of things platform gateway, including:
a memory and a processor coupled to the memory;
the memory is used for storing a program, and the program is at least used for executing any one of the data transmission methods of the configurable internet of things platform gateway;
the processor is used for calling and executing the program stored in the memory.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
compared with the prior art, the technical scheme provided by the embodiment of the application adopts a flexible protocol analysis scheme and sinks the edge analysis capability to the gateway, so that the complexity and pressure of an upper-layer server for analyzing data are reduced, and the business of a business layer is focused more quickly. Furthermore, other services can be conveniently expanded by adopting the message queue service, so that the functions are richer. In addition, through introducing the database persistent configuration information, the information seen by different terminals accessing the same web service is consistent, and the original configuration information still exists after the service is restarted due to failure, so that the stability of the service can be enhanced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a data transmission method for a configurable internet of things platform gateway according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a data transmission device of a configurable internet of things platform gateway according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a configurable internet of things platform gateway according to an embodiment of the present disclosure;
fig. 4 is a schematic overall architecture diagram of a configurable internet of things platform gateway provided in an embodiment of the present application;
fig. 5 is a schematic workflow diagram of a web configuration page service in an internet of things platform gateway according to an embodiment of the present application;
fig. 6 is a schematic view of a workflow of a data acquisition and analysis service in an internet of things platform gateway according to an embodiment of the present application;
fig. 7 is a schematic view of a workflow of a data upload service in an internet of things platform gateway according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Current industrial equipment data collection technologies CAN be equipped with one or more of the standard protocols, such as CAN, Profibus, Modbus, etc., and typically provide a unified data transmission format dominated by the TCP/IP protocol to the upper layers.
Although the acquisition scheme can meet the standard industrial equipment data acquisition to a certain extent, in the subsequent process of accessing a large amount of equipment, due to the fact that the protocols of the equipment are different, the equipment can not be matched with one or more types of standard protocols, and the acquired data can only be directly uploaded to an upper-layer server in a pass-through mode, so that a large amount of useless data transmission can be generated, and the time and steps of the transmission process are increased; and the storage of large amounts of data can place excessive pressure on the upper level servers. In addition, for the extension of the subsequent acquisition mode, for example, after the data is acquired, not only the data is uploaded to the upper layer service, but also other services need to be processed by the data, and the current acquisition scheme cannot meet the requirement of providing the extended services at the same time.
In order to solve the above problem, an embodiment of the present application provides a data transmission method for a configurable internet of things platform gateway.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart of a data transmission method of a configurable internet of things platform gateway according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101: acquiring field data sent by hardware equipment;
the hardware device refers to a hardware device that can perform data acquisition or transmission, such as a production device, a monitoring sensor, and a PLC (Programmable Logic Controller) in industrial production.
S102: verifying the data integrity of the field data according to a preset database;
specifically, Data Integrity (Data Integrity) refers to the Accuracy (Accuracy) and Reliability (Reliability) of Data. It is proposed to prevent data which does not comply with semantic regulations from being present in the database and to prevent invalid operations or erroneous information from being caused by input and output of erroneous information. Data integrity is divided into four categories: entity Integrity (EntityIntegration), Domain Integrity (Domain Integrity), Referential Integrity (Referential Integrity), User-defined Integrity (User-defined Integrity). For data sent by different devices, data integrity parameters are not completely consistent, and need to be defined and analyzed according to actual conditions. For the present embodiment, the data integrity is checked to avoid transmission of invalid or erroneous information.
S103: if the data integrity of the field data meets the rules, the field data is used as rule data, and whether a corresponding protocol analysis code which is configured in advance exists in a database or not is checked;
a protocol, i.e., a network protocol, refers to a set of rules that must be followed in exchanging information between peer entities communicating with each other in a computer network. Peer entities generally refer to units of information at the same level in a computer network architecture. The general system network protocol includes five parts: communication environment, transmission service, vocabulary, coding format of information, timing, rules and procedures. The three elements are as follows: syntax, semantics, timing.
For different kinds of hardware devices, which generally match a specific protocol, if data communication is performed with other devices through the protocol, data can be parsed based on the protocol, so that different data values can be obtained from the parsed data, and thus when data transmission is further performed, the amount of data to be transmitted can be reduced.
In addition, if the data integrity of the field data does not meet the rules, the invalid or erroneous data is discarded.
The protocol analysis code is a code that a user defines parameters such as syntax, semantics, and timing in order to analyze data, and can generate a function similar to a protocol.
In some embodiments, the configuration process of the protocol parsing code comprises:
acquiring configuration information input by field personnel after accessing a configuration page, and generating a protocol analysis code;
and sending the generated protocol analysis code to a designated hardware device to complete adaptation, and sending the generated protocol analysis code to the database for storage.
Where typically field personnel access a particular IP address through a browser to enter a configuration page. The generated protocol analysis code needs to be sent to corresponding hardware equipment, and real-time debugging is carried out to determine whether configuration is successful. And when the configuration is successful, the configured protocol can be used for analyzing the codes subsequently to analyze the data acquired by the hardware equipment.
In addition, the generated protocol analysis code is sent to the database for storage, so that various configuration information still exist after the server is restarted due to faults through the database, and the stability of the service is enhanced.
S104: if the corresponding protocol analysis code exists in the database, analyzing the rule data based on the protocol analysis code; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database or not, and if the corresponding protocol exists in the database, analyzing the rule data based on the protocol;
specifically, in this embodiment, if the data transmission platform does not have a user-defined parsing code, the data is parsed by using a preset protocol matched with the accessed hardware device. The reason why the user-defined protocol analysis code is preferentially selected rather than the preset protocol of the hardware equipment is that the protocol of the hardware equipment is generally more complex in order to ensure the universality when various equipment is connected, the user-defined analysis code is configured by the user according to the current actual requirement and is more targeted, and when the user-defined analysis code is adopted for analysis, the analysis process is more accurate and faster.
S105: issuing the analyzed rule data to a message queue;
in particular, a "message" is a unit of data that is transmitted between two computers or similar devices. Correspondingly, a message queue is a "container" that holds messages during their transmission. The message queue manager acts as a man-in-the-middle in relaying a message from its source to its destination. The main purpose of the queues is to provide routing and guarantee delivery of messages; if the recipient is unavailable when the message is sent, the message queue will resend the message based on the set number of retransmissions.
In addition, in some embodiments, if neither the corresponding protocol resolution code nor the corresponding protocol exists in the database, the rule data is directly transmitted to the message queue, so that it is ensured that all valid data is issued to the message queue instead of being discarded.
S106: and operating the rule data in the message queue based on a preset subscription service.
In software architecture, "publish-subscribe" is a messaging paradigm in which a sender of a message (called a publisher) does not send the message directly to a particular recipient (called a subscriber). But rather, the published messages are classified into different categories without knowing which subscribers, if any, may be present. Likewise, a subscriber may express interest in one or more categories, receiving only interesting messages, without knowing which publishers (if any) are present.
In the embodiment, the service is decoupled by adopting the message queue mode and the publish-subscribe mode, so that the subsequent customization and expansion of other services are facilitated, and the functions are richer.
In some embodiments, the predetermined subscription service includes: a data upload service; i.e. a subscription service corresponding to the upper server, so that the rule data in the message queue is uploaded to the upper server based on the data upload service.
In some embodiments, the predetermined subscription service includes: data issuing service; namely, the subscription service corresponding to the hardware device, so that the rule data returned to the message queue by the upper layer server is issued to the corresponding hardware device based on the data issuing service. That is, there are both messages published by the hardware device and messages published by the upper-level server in the message queue, and a specific subscriber subscribes to different messages.
In some embodiments, the predetermined subscription service includes: log monitoring services; namely, the subscription service corresponding to the local log, so that the rule data in the message queue is sent to the local log file for saving based on the log monitoring service. Further, the saved messages may be set to only keep the latest n messages, thereby facilitating the developer to subsequently verify the arrival rate of the verification messages to the upper server. In addition, by checking the log file, the transparently transmitted data can be checked, so that a developer can further configure a protocol analysis code for the data which is not covered by analysis.
Compared with the prior art, the technical scheme provided by the embodiment of the application adopts a flexible protocol analysis scheme and sinks the edge analysis capability to the gateway, so that the complexity and pressure of an upper-layer server for analyzing data are reduced, and the business of a business layer is focused more quickly. Furthermore, other services can be conveniently expanded by adopting the message queue service, so that the functions are richer. In addition, through introducing the database persistent configuration information, the information seen by different terminals accessing the same web service is consistent, and the original configuration information still exists after the service is restarted due to failure, so that the stability of the service can be enhanced.
In order to better explain the technical solution of the present application, in correspondence to the data transmission method of the configurable internet of things platform gateway provided in the foregoing embodiment, an embodiment of the present application further provides a data transmission device of the configurable internet of things platform gateway.
Example two
Referring to fig. 2, fig. 2 is a schematic structural diagram of a data transmission device of a configurable internet of things platform gateway according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
the acquiring module 21 is configured to acquire field data sent by a hardware device;
the checking module 22 is used for checking the data integrity of the field data according to a preset database;
the checking module 23 is configured to, if the data integrity of the field data meets a rule, use the field data as rule data to check whether a pre-configured corresponding protocol analysis code exists in a database;
the analysis module 24 is configured to analyze the rule data based on the protocol analysis code if the corresponding protocol analysis code exists in the database; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database; if so, analyzing the rule data based on the protocol;
the issuing module 25 is configured to issue the parsed rule data to a message queue;
and the subscription module 26 is used for operating the rule data in the message queue based on a preset subscription service.
Optionally, the preset subscription service includes: a data upload service;
the subscription module 26 includes:
and the data uploading unit is used for uploading the rule data in the message queue to an upper-layer server based on the data uploading service.
Optionally, the preset subscription service includes: data issuing service;
the subscription module 26 includes:
and the data issuing unit is used for issuing the rule data returned to the message queue by the upper layer server to the corresponding hardware equipment based on the data issuing service.
Optionally, the preset subscription service includes: log monitoring services;
the subscription module 26 includes:
and the log monitoring unit is used for sending the rule data in the message queue to a local log file for storage based on the log monitoring service.
Specifically, please refer to corresponding content implementation in the data transmission method of the configurable internet of things platform gateway in the first embodiment, and detailed description thereof is omitted here.
In order to better explain the technical scheme of the present application, in correspondence to the data transmission method of the configurable internet of things platform gateway provided in the foregoing embodiment, an embodiment of the present application further provides a configurable internet of things platform gateway.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a configurable internet of things platform gateway according to an embodiment of the present application. As shown in fig. 3, the internet of things platform gateway includes:
a memory 31 and a processor 32 connected to the memory 31;
the memory 31 is used for storing a program, and the program is at least used for executing any one of the data transmission methods of the configurable internet of things platform in the embodiment;
the processor 32 is used to call and execute the program stored in the memory 31.
Specifically, the platform gateway serves as a system middle station, data collected on site are analyzed through a full-coverage protocol through program identification or manual configuration, and then the data are transmitted to an upper application system. For a specific implementation manner of the functions of the program, please refer to corresponding content implementation in the data transmission method of the configurable internet of things platform gateway in the first embodiment, which is not described in detail herein.
In order to more fully explain the technical scheme of the application, the embodiment of the application also provides a configurable internet of things platform gateway.
Example four
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an overall architecture of a configurable platform gateway of the internet of things according to another embodiment of the present application. As shown in fig. 4, the internet of things platform gateway mainly includes four services: web configuration page services, data collection and parsing services, data transmission services, and log monitoring services. First, the gateway is connected to the hardware device by means of serial communication (for example, the USB interface shown in fig. 4). The web configuration page is connected with a web server (web server) through an Application Programming Interface (API), so as to issue an instruction to the hardware device and receive a response from the hardware device. Data sent by the hardware device is checked and analyzed in the gateway, and then sent to the Message distribution module (i.e., a Message queue) so as to be consumed by other services, for example, sent to the cloud platform (i.e., an upper layer server) through an EMQ module (an open source MQTT Message server in a publish-subscribe mode), where data interaction may be implemented based on an MQTT (Message queue telemetry Transport) protocol; for another example, the gateway is connected to a DTU (data transfer unit) of another external device by wireless transmission (for example, bluetooth transmission shown in fig. 4), so as to exchange data based on the message distribution module. In addition, the parsed data is also saved to a local log record for viewing by developers.
In specific implementation, the gateway can be developed by adopting Python language based on a Linux system, serial port communication is carried out through a hardware main board and equipment, and a uniform data format is uploaded to an upper layer by adopting an MQTT protocol. For the four main services described above, among them:
the Web configuration page service is mainly used for field implementers to perform network configuration of a gateway, search of surrounding hardware collectors (namely hardware equipment), and set success of protocols specified for the hardware configuration and real-time debugging and checking protocols. The specific operation flow is as follows: the site implementer accesses the designated ip address through the browser, enters the web configuration page, performs related configuration, the configured information is stored in the database, meanwhile, the configuration of the protocol is that the web configuration page service sends the configured information to the data acquisition and analysis service, and the data acquisition and analysis service sends the instruction of the web configuration page service to the hardware collector to complete the configuration of the protocol, and the flow is shown in fig. 5.
The data acquisition and analysis service is mainly responsible for data communication with hardware around the site. When the hardware has data transmission, the service is responsible for receiving and checking to determine data integrity, then checking a protocol analysis code to which the hardware corresponding to the data in the database belongs, if the protocol analysis code is checked, analyzing based on the protocol analysis code, if the corresponding protocol analysis code is not configured, then checking whether a protocol written by an implementer for the data exists, if so, analyzing according to the configured protocol, and if not, directly sending in a transparent transmission mode. After the data is parsed and processed, the data is posted to a message post queue for consumption processing by other services, where a response queue may be used to determine that a message has arrived or is retrieved by a target application (service). Meanwhile, there is a blocking thread service (i.e. data issuing service), which takes a way of writing into a queue (and responding to different threads at the queue part) and is responsible for monitoring data in the message receiving queue, and when other services fill data into the message receiving queue, the service will receive the data immediately and issue the data to a hardware collector (hardware device), and the flow is shown in fig. 6.
After the data uploading service is successfully connected with the upper-layer server, data communication can be carried out with the upper-layer server, including data uploading and data receiving. The method comprises a service blocking (redis) subscription message queue, and when a message exists in the message queue, the obtained message is transmitted to an upper layer server. Meanwhile, the service also asynchronously monitors the message sent by the upper server, and when receiving the message sent by the upper server, performs other asynchronous operations, and the flow is shown in fig. 7.
The log monitoring service is also a subscription service, and when the message is acquired, the log monitoring service stores the message into a local log file, and only the latest n messages are reserved, so that a developer can conveniently check the arrival rate of the verification message transmitted to an upper-layer server.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A data transmission method of a configurable Internet of things platform gateway is characterized by comprising the following steps:
acquiring field data sent by hardware equipment;
verifying the data integrity of the field data according to a preset database;
if the data integrity of the field data meets the rules, the field data is used as rule data, and whether a corresponding protocol analysis code which is configured in advance exists in a database or not is checked;
if the corresponding protocol analysis code exists in the database, analyzing the rule data based on the protocol analysis code; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database; if so, analyzing the rule data based on the protocol;
issuing the analyzed rule data to a message queue;
and operating the rule data in the message queue based on a preset subscription service.
2. The method of claim 1, wherein the configuration process of the protocol resolution code comprises:
acquiring configuration information input by field personnel after accessing a configuration page, and generating a protocol analysis code;
and sending the generated protocol analysis code to a designated hardware device to complete adaptation, and sending the generated protocol analysis code to the database for storage.
3. The method of claim 1, wherein before the operating on the rule data in the message queue based on the preset subscription service, the method further comprises:
and if the corresponding protocol analysis code and the corresponding protocol do not exist in the database, directly transmitting the rule data to a message queue.
4. The method according to claim 1 or 3, wherein the preset subscription service comprises: a data upload service;
the operation on the rule data in the message queue based on the preset subscription service comprises the following steps:
and uploading the rule data in the message queue to an upper layer server based on the data uploading service.
5. The method of claim 4, wherein the predetermined subscription service further comprises: data issuing service;
the operation is carried out on the rule data in the message queue based on the preset subscription service, including;
and based on the data issuing service, issuing the rule data returned to the message queue by the upper layer server to the corresponding hardware equipment.
6. The method according to claim 1 or 3, wherein the preset subscription service comprises: log monitoring services;
the operation is carried out on the rule data in the message queue based on the preset subscription service, including;
and sending the rule data in the message queue to a local log file for storage based on the log monitoring service.
7. A data transmission device of a configurable Internet of things platform gateway is characterized by comprising:
the acquisition module is used for acquiring field data sent by the hardware equipment;
the checking module is used for checking the data integrity of the field data according to a preset database;
the inspection module is used for taking the field data as rule data if the data integrity of the field data meets the rules and inspecting whether a corresponding protocol analysis code which is configured in advance exists in a database or not;
the analysis module is used for analyzing the rule data based on the protocol analysis codes if the corresponding protocol analysis codes exist in the database; if the corresponding protocol analysis code does not exist in the database, checking whether a protocol which is configured in advance and corresponds to the hardware equipment for sending the rule data exists in the database; if so, analyzing the rule data based on the protocol;
the issuing module is used for issuing the analyzed rule data to a message queue;
and the subscription module is used for operating the rule data in the message queue based on preset subscription service.
8. The apparatus of claim 7, wherein the predetermined subscription service comprises: a data upload service;
the subscription module comprises:
and the data uploading unit is used for uploading the rule data in the message queue to an upper-layer server based on the data uploading service.
9. The apparatus of claim 7, wherein the predetermined subscription service comprises: log monitoring services;
the subscription module comprises:
and the log monitoring unit is used for sending the rule data in the message queue to a local log file for storage based on the log monitoring service.
10. A configurable Internet of things platform gateway, comprising:
a memory and a processor coupled to the memory;
the memory is used for storing a program, and the program is at least used for executing the data transmission method of the configurable internet of things platform gateway according to any one of claims 1-6;
the processor is used for calling and executing the program stored in the memory.
CN201911410801.4A 2019-12-31 2019-12-31 Configurable data transmission method and device of Internet of things platform gateway and gateway Pending CN111083168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911410801.4A CN111083168A (en) 2019-12-31 2019-12-31 Configurable data transmission method and device of Internet of things platform gateway and gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911410801.4A CN111083168A (en) 2019-12-31 2019-12-31 Configurable data transmission method and device of Internet of things platform gateway and gateway

Publications (1)

Publication Number Publication Date
CN111083168A true CN111083168A (en) 2020-04-28

Family

ID=70321098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911410801.4A Pending CN111083168A (en) 2019-12-31 2019-12-31 Configurable data transmission method and device of Internet of things platform gateway and gateway

Country Status (1)

Country Link
CN (1) CN111083168A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491795A (en) * 2020-10-27 2021-03-12 许继集团有限公司 Data packing method and system for edge Internet of things agent device
CN112769926A (en) * 2020-12-31 2021-05-07 广州鲁邦通物联网科技有限公司 Internet of things center, system and communication method
CN113706668A (en) * 2021-07-27 2021-11-26 杭州玖欣物联科技有限公司 Method for realizing glass running three-dimensional animation according to gateway data
CN113726854A (en) * 2021-07-30 2021-11-30 联合汽车电子有限公司 Information processing method and device, storage medium, debugging equipment and vehicle
CN113992733A (en) * 2021-10-26 2022-01-28 云知声(上海)智能科技有限公司 Method and device for accessing edge gateway to Internet of things equipment, electronic equipment and medium
CN114422618A (en) * 2021-12-31 2022-04-29 北京千方科技股份有限公司 IOT platform protocol adaptation method, device, equipment and medium based on cloud protogenesis
CN114553479A (en) * 2022-01-13 2022-05-27 广东化一环境科技有限公司 Protocol receiving and processing system, method and device
CN115208959A (en) * 2022-05-30 2022-10-18 武汉市水务集团有限公司 Internet of things safety communication system
CN115550472A (en) * 2022-11-22 2022-12-30 浙江大华技术股份有限公司 Heterogeneous data processing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6028522A (en) * 1998-10-14 2000-02-22 Statsignal Systems, Inc. System for monitoring the light level around an ATM
CN103944813A (en) * 2014-04-16 2014-07-23 北京大学工学院南京研究院 Gateway and method for achieving general adaptation function
CN106941494A (en) * 2017-03-30 2017-07-11 中国电力科学研究院 A kind of security isolation gateway and its application method suitable for power information acquisition system
CN108141464A (en) * 2017-03-15 2018-06-08 深圳中兴力维技术有限公司 A kind of communication protocol parsing code automatic generation method and system
CN108494752A (en) * 2018-03-09 2018-09-04 万帮充电设备有限公司 A kind of analysis method and device of agreement
CN110417704A (en) * 2018-04-26 2019-11-05 广东亿迅科技有限公司 A kind of things-internet gateway preloading method and device based on heterogeneous network fusion
CN110417629A (en) * 2019-07-26 2019-11-05 深圳市浩科电子有限公司 The method and system of one kind of multiple different types of internet of things equipment access Internet of Things
CN110601876A (en) * 2019-08-20 2019-12-20 西安向南网络信息科技有限公司 Intelligent Internet of things platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6028522A (en) * 1998-10-14 2000-02-22 Statsignal Systems, Inc. System for monitoring the light level around an ATM
CN103944813A (en) * 2014-04-16 2014-07-23 北京大学工学院南京研究院 Gateway and method for achieving general adaptation function
CN108141464A (en) * 2017-03-15 2018-06-08 深圳中兴力维技术有限公司 A kind of communication protocol parsing code automatic generation method and system
CN106941494A (en) * 2017-03-30 2017-07-11 中国电力科学研究院 A kind of security isolation gateway and its application method suitable for power information acquisition system
CN108494752A (en) * 2018-03-09 2018-09-04 万帮充电设备有限公司 A kind of analysis method and device of agreement
CN110417704A (en) * 2018-04-26 2019-11-05 广东亿迅科技有限公司 A kind of things-internet gateway preloading method and device based on heterogeneous network fusion
CN110417629A (en) * 2019-07-26 2019-11-05 深圳市浩科电子有限公司 The method and system of one kind of multiple different types of internet of things equipment access Internet of Things
CN110601876A (en) * 2019-08-20 2019-12-20 西安向南网络信息科技有限公司 Intelligent Internet of things platform

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491795A (en) * 2020-10-27 2021-03-12 许继集团有限公司 Data packing method and system for edge Internet of things agent device
CN112769926A (en) * 2020-12-31 2021-05-07 广州鲁邦通物联网科技有限公司 Internet of things center, system and communication method
CN113706668A (en) * 2021-07-27 2021-11-26 杭州玖欣物联科技有限公司 Method for realizing glass running three-dimensional animation according to gateway data
CN113706668B (en) * 2021-07-27 2024-02-23 杭州玖欣物联科技有限公司 Method for realizing glass operation three-dimensional animation according to gateway data
CN113726854A (en) * 2021-07-30 2021-11-30 联合汽车电子有限公司 Information processing method and device, storage medium, debugging equipment and vehicle
CN113992733A (en) * 2021-10-26 2022-01-28 云知声(上海)智能科技有限公司 Method and device for accessing edge gateway to Internet of things equipment, electronic equipment and medium
CN114422618B (en) * 2021-12-31 2024-01-02 北京千方科技股份有限公司 Cloud-protogenesis-based IOT platform protocol adaptation method, device, equipment and medium
CN114422618A (en) * 2021-12-31 2022-04-29 北京千方科技股份有限公司 IOT platform protocol adaptation method, device, equipment and medium based on cloud protogenesis
CN114553479A (en) * 2022-01-13 2022-05-27 广东化一环境科技有限公司 Protocol receiving and processing system, method and device
CN114553479B (en) * 2022-01-13 2024-01-02 广东化一环境科技有限公司 Protocol receiving and processing system, method and device
CN115208959B (en) * 2022-05-30 2023-12-12 武汉市水务集团有限公司 Internet of things secure communication system
CN115208959A (en) * 2022-05-30 2022-10-18 武汉市水务集团有限公司 Internet of things safety communication system
CN115550472A (en) * 2022-11-22 2022-12-30 浙江大华技术股份有限公司 Heterogeneous data processing method and device

Similar Documents

Publication Publication Date Title
CN111083168A (en) Configurable data transmission method and device of Internet of things platform gateway and gateway
CN110868336B (en) Data management method, device and computer readable storage medium
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
US10594614B2 (en) Context aware routing
CN107360261A (en) A kind of HTTP request processing method, device and electronic equipment
EP2352269A1 (en) Service access method and system
CN112313627B (en) Mapping mechanism of event to serverless function workflow instance
CN111447170A (en) Data processing method and system, computer system and computer readable medium
US10310851B2 (en) Automated generation of service definitions for message queue application clients
CN114090366A (en) Method, device and system for monitoring data
CN112068973A (en) Asynchronous information processing method and device of policy mode, server and storage medium
US20090271466A1 (en) Data logging with network interfacing feature
CN105224420B (en) A kind of analysis method and system of automatic parsing terminal abnormal
JP2004173284A (en) Tracking method and tracking device for multimedia message through remote communication network
CN116368786A (en) Processing deferrable network requests
CN111373377B (en) Method and system for error handling between a requester and a provider
CN111930385A (en) Data acquisition method, device, equipment and storage medium
CN110309028A (en) Monitoring information acquisition methods, service monitoring method, apparatus and system
CN113852610B (en) Message processing method, device, computer equipment and storage medium
WO2021073413A1 (en) Method and apparatus for sending system performance parameters, management device, and storage medium
CN113342769A (en) Unified log recording tool, method, storage medium and equipment
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
CN111459819A (en) Software testing method and device, electronic equipment and computer readable medium
CN112230891A (en) Interface document integration method and device, server and computer storage medium
US8250146B2 (en) Service adaptation machine

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428

RJ01 Rejection of invention patent application after publication