CN110290062B - Gateway and data processing method thereof - Google Patents

Gateway and data processing method thereof Download PDF

Info

Publication number
CN110290062B
CN110290062B CN201910597089.7A CN201910597089A CN110290062B CN 110290062 B CN110290062 B CN 110290062B CN 201910597089 A CN201910597089 A CN 201910597089A CN 110290062 B CN110290062 B CN 110290062B
Authority
CN
China
Prior art keywords
key value
data
gateway
value name
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910597089.7A
Other languages
Chinese (zh)
Other versions
CN110290062A (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.)
Siemens Factory Automation Engineering Ltd
Original Assignee
Siemens Factory Automation Engineering 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 Siemens Factory Automation Engineering Ltd filed Critical Siemens Factory Automation Engineering Ltd
Priority to CN201910597089.7A priority Critical patent/CN110290062B/en
Publication of CN110290062A publication Critical patent/CN110290062A/en
Application granted granted Critical
Publication of CN110290062B publication Critical patent/CN110290062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/22Indexing; Data structures therefor; Storage structures
    • 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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

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

Abstract

The invention provides a gateway and a data processing method of the gateway, wherein the gateway comprises the following steps: the system comprises a data sharing area and at least two gateway internal modules; at least one key value name is arranged in the data sharing area, and each key value name is provided with a corresponding key value; the first gateway internal module of the at least two gateway internal modules is used for determining a key value name of data to be shared and updating a key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared; and a second gateway internal module of the at least two gateway internal modules is configured to determine a key value name of the data to be read, and read a key value corresponding to the key value name of the data to be read from the data sharing area. The invention provides a gateway and a data processing method of the gateway, which can enable the gateway to operate more flexibly.

Description

Gateway and data processing method thereof
Technical Field
The present invention relates to the field of gateway technologies, and in particular, to a gateway and a data processing method for the gateway.
Background
Gateways are often used to interface with various software systems of different protocols and to transmit various collected data to the various software systems, such as: and transmitting the data of the PLC (Programmable Logic Controller) acquired by the acquisition module to various software systems.
Various gateway internal modules exist inside the gateway, data processing is carried out through the gateway internal modules, and data interaction often exists among the gateway internal modules. In the existing gateway, data interaction is directly performed between internal modules of each gateway. For example: the watchdog module needs to monitor the operating state of each of the other gateway internal modules by obtaining the heartbeat signal, and the watchdog module needs to establish a TCP (Transmission Control Protocol)/UDP (User Datagram Protocol) connection with each of the other gateway internal modules, and directly obtain the heartbeat signal from each of the other gateway internal modules through the TCP/UDP connection.
In the existing gateway, data interaction is directly carried out between gateway internal modules, more coupling exists between the gateway internal modules, if the normal operation of the gateway internal module A needs data provided by another gateway internal module B, and if the gateway internal module B has a fault, the gateway internal module A cannot normally operate. It can be seen that the existing gateways are not flexible enough.
Disclosure of Invention
The embodiment of the invention provides a gateway and a data processing method of the gateway, which can enable the gateway to operate more flexibly.
In a first aspect, an embodiment of the present invention provides a gateway, including:
the system comprises a data sharing area and at least two gateway internal modules;
at least one key value name is arranged in the data sharing area, and each key value name is provided with a corresponding key value;
the first gateway internal module of the at least two gateway internal modules is used for determining a key value name of data to be shared and updating a key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared;
and a second gateway internal module of the at least two gateway internal modules is configured to determine a key value name of the data to be read, and read a key value corresponding to the key value name of the data to be read from the data sharing area.
Alternatively,
the first gateway internal module is used for generating a heartbeat signal of the cost module, determining a key value name of the heartbeat signal of the module, and updating a key value corresponding to the key value name of the heartbeat signal in the data sharing area according to the heartbeat signal of the module;
and the second gateway internal module is used for determining the key value name of the heartbeat signal to be read and reading the key value corresponding to the key value name of the heartbeat signal to be read from the data sharing area.
Alternatively,
the first gateway internal module is used for acquiring data of a programmable logic controller, determining key value names of the data of the programmable logic controller, and updating key values corresponding to the key value names of the data of the programmable logic controller in the data sharing area according to the data of the programmable logic controller.
Alternatively,
the second gateway internal module is used for determining a key value name of script data required by executing a custom script, reading a key value corresponding to the key value name of the script data from the data sharing area, and executing the custom script according to the key value corresponding to the key value name of the script data.
Alternatively,
the second gateway internal module is configured to determine a key value name of edge data required for performing edge calculation, read a key value corresponding to the key value name of the edge data from the data sharing area, and perform edge calculation according to the key value corresponding to the key value name of the edge data.
Alternatively,
the second gateway internal module is configured to determine a key value name of data to be uploaded, which needs to be uploaded to the cloud, read a key value corresponding to the key value name of the data to be uploaded from the data sharing area, write the key value corresponding to the key value name of the data to be uploaded into a message queue, and upload the key value corresponding to the key value name of the data to be uploaded to the cloud through the message queue.
Alternatively,
the gateway further comprises: an internal interface;
the first gateway internal module is configured to, when executing the updating of the key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared, update the key value corresponding to the key value name of the data to be shared in the data sharing area through the internal interface according to the data to be shared;
and the second gateway internal module is configured to, when executing the reading of the key value corresponding to the key value name of the data to be read from the data sharing area, read the key value corresponding to the key value name of the data to be read from the data sharing area through the internal interface.
Alternatively,
the gateway further comprises: an Application Programming Interface (HTTP API) based on a HyperText Transfer Protocol;
an external software system can read any key value name and the key value from the data sharing area through the application programming interface based on the hypertext transfer protocol.
In a second aspect, an embodiment of the present invention provides a data processing method for a gateway, including:
the gateway includes: the gateway comprises a data sharing area and at least two gateway internal modules, wherein the data sharing area is provided with at least one key value name, and each key value name is provided with a corresponding key value;
a first gateway internal module in the at least two gateway internal modules determines a key value name of data to be shared, and updates the key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared;
and a second gateway internal module of the at least two gateway internal modules determines a key value name of the data to be read, and reads a key value corresponding to the key value name of the data to be read from the data sharing area.
Alternatively,
the method further comprises the following steps:
the first gateway internal module generates a heartbeat signal of the first gateway internal module;
the determining a key value name of the data to be shared, and updating the key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared includes:
the first gateway internal module determines a key value name of a heartbeat signal of the module, and updates the key value corresponding to the key value name of the heartbeat signal in the data sharing area according to the heartbeat signal of the module;
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area includes:
and the second gateway internal module determines the key value name of the heartbeat signal to be read, and reads the key value corresponding to the key value name of the heartbeat signal to be read from the data sharing area.
Alternatively,
the method further comprises the following steps:
the first gateway internal module acquires data of the programmable logic controller;
the determining a key value name of the data to be shared, and updating the key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared includes:
and the first gateway internal module determines the key value name of the data of the programmable logic controller, and updates the key value corresponding to the key value name of the data of the programmable logic controller in the data sharing area according to the data of the programmable logic controller.
Alternatively,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area includes:
the second gateway internal module determines a key value name of script data required by executing a custom script, and reads a key value corresponding to the key value name of the script data from the data sharing area;
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module executes the custom script according to the key value corresponding to the key value name of the script data.
Alternatively,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area includes:
the second gateway internal module determines a key value name of edge data required by edge calculation, and reads a key value corresponding to the key value name of the edge data from the data sharing area;
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module performs edge calculation according to the key value corresponding to the key value name of the edge data.
Alternatively,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area includes:
the second gateway internal module determines the key value name of the data to be uploaded which needs to be uploaded to the cloud, and reads the key value corresponding to the key value name of the data to be uploaded from the data sharing area;
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module writes the key values corresponding to the key value names of the data to be uploaded into a message queue, and uploads the key values corresponding to the key value names of the data to be uploaded to the cloud end through the message queue.
Alternatively,
the gateway further comprises: an internal interface;
the updating, according to the data to be shared, a key value corresponding to a key value name of the data to be shared in the data sharing area includes:
updating a key value corresponding to the key value name of the data to be shared in the data sharing area through the internal interface according to the data to be shared;
the reading of the key value corresponding to the key value name of the data to be read from the data sharing area includes:
and reading the key value corresponding to the key value name of the data to be read from the data sharing area through the internal interface.
Alternatively,
the gateway further comprises: an application programming interface based on hypertext transfer protocol;
the data processing method of the gateway further comprises the following steps:
and an external software system reads any key value name and the key value from the data sharing area through the application programming interface based on the hypertext transfer protocol.
In the embodiment of the invention, the data sharing area is arranged in the gateway, the first gateway internal module can store the data to be shared into the data sharing area in a key value pair mode, and the second gateway internal module can directly read the data to be read from the data sharing area, so that the data interaction can be carried out between the gateway internal modules through the data sharing area without directly carrying out the data interaction, the decoupling between the gateway internal modules is realized, the operation of any gateway internal module does not need to depend on another gateway internal module, only the data required by the normal operation needs to be acquired from the data sharing area, and the gateway can be operated more flexibly.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in 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 invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a gateway according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another gateway provided by an embodiment of the present invention;
fig. 3 is a schematic diagram of another gateway provided by an embodiment of the present invention;
fig. 4 is a flowchart of a data processing method of a gateway according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a gateway, including:
a data sharing area 101 and at least two gateway internal modules;
at least one key value name is arranged in the data sharing area 101, and each key value name is provided with a corresponding key value;
a first gateway internal module 102 of the at least two gateway internal modules is configured to determine a key value name of data to be shared, and update a key value corresponding to the key value name of the data to be shared in the data sharing area according to the data to be shared;
a second gateway internal module 103 of the at least two gateway internal modules is configured to determine a key value name of the data to be read, and read a key value corresponding to the key value name of the data to be read from the data sharing area.
In the embodiment of the invention, the data sharing area is arranged in the gateway, the first gateway internal module can store the data to be shared into the data sharing area in a key value pair mode, and the second gateway internal module can directly read the data to be read from the data sharing area, so that the data interaction can be carried out between the gateway internal modules through the data sharing area without directly carrying out the data interaction, the decoupling between the gateway internal modules is realized, the operation of any gateway internal module does not need to depend on another gateway internal module, only the data required by the normal operation needs to be acquired from the data sharing area, and the gateway can be operated more flexibly.
In the embodiment of the present invention, the data sharing area stores at least one key-value name in advance, the first gateway internal module may determine the key-value name of the data to be shared from the at least one key-value name, and the second gateway internal module may determine the key-value name of the data to be read from the at least one key-value name.
In an embodiment of the present invention, the first gateway internal module 102 is configured to generate a heartbeat signal of the module, determine a key value name of the heartbeat signal of the module, and update a key value corresponding to the key value name of the heartbeat signal in the data sharing area 101 according to the heartbeat signal of the module;
the second gateway internal module 103 is configured to determine a key value name of a heartbeat signal that needs to be read, and read a key value corresponding to the key value name of the heartbeat signal that needs to be read from the data sharing area 101.
In this embodiment of the present invention, the data to be shared may be a heartbeat signal, and the data to be read may also be a shared signal, where the at least one key value name may include: the key value name of the heartbeat signal of each first gateway internal module needing to send the heartbeat signal; the first gateway internal module may be a gateway internal module that needs to share the heartbeat signal in the gateway, and the second gateway internal module may be a watchdog module.
The watchdog module does not need to establish TCP/UPD connection with each gateway internal module, and the watchdog module can know the running state of each gateway internal module only by checking all heartbeat signals from the data sharing area. If any of the gateway internal modules crashes or does not have any response, the watchdog module may send the kill-restart command of the module directly.
In an embodiment of the present invention, the first gateway internal module 102 is configured to collect data of a programmable logic controller, determine a key value name of the data of the programmable logic controller, and update a key value corresponding to the key value name of the data of the programmable logic controller in the data sharing area 101 according to the data of the programmable logic controller.
In the embodiment of the present invention, the data to be shared may include data of the programmable logic controller, and the at least one key-value name may include a key-value name of the data of the programmable logic controller. The first gateway internal module may be a data collection module. The data acquisition module stores the acquired data of the programmable logic controller into the data sharing area, and the data of the programmable logic controller can be provided to other modules through the data sharing area.
In an embodiment of the present invention, the second gateway internal module 103 is configured to determine a key value name of script data required for executing a custom script, read a key value corresponding to the key value name of the script data from the data sharing area 101, and execute the custom script according to the key value corresponding to the key value name of the script data.
In the embodiment of the present invention, the data to be read may include script data required for executing the custom script, the at least one key value name may include a key value name of the script data, and the second gateway internal module may be a script system. Thus, the script system can conveniently call script data required by executing the custom script, such as: data for programmable logic controllers, etc. Because the script system is not coupled with other gateway internal modules, other gateway internal modules do not need to be modified more when the user-defined script is realized.
In addition, the data to be shared may include execution data generated by executing the custom script, the at least one key value name may include a key value name of the execution data, the script system may also serve as a first gateway internal module, after the script system executes the custom script, the execution data generated by executing the custom script is generated, the key value name of the execution data is determined, and a key value corresponding to the key value name of the execution data is updated according to the key value name of the execution data.
In an embodiment of the present invention, the second gateway internal module 103 is configured to determine a key value name of edge data required for performing edge calculation, read a key value corresponding to the key value name of the edge data from the data sharing area 101, and perform the edge calculation according to the key value corresponding to the key value name of the edge data.
In this embodiment of the present invention, the data to be read may include edge data required for performing edge calculation, and the at least one key name may include: the second gateway internal module may include an edge calculation module; the edge calculation module can efficiently acquire data required for edge calculation through the data sharing area, for example: data for programmable logic controllers, etc.
In addition, the data to be shared may include an edge calculation result, and the at least one key-value name may include: the edge calculation module may be used to determine the key value name of the edge calculation result after the edge calculation is performed, and update the key value corresponding to the key value name of the edge calculation result according to the edge calculation result.
In an embodiment of the present invention, the second gateway internal module 103 is configured to determine a key value name of data to be uploaded, which needs to be uploaded to a cloud, read a key value corresponding to the key value name of the data to be uploaded from the data sharing area 101, write the key value corresponding to the key value name of the data to be uploaded into a message queue, and upload the key value corresponding to the key value name of the data to be uploaded to the cloud through the message queue.
In the embodiment of the present invention, the at least one key value name may include a key value name of data to be uploaded, the second gateway internal module may be an upload module, and the upload module may upload data in the data sharing area to the cloud in a message queue manner. In addition, the uploading module can also upload the data in the data sharing area to the cloud in an FTP mode.
As shown in fig. 2, in an embodiment of the present invention, the gateway further includes: an internal interface 201;
the first gateway internal module 102, when executing the updating of the key value corresponding to the key value name of the data to be shared in the data sharing area 101 according to the data to be shared, is configured to update, through the internal interface 201, the key value corresponding to the key value name of the data to be shared in the data sharing area 101 according to the data to be shared;
the second gateway internal module 103 is configured to, when executing the reading of the key value corresponding to the key value name of the data to be read from the data shared area 101, read the key value corresponding to the key value name of the data to be read from the data shared area 101 through the internal interface 201.
In the embodiment of the invention, each gateway internal module can write the data to be shared into the data sharing area through the simple and uniform internal interface, and can also read the data to be read from the data sharing area through the simple and uniform internal interface.
As shown in fig. 3, in an embodiment of the present invention, the gateway further includes: a hypertext transfer protocol based application programming interface 301;
an external software system can read any one of the key-value name and the key-value from the data-sharing area 101 through the application programming interface 301 based on the hypertext transfer protocol.
In the embodiment of the invention, the data of the data sharing area can be provided to an external software system through the application programming interface based on the hypertext transfer protocol, and the software system can realize remote access to the data sharing area through the application programming interface based on the hypertext transfer protocol. The application programming interface based on the hypertext transfer protocol can be unidirectional, and an external software system can only read data from the data sharing area and cannot write data into the data sharing area, so that the safety of the data sharing area is improved.
The external software System may be an MES (Manufacturing Execution System), a mail System, a human System, or the like.
In the embodiment of the invention, decoupling among the gateway internal modules can be realized through the data sharing area, so that the starting and stopping of the gateway internal modules are not dependent on other modules, and the independent starting and stopping of the gateway internal modules are realized.
In the embodiment of the invention, the data sharing area stores data in a key value pair mode, which does not occupy too much CPU and memory resources, can provide high-efficiency access performance, and does not cause the gateway to have obvious performance reduction.
In the embodiment of the invention, the data sharing area is arranged in the memory of the gateway, so that too many hardware resources are not needed, and the success rate is low.
In this embodiment of the present invention, the at least two gateway internal modules may further include: a web configuration page module, a short message alarm module, an expert database and the like.
The gateway in the embodiment of the present invention may be an industrial internet of things gateway, for example, a siemens gateway IOT 2040.
As shown in fig. 4, a data processing method of a gateway provided in an embodiment of the present invention includes:
the gateway includes: the gateway comprises a data sharing area 101 and at least two gateway internal modules, wherein at least one key value name is arranged in the data sharing area 101, and each key value name is provided with a corresponding key value;
step 401: a first gateway internal module 102 of the at least two gateway internal modules determines a key value name of data to be shared, and updates a key value corresponding to the key value name of the data to be shared in the data sharing area 101 according to the data to be shared;
step 402: a second gateway internal module 103 of the at least two gateway internal modules determines a key value name of the data to be read, and reads a key value corresponding to the key value name of the data to be read from the data sharing area 101.
In an embodiment of the invention, the method further comprises:
the first gateway internal module 102 generates a heartbeat signal of the module;
the determining the key value name of the data to be shared, and updating the key value corresponding to the key value name of the data to be shared in the data sharing area 101 according to the data to be shared includes:
the first gateway internal module 102 determines a key value name of a heartbeat signal of the module, and updates a key value corresponding to the key value name of the heartbeat signal in the data sharing area 101 according to the heartbeat signal of the module;
the determining the key value name of the data to be read, and reading the key value corresponding to the key value name of the data to be read from the data sharing area 101 includes:
the second gateway internal module 103 determines a key value name of the heartbeat signal that needs to be read, and reads a key value corresponding to the key value name of the heartbeat signal that needs to be read from the data sharing area 101.
In an embodiment of the invention, the method further comprises:
the first gateway internal module 102 collects data of the programmable logic controller;
the determining the key value name of the data to be shared, and updating the key value corresponding to the key value name of the data to be shared in the data sharing area 101 according to the data to be shared includes:
the first gateway internal module 102 determines a key value name of the data of the programmable logic controller, and updates a key value corresponding to the key value name of the data of the programmable logic controller in the data sharing area 101 according to the data of the programmable logic controller.
In an embodiment of the present invention, the determining a key value name of data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area 101 includes:
the second gateway internal module 103 determines a key value name of script data required for executing a custom script, and reads a key value corresponding to the key value name of the script data from the data sharing area 101;
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module 103 executes the custom script according to the key value corresponding to the key value name of the script data.
In an embodiment of the present invention, the determining a key value name of data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area 101 includes:
the second gateway internal module 103 determines a key value name of edge data required for performing edge calculation, and reads a key value corresponding to the key value name of the edge data from the data sharing area 101;
the data processing method of the gateway further comprises the following steps:
the second gateway internal module 103 performs edge calculation according to the key value corresponding to the key value name of the edge data.
In an embodiment of the present invention, the determining a key value name of data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area 101 includes:
the second gateway internal module 103 determines a key value name of data to be uploaded, which needs to be uploaded to the cloud, and reads a key value corresponding to the key value name of the data to be uploaded from the data sharing area 101;
the data processing method of the gateway further comprises the following steps:
the second gateway internal module 103 writes the key value corresponding to the key value name of the data to be uploaded into a message queue, and uploads the key value corresponding to the key value name of the data to be uploaded to the cloud through the message queue.
In an embodiment of the present invention, the gateway further includes: an internal interface 201;
the updating, according to the data to be shared, the key value corresponding to the key value name of the data to be shared in the data sharing area 101 includes:
according to the data to be shared, updating a key value corresponding to the key value name of the data to be shared in the data sharing area 101 through the internal interface 201;
the reading of the key value corresponding to the key value name of the data to be read from the data sharing area 101 includes:
and reading a key value corresponding to the key value name of the data to be read from the data sharing area 101 through the internal interface 201.
In an embodiment of the present invention, the gateway further includes: a hypertext transfer protocol based application programming interface 301;
the data processing method of the gateway further comprises the following steps:
an external software system reads any one of the key-value name and the key value from the data sharing area 101 through the application programming interface 301 based on the hypertext transfer protocol.
The gateway and the data processing method of the gateway provided by the invention at least have the following beneficial effects:
1. in the embodiment of the invention, the data sharing area is arranged in the gateway, the first gateway internal module can store the data to be shared into the data sharing area in a key value pair mode, and the second gateway internal module can directly read the data to be read from the data sharing area, so that the data interaction can be carried out between the gateway internal modules through the data sharing area without directly carrying out the data interaction, the decoupling between the gateway internal modules is realized, the operation of any gateway internal module does not need to depend on another gateway internal module, only the data required by the normal operation needs to be acquired from the data sharing area, and the gateway can be operated more flexibly.
2. In the embodiment of the invention, the data sharing area stores data in a key value pair mode, which does not occupy too much CPU and memory resources, can provide high-efficiency access performance, and does not cause the gateway to have obvious performance reduction.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A gateway, comprising:
a data sharing area (101) and at least two gateway internal modules;
at least one key value name is arranged in the data sharing area (101), and each key value name is provided with a corresponding key value;
a first gateway internal module (102) of the at least two gateway internal modules is configured to determine a key value name of data to be shared, and update a key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared;
a second gateway internal module (103) of the at least two gateway internal modules, configured to determine a key value name of data to be read, read a key value corresponding to the key value name of the data to be read from the data sharing area (101),
the data sharing area stores at least one key value name in advance, the first gateway internal module determines the key value name of the data to be shared from the at least one key value name, the second gateway internal module determines the key value name of the data to be read from the at least one key value name,
the first gateway internal module (102) is configured to generate a heartbeat signal of the cost module, determine a key value name of the heartbeat signal of the module, and update a key value corresponding to the key value name of the heartbeat signal in the data sharing area (101) according to the heartbeat signal of the module;
the second gateway internal module (103) is configured to determine a key value name of a heartbeat signal that needs to be read, and read a key value corresponding to the key value name of the heartbeat signal that needs to be read from the data sharing area (101).
2. The gateway according to claim 1,
the first gateway internal module (102) is configured to collect data of a programmable logic controller, determine a key value name of the data of the programmable logic controller, and update a key value corresponding to the key value name of the data of the programmable logic controller in the data sharing area (101) according to the data of the programmable logic controller.
3. The gateway according to claim 1,
the second gateway internal module (103) is configured to determine a key value name of script data required for executing a custom script, read a key value corresponding to the key value name of the script data from the data sharing area (101), and execute the custom script according to the key value corresponding to the key value name of the script data.
4. The gateway according to claim 1,
the second gateway internal module (103) is configured to determine a key value name of edge data required for performing edge calculation, read a key value corresponding to the key value name of the edge data from the data sharing area (101), and perform edge calculation according to the key value corresponding to the key value name of the edge data.
5. The gateway according to claim 1,
the second gateway internal module (103) is configured to determine a key value name of data to be uploaded, which needs to be uploaded to a cloud, read a key value corresponding to the key value name of the data to be uploaded from the data sharing area (101), write the key value corresponding to the key value name of the data to be uploaded into a message queue, and upload the key value corresponding to the key value name of the data to be uploaded to the cloud through the message queue.
6. Gateway according to any of claims 1-5,
further comprising: an internal interface (201);
the first gateway internal module (102), when executing the updating of the key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared, is configured to update, through the internal interface (201), the key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared;
the second gateway internal module (103) is configured to, when executing the reading of the key value corresponding to the key value name of the data to be read from the data shared area (101), read the key value corresponding to the key value name of the data to be read from the data shared area (101) through the internal interface (201).
7. Gateway according to any of claims 1-5,
further comprising: a hypertext transfer protocol based application programming interface (301);
an external software system can read any one of the key-value name and the key-value from the data sharing area (101) through the application programming interface (301) based on the hypertext transfer protocol.
8. A data processing method of a gateway is characterized by comprising the following steps:
the gateway includes: the gateway comprises a data sharing area (101) and at least two gateway internal modules, wherein at least one key value name is arranged in the data sharing area (101), and each key value name is provided with a corresponding key value;
a first gateway internal module (102) of the at least two gateway internal modules determines a key value name of data to be shared, and updates a key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared;
a second gateway internal module (103) of the at least two gateway internal modules determines a key value name of data to be read, reads a key value corresponding to the key value name of the data to be read from the data sharing area (101), wherein the data sharing area stores at least one key value name in advance, the first gateway internal module determines the key value name of the data to be shared from the at least one key value name, the second gateway internal module determines the key value name of the data to be read from the at least one key value name,
the first gateway internal module (102) generates a heartbeat signal of the first gateway internal module;
the determining a key value name of the data to be shared, and updating a key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared includes:
the first gateway internal module (102) determines a key value name of a heartbeat signal of the module, and updates a key value corresponding to the key value name of the heartbeat signal in the data sharing area (101) according to the heartbeat signal of the module;
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area (101) includes:
and the second gateway internal module (103) determines the key value name of the heartbeat signal needing to be read, and reads the key value corresponding to the key value name of the heartbeat signal needing to be read from the data sharing area (101).
9. The method of claim 8,
further comprising:
the first gateway internal module (102) collects data of the programmable logic controller;
the determining a key value name of the data to be shared, and updating a key value corresponding to the key value name of the data to be shared in the data sharing area (101) according to the data to be shared includes:
the first gateway internal module (102) determines a key value name of the data of the programmable logic controller, and updates a key value corresponding to the key value name of the data of the programmable logic controller in the data sharing area (101) according to the data of the programmable logic controller.
10. The method of claim 8,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area (101) includes:
the second gateway internal module (103) determines a key value name of script data required by executing a custom script, and reads a key value corresponding to the key value name of the script data from the data sharing area (101);
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module (103) executes the custom script according to the key value corresponding to the key value name of the script data.
11. The method of claim 8,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area (101) includes:
the second gateway internal module (103) determines a key value name of edge data required for edge calculation, and reads a key value corresponding to the key value name of the edge data from the data sharing area (101);
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module (103) performs edge calculation according to the key value corresponding to the key value name of the edge data.
12. The method of claim 8,
the determining a key value name of the data to be read, and reading a key value corresponding to the key value name of the data to be read from the data sharing area (101) includes:
the second gateway internal module (103) determines a key value name of data to be uploaded, which needs to be uploaded to the cloud, and reads a key value corresponding to the key value name of the data to be uploaded from the data sharing area (101);
the data processing method of the gateway further comprises the following steps:
and the second gateway internal module (103) writes the key values corresponding to the key value names of the data to be uploaded into a message queue, and uploads the key values corresponding to the key value names of the data to be uploaded to the cloud end through the message queue.
13. The method according to any one of claims 8 to 12,
the gateway further comprises: an internal interface (201);
the updating, according to the data to be shared, a key value corresponding to a key value name of the data to be shared in the data sharing area (101) includes:
according to the data to be shared, updating a key value corresponding to the key value name of the data to be shared in the data sharing area (101) through the internal interface (201);
the reading of the key value corresponding to the key value name of the data to be read from the data sharing area (101) includes:
and reading the key value corresponding to the key value name of the data to be read from the data sharing area (101) through the internal interface (201).
14. The method according to any one of claims 8 to 12,
the gateway further comprises: a hypertext transfer protocol based application programming interface (301);
the data processing method of the gateway further comprises the following steps:
an external software system reads any one of the key-value name and the key-value from the data sharing area (101) through the application programming interface (301) based on the hypertext transfer protocol.
CN201910597089.7A 2019-07-04 2019-07-04 Gateway and data processing method thereof Active CN110290062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910597089.7A CN110290062B (en) 2019-07-04 2019-07-04 Gateway and data processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910597089.7A CN110290062B (en) 2019-07-04 2019-07-04 Gateway and data processing method thereof

Publications (2)

Publication Number Publication Date
CN110290062A CN110290062A (en) 2019-09-27
CN110290062B true CN110290062B (en) 2021-12-28

Family

ID=68020520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910597089.7A Active CN110290062B (en) 2019-07-04 2019-07-04 Gateway and data processing method thereof

Country Status (1)

Country Link
CN (1) CN110290062B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107689914A (en) * 2017-08-28 2018-02-13 深圳通业科技股份有限公司 A kind of communication means for the Multifunctional gateway for supporting TRDP agreements
CN109656897A (en) * 2018-12-04 2019-04-19 郑州云海信息技术有限公司 Object storage gateway system and data calling method based on redis

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030131132A1 (en) * 2002-01-10 2003-07-10 Shih-An Cheng Method and system for a routing server for selecting a PSTN gateway
CN101374266A (en) * 2007-08-23 2009-02-25 华为技术有限公司 Data transmission and receiving method, wireless access point equipment, gateway and communication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107689914A (en) * 2017-08-28 2018-02-13 深圳通业科技股份有限公司 A kind of communication means for the Multifunctional gateway for supporting TRDP agreements
CN109656897A (en) * 2018-12-04 2019-04-19 郑州云海信息技术有限公司 Object storage gateway system and data calling method based on redis

Also Published As

Publication number Publication date
CN110290062A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
US11323519B2 (en) Internet of things pub-sub data publisher
US11825547B2 (en) System, method and apparatus for virtual building management
CN106843166B (en) Monitoring field devices via a communication network
US20200336925A1 (en) System, Method and Apparatus for Managing Disruption in a Sensor Network Application
US11812288B2 (en) System, method and apparatus for presentation of sensor information to a building control system
US10805399B2 (en) Data server unit and communication system including master-slave management circuitry
US11782946B2 (en) Automatic tag mapping and generation from data string
US20020124011A1 (en) Methods, systems, and computer program products for communicating with a controller using a database interface
Corotinschi et al. Enabling IoT connectivity for Modbus networks by using IoT edge gateways
CN104615067B (en) control device and control method
CN109839890B (en) Control device, control method, and computer-readable storage medium
EP3489776A1 (en) Control device, control method, and program
CN110290062B (en) Gateway and data processing method thereof
Ho et al. Implementation of dds cloud platform for real-time data acquisition of sensors
JP6832366B2 (en) Information storage device, information storage method and program
US6683553B1 (en) Mechanism for transmitting from a sensor assembly to an acquisition system a message that includes self-describing information
KR102104559B1 (en) Gateway Platform
JP2012185528A (en) State monitoring device for field apparatus
JP6359584B2 (en) Gateway device and data collection system
KR20220073692A (en) METHODS FOR ORGANIZING PROCESSING FLOW BY STEP OF BIG DATA TECHNOLOGY FOR INDUSTRIAL IoT SENSING STREAMING
WO2024004201A1 (en) Information processing device, information processing method, and program
CN114064391A (en) Distributed alarm or event information processing method and device
KR20230081753A (en) Integrated data processng appartus and method
CN117033474A (en) Event data acquisition method and device for bulk cargo port
CN117714312A (en) Information processing apparatus, information processing method, and computer-readable recording medium

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