CN115695512A - Data subscription method, system, equipment and storage medium based on micro-service architecture - Google Patents

Data subscription method, system, equipment and storage medium based on micro-service architecture Download PDF

Info

Publication number
CN115695512A
CN115695512A CN202211302727.6A CN202211302727A CN115695512A CN 115695512 A CN115695512 A CN 115695512A CN 202211302727 A CN202211302727 A CN 202211302727A CN 115695512 A CN115695512 A CN 115695512A
Authority
CN
China
Prior art keywords
data
service
sub
target
control
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
CN202211302727.6A
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.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202211302727.6A priority Critical patent/CN115695512A/en
Publication of CN115695512A publication Critical patent/CN115695512A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention relates to a data subscription method based on a micro-service architecture, which comprises the following steps: s1, the data agent service receives a subscription request for target data sent by an industrial control assembly; the subscription request comprises the resource type and the resource path of the target data, and the subscription request is in a global uniform format; s2, the data agent service searches a target sub-control service with target data of the resource type based on the registration information according to the resource type in the subscription request, and sends the subscription request to the target sub-control service; and S3, the data agent service receives the target data returned by the target sub-control service and forwards the target data to the industrial control component. The method of the invention improves the communication efficiency of the micro-service system and improves the expandability and maintainability of the micro-service system.

Description

Data subscription method, system, device and storage medium based on micro-service architecture
Technical Field
The present invention relates to the field of data subscription technologies, and in particular, to a data subscription method, system, device, and storage medium based on a micro service architecture.
Background
The microservice architecture is a software architecture that constructs applications into a series of autonomous sub-services that are modular by business domain. In the microservice architecture, each sub-service is self-contained and is used for realizing a single business function. The micro-service system under the micro-service architecture reduces the coupling of the whole system by decomposing functions into discrete sub-services, so as to improve the flexibility and the expandability of the whole micro-service system.
In the application scenario of the micro-service architecture, since the sub-services carry different service types, different communication protocols are often used for transmission of subscription data between the sub-services and an application on an upper layer. For the application of the upper layer, different communication protocols need to be used to respond to different service scenarios, and data subscription requests with different formats need to be sent to different sub-services. When a sub-service of a different service type is added, a communication protocol and a data subscription request format are correspondingly added to an application at an upper layer to be compatible with the new sub-service, which makes the maintenance of the application and the expansion of the micro-service system extremely cumbersome. In order to solve the above problems, the existing micro service architecture usually uses an API (Application Programming Interface) gateway as an access port for data unification between the sub-service and the upper layer Application, and the upper layer Application can communicate with the API gateway by using an arbitrary communication protocol; after receiving the data subscription request, the API gateway firstly analyzes the data subscription request with different formats sent by the upper application based on a communication protocol with the upper application; then, the data subscription request is analyzed, and corresponding sub-services are determined based on the service type of the data subscription request; then, the subscription request is sent to the corresponding sub-service for processing according to the communication protocol between the subscription request and the corresponding sub-service, and subscription data is obtained; and finally, according to a communication protocol between the subscription data and the upper-layer application, forwarding the subscription data to the upper-layer application. Although the upper layer application is liberated from a complicated communication protocol, the complex data conversion process of the API gateway limits the communication efficiency inside the micro service system and reduces the real-time performance of communication of the micro service system; in addition, for the API gateway, it must understand the protocol of each service type, and in practical applications, some API gateways use a hard coding mode to process different protocols, and some API gateways use a static routing table to configure the mapping relationship between the protocol and the sub-service. In either way, when the micro service system performs service adjustment or capacity expansion, the software code or the static routing table of the API gateway needs to be modified, which not only increases the maintenance burden of the micro service system, but also reduces the expandability and maintainability of the micro service system.
Disclosure of Invention
Technical problem to be solved
In view of the above drawbacks and deficiencies of the prior art, the present invention provides a data subscription method based on a micro service architecture, which solves the technical problems of low communication efficiency, poor expandability and poor maintainability of the existing micro service system.
(II) technical scheme
In order to achieve the purpose, the invention adopts the main technical scheme that:
in a first aspect, an embodiment of the present invention provides a data subscription method based on a micro service architecture, where the data subscription method is applied in an industrial control system environment, and is used for implementing subscription of an industrial control component to system data in an industrial control system, the micro service architecture includes the industrial control component, a data proxy service and a sub-control service, the data proxy service is in communication connection with the industrial control component and the sub-control service respectively, the data proxy service locally stores registration information of the sub-control service, and the registration information includes a local resource type of the sub-control service; the data subscription method comprises the following steps:
s1, the data proxy service receives a subscription request for target data sent by an industrial control assembly; the subscription request comprises the resource type and the resource path of the target data, and the subscription request is in a global uniform format;
s2, the data agent service searches a target sub-control service with target data of the resource type based on the registration information according to the resource type in the subscription request, and sends the subscription request to the target sub-control service;
and S3, the data agent service receives the target data returned by the target sub-control service and forwards the target data to the industrial control component.
According to the data subscription method provided by the embodiment of the invention, according to the registration information locally stored by the data proxy service, the resource type local to the sub-control service is counted in advance, and the unified format of describing the data resource in the micro-service system under the micro-service architecture, namely the unified format of the subscription request is specified, and the resource type and the resource path are required to be contained in the subscription request, so that the data proxy service can rapidly position the sub-control service corresponding to the subscription request according to the registration information locally stored by the data proxy service based on the resource type in the subscription request, and directly forward the subscription request to the sub-control service to obtain target data, thereby saving the process of format conversion of the subscription request, improving the communication efficiency of the micro-service system, and being particularly suitable for an application scenario which has small data flow rate and higher requirement on data real-time and is used for an industrial control system.
In addition, based on the registration information locally stored by the data agent service, when a newly expanded sub-control service joins the current micro-service system, the new sub-control service only needs to provide the local resource type to the data agent service during registration, so that the data agent service updates the locally stored registration information, and the compatibility of the data agent service to the new sub-control service can be completed, thereby greatly improving the expandability and maintainability of the micro-service system.
Optionally, the target data returned by the target sub-control service is: and the target sub-control service acquires data from the storage position specified by the resource path contained in the subscription request based on the subscription request sent by the data proxy service.
Optionally, in S1, the subscription request is a batch subscription request for multiple items of target data, where the batch subscription request includes a resource type and a resource path of each item of target data;
the S2 comprises the following steps: the data proxy service traverses the resource type corresponding to each item of target data according to the batch subscription request, searches a target sub-control service of the target data with the resource type based on the registration information, and distributes the resource type and the resource path corresponding to the item label data to the target sub-control service;
the S3 comprises the following steps: and the data agent service receives target data returned by all the target sub-control services and forwards the target data to the industrial control component.
Optionally, a format of the subscription request is a URI (Uniform Resource Identifier) format, where the URI format is defined as: resource type// resource path.
Optionally, the industrial Control component includes one or more of a DCS (Distributed Control System) real-time monitoring System, a DCS alarm System, an operation and maintenance management platform, and an intelligent instrument management System;
the resource types comprise one or more of real-time data resources, historical data resources, alarm data resources, diagnostic data resources and picture data resources;
the sub-control service includes one or more of a real-time data sub-service, a historical data sub-service, an alarm sub-service, a diagnostic sub-service, and a picture data sub-service.
Optionally, the registration information is a dynamic routing information table, where the dynamic routing information table includes an identification code of the sub-control service and a resource type local to the sub-control service;
the S2 comprises the following steps: and the data agent service searches the identity identification code of the target sub-control service with the target data of the resource type based on a dynamic routing information table according to the resource type in the subscription request, and sends the subscription request to the target sub-control service corresponding to the identity identification code according to the identity identification code.
Optionally, when the data proxy service receives a registration request of a new sub-control service, extracting an identity identifier of the new sub-control service and a resource type local to the sub-control service from the registration request, and adding the identity identifier of the sub-control service and the resource type local to the sub-control service to a dynamic routing information table;
when the data agent service receives a logout request of the registered sub-control service, the identity identification code of the registered sub-control service is extracted from the logout request, and the identity identification code and the resource type corresponding to the identity identification code are deleted from a dynamic routing information table.
In a second aspect, an embodiment of the present invention provides a microservice system, including:
the industrial control component is used for sending a subscription request for target data to the data proxy service module, the subscription request comprises a resource type and a resource path of the target data, and the subscription request is in a global unified format;
the data proxy service module locally stores registration information of at least one sub-control module, and the registration information comprises local resource types of the sub-control modules; the data agent service module is used for receiving the subscription request sent by the industrial control assembly, searching a target sub-control module with target data of the resource type based on the resource type contained in the subscription request, and sending the subscription request to the target sub-control module; receiving target data returned by the target sub-control module, and forwarding the target data to the industrial control component;
and the sub-control module is used for receiving the subscription request sent by the data agent service module and sending target data specified by the resource path to the data agent service module based on the resource path contained in the subscription request.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the microservice architecture-based data subscription method of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the steps of the data subscription method based on microservice architecture described in the first aspect.
(III) advantageous effects
According to the data subscription method provided by the embodiment of the invention, according to the registration information locally stored by the data proxy service, the resource type local to the sub-control service is counted in advance, and the unified format of describing the data resource in the micro-service system under the micro-service architecture, namely the unified format of the subscription request is specified, and the resource type and the resource path are required to be contained in the subscription request, so that the data proxy service can rapidly position the sub-control service corresponding to the subscription request according to the registration information locally stored by the data proxy service based on the resource type in the subscription request, and directly forward the subscription request to the sub-control service to obtain target data, thereby saving the process of format conversion of the subscription request, improving the communication efficiency of the micro-service system, and being particularly suitable for an application scenario which has small data flow rate and higher requirement on data real-time and is used for an industrial control system.
In addition, based on the registration information locally stored by the data agent service, when a newly expanded sub-control service joins the current micro-service system, the new sub-control service only needs to provide the local resource type to the data agent service during registration, so that the data agent service updates the locally stored registration information, and the compatibility of the data agent service to the new sub-control service can be completed, thereby greatly improving the expandability and maintainability of the micro-service system.
Drawings
Fig. 1 is a schematic flowchart of a data subscription method based on a micro service architecture provided in an embodiment;
FIG. 2 is a diagram of a microservice architecture provided in an embodiment;
FIG. 3 is a schematic diagram of another microservice architecture provided in an embodiment;
fig. 4 is a schematic format diagram of a subscription request in a URI format provided in the embodiment.
Detailed Description
For the purpose of better explaining the present invention and to facilitate understanding, the present invention will be described in detail by way of specific embodiments with reference to the accompanying drawings.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Example one
As shown in the flowchart of fig. 1, the present embodiment provides a data subscription method based on a microservice architecture, which can be applied in an industrial control system environment to implement subscription of an industrial control component to system data in an industrial control system. The system data can be data generated, transmitted, received or stored by industrial control equipment in an industrial control system, and the like.
As shown in fig. 2, the micro service architecture includes an industrial control component, a data proxy service, and a sub-control service, where the data proxy service is in communication connection with the industrial control component and the sub-control service, respectively, or the data proxy service is called to perform communication interaction with the industrial control component and the sub-control service, and the data proxy service locally stores registration information of the sub-control service, where the registration information includes a local resource type of the sub-control service. The industrial control assembly comprises one or more of a DCS real-time monitoring system, a DCS alarm system, an operation and maintenance management platform and an intelligent instrument management system; the sub-control service comprises one or more of a real-time data sub-service, a historical data sub-service, an alarm sub-service, a diagnostic sub-service, and a picture data sub-service.
The data subscription method provided by the embodiment comprises the following steps:
s1, the data agent service receives a subscription request for target data sent by an industrial control component. The subscription request comprises a resource type and a resource path of the target data, and the subscription request is in a global uniform format.
Specifically, the format of the subscription request may be a custom format, or may also be a URI format, where the URI format is defined as: resource type// resource path. The URI format is commonly used in the internet world to identify a resource. The embodiment creatively uses the target data specified by the industrial control component in the micro service system of the industrial control system to realize the quick positioning of the target data.
S2, the data proxy service searches a target sub-control service of target data with the resource type based on the registration information according to the resource type in the subscription request, and sends the subscription request to the target sub-control service.
Specifically, the registration information should include at least a resource type local to the child control service and identification information that can make the data proxy service recognize the child control service. Preferably, the registration information may be a dynamic routing information table, where the dynamic routing information table includes an identity of the sub-control service and a local resource type. Specifically, the ID may be an ID (Identity document), a serial number, or a UUID (Universally Unique Identifier) of the child control service.
It should be noted that the resource types should be in one-to-one correspondence with the service types of the sub-control services, and generally, under the micro-service architecture, only one service type is implemented by one sub-control service, and thus, only one local resource type is provided. For example, when the embodiment of the present invention is applied to an industrial control system environment and an industrial control component subscribes to system data in an industrial control system, the sub-control service includes: real-time data sub-service, historical data sub-service, alarm sub-service, diagnosis sub-service and picture data sub-service; correspondingly, the resource types include: real-time data resources, historical data resources, alarm data resources, diagnostic data resources, and picture data resources.
In this step, since the subscription request is in a global uniform format, after receiving the subscription request sent by the industrial control component, the data proxy service only needs to quickly determine the target sub-control service corresponding to the subscription request according to the resource type in the subscription request without understanding the specific content of the subscription request, and then directly forward the subscription request to the target sub-control service, so that the processing flow of the data proxy service can be effectively simplified, the working efficiency of the data proxy service is improved, and the communication efficiency of the micro-service system is further improved.
And S3, the data agent service receives the target data returned by the target sub-control service and forwards the target data to the industrial control component.
Specifically, the target data returned by the target sub-control service is: and the target sub-control service acquires data from the storage position specified by the resource path contained in the subscription request based on the subscription request sent by the data proxy service.
According to the data subscription method provided by the embodiment of the invention, according to the registration information locally stored by the data proxy service, the resource type local to the sub-control service is counted in advance, and the unified format of describing the data resource in the micro-service system under the micro-service architecture, namely the unified format of the subscription request is specified, and the resource type and the resource path are required to be contained in the subscription request, so that the data proxy service can rapidly position the sub-control service corresponding to the subscription request according to the registration information locally stored by the data proxy service based on the resource type in the subscription request, and directly forward the subscription request to the sub-control service to obtain target data, thereby saving the process of format conversion of the subscription request, improving the communication efficiency of the micro-service system, and being particularly suitable for an application scenario which has small data flow rate and higher requirement on data real-time and is used for an industrial control system.
Example two
In order to better understand the first embodiment, the present embodiment is based on a specific application scenario of an industrial control system, and is described in detail with reference to specific steps.
As shown in fig. 3, the micro service architecture includes an industrial control component, a data proxy service and a sub-control service, the data proxy service is in communication connection with the industrial control component and the sub-control service respectively, the data proxy service locally stores a dynamic routing information table, and the dynamic routing information table includes an identification code of the sub-control service and a local resource type. The industrial control assembly comprises a DCS real-time monitoring system and a DCS alarm system, and the sub-control services comprise real-time data sub-services, historical data sub-services, alarm sub-services, diagnosis sub-services and picture data sub-services. The resource types of the subscription data required by the DCS real-time monitoring system comprise real-time data resources, historical data resources, alarm data resources, diagnostic data resources and picture data resources, and the resource types of the subscription data required by the DCS alarm system comprise alarm data resources.
It should be noted that, the dynamic routing information table local to the data agent service is updated based on the registration request or the cancellation request of the sub-control service, specifically: when the data agent service receives a registration request of a new sub-control service, extracting an identification code and a local resource type of the new sub-control service from the registration request, and adding the identification code and the local resource type of the new sub-control service to a dynamic routing information table. When the data agent service receives a logout request of the registered sub-control service, the identity identification code of the registered sub-control service is extracted from the logout request, and the identity identification code and the resource type corresponding to the identity identification code are deleted from a dynamic routing information table.
Based on the registration mechanism of the data proxy service, when a newly expanded sub-control service is added into the current micro-service system, the new sub-control service only needs to provide the local resource type to the data proxy service during registration, so that the data proxy service updates the locally stored registration information, and the compatibility of the data proxy service to the new sub-control service can be completed, thereby greatly improving the expandability and maintainability of the micro-service system.
The data subscription method provided by the embodiment comprises the following steps:
s1, the data proxy service receives a subscription request in a URI format of target data, which is sent by an industrial control assembly; the subscription request includes a resource type and a resource path of the target data.
The definition of the URI format is: resource type// resource path. Specifically, the URI format subscription request string is shown in fig. 4, where var represents that the resource type is a real-time data resource. And the service types corresponding to the sub-control services comprise real-time data resources, historical data resources, alarm data resources, diagnostic data resources and picture data resources, and the resource types can be respectively expressed by characters var, history, alarm, diag and pic in a subscription request character string in a URI format. The resource path is used for positioning a path of target data, and the sub-control service can find corresponding target data according to the resource path.
In particular, the subscription request may be a batch subscription request for a plurality of items of target data, the batch subscription request including a plurality of subscription requests corresponding to each item of target data, each subscription request being in URI format.
S2, the data agent service searches and determines the identity identification code of the target sub-control service with the target data of the resource type based on a dynamic routing information table according to the resource type in the subscription request, and sends the subscription request to the target sub-control service corresponding to the identity identification code according to the identity identification code.
Particularly, when the subscription request is a batch subscription request, the data proxy service traverses the resource type corresponding to each item of target data according to the batch subscription request, searches for the target sub-control service of the target data with the resource type based on the registration information, and distributes the resource type and the resource path corresponding to the item data to the target sub-control service. It should be noted that, when the subscription request is a batch subscription request, resource types of some target data in the batch subscription request may be the same, that is, one sub-control service may receive multiple resource paths related to one batch subscription request, and when the sub-control service obtains multiple target data according to the multiple resource paths, the multiple target data may be integrated into one data packet and returned to the data proxy service, and the data proxy service directly forwards the data packet to the industrial control component, so as to improve network transmission efficiency.
And S3, the data agent service receives the target data returned by the target sub-control service and forwards the target data to the industrial control component. Wherein, the target data returned by the target sub-control service is: and the target sub-control service acquires data from the storage position specified by the resource path contained in the subscription request based on the subscription request sent by the data proxy service.
Particularly, when the corresponding subscription request is a batch subscription request, the data proxy service receives target data returned by all target sub-control services, and forwards the target data to the industrial control component.
EXAMPLE III
The embodiment provides a micro-service system which comprises an industrial control assembly, a data proxy service module and a plurality of sub-control modules. Specifically, the method comprises the following steps:
the industrial control component is used for sending a subscription request for the target data to the data proxy service module, and the subscription request comprises a resource type and a resource path of the target data. The industrial control assembly can be arranged in a plurality according to the requirements of users.
The data proxy service module locally stores registration information of at least one sub-control module, and the registration information comprises local resource types of the sub-control modules; the data agent service module is used for receiving the subscription request sent by the industrial control assembly, searching a target sub-control module with target data of the resource type based on the resource type contained in the subscription request, and sending the subscription request to the target sub-control module; and receiving target data returned by the target sub-control module, and forwarding the target data to the industrial control component.
And the sub-control module is used for receiving the subscription request sent by the data proxy service module and sending target data specified by the resource path to the data proxy service module based on the resource path contained in the subscription request. The number of the sub-control modules can be multiple according to specific service type equipment.
Specifically, the data agent service module and the sub-control module may be integrated in the same server, and the sub-control module is in communication connection with a DCS controller in the industrial control system, and the sub-control module directly obtains data of resource types required by the sub-control module from the DCS controller in advance and stores the data in a storage location agreed in advance, or the sub-control module obtains original data from the DCS controller, and stores the original data in the storage location agreed in advance after locally processing or processing the original data to convert the data into data of resource types required by the sub-control module, so that the sub-control module sends corresponding target data to the data agent service module in time according to a subscription request forwarded by the data agent service module.
The present embodiment also provides an electronic device, including: the data subscription method based on the microservice architecture comprises the following steps of a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the data subscription method based on the microservice architecture are realized.
The present embodiment also provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the data subscription method based on the microservice architecture according to the first embodiment or the second embodiment.
Since the system/apparatus described in the above embodiments of the present invention is a system/apparatus used for implementing the method of the above embodiments of the present invention, a person skilled in the art can understand the specific structure and modification of the system/apparatus based on the method described in the above embodiments of the present invention, and thus the detailed description is omitted here. All systems/devices employed in the method of the above embodiment of the present invention are within the scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third and the like are for convenience only and do not denote any order. These words are to be understood as part of the name of the component.
Furthermore, it should be noted that in the description of the present specification, the description of the term "one embodiment", "some embodiments", "examples", "specific examples" or "some examples", etc., means that a specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to 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. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, the claims should be construed to include preferred embodiments and all changes and modifications that fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include such modifications and variations.

Claims (10)

1. A data subscription method based on a micro-service architecture is characterized in that the data subscription method is applied to an industrial control system environment, and subscription of an industrial control assembly to system data in an industrial control system is realized; the micro-service architecture comprises an industrial control assembly, a data proxy service and a sub-control service, wherein the data proxy service is in communication connection with the industrial control assembly and the sub-control service respectively, the data proxy service locally stores registration information of the sub-control service, and the registration information comprises a local resource type of the sub-control service; the data subscription method comprises the following steps:
s1, the data proxy service receives a subscription request for target data sent by an industrial control assembly; the subscription request comprises the resource type and the resource path of the target data, and the subscription request is in a global uniform format;
s2, the data proxy service searches a target sub-control service of target data with the resource type based on the registration information according to the resource type in the subscription request, and sends the subscription request to the target sub-control service;
and S3, the data agent service receives the target data returned by the target sub-control service and forwards the target data to the industrial control component.
2. The data subscription method according to claim 1, wherein the target data returned by the target child control service is: and the target sub-control service acquires data from a storage position specified by the resource path contained in the subscription request based on the subscription request sent by the data proxy service.
3. The data subscription method according to claim 1, wherein in S1, the subscription request is a batch subscription request for a plurality of target data, the batch subscription request including a resource type and a resource path of each target data;
the S2 comprises: the data agent service traverses the resource type corresponding to each item of target data according to the batch subscription request, searches a target sub-control service of the target data with the resource type based on the registration information, and distributes the resource type and the resource path corresponding to the item label data to the target sub-control service;
the S3 comprises the following steps: and the data proxy service receives target data returned by all the target sub-control services and forwards the target data to the industrial control assembly.
4. The data subscription method according to claim 1, wherein the format of the subscription request is a URI format defined as: resource type// resource path.
5. The data subscription method of claim 1, wherein the industrial control component comprises one or more of a DCS real-time monitoring system, a DCS alarm system, an operation and maintenance management platform, and an intelligent instrument management system;
the resource types comprise one or more of real-time data resources, historical data resources, alarm data resources, diagnostic data resources and picture data resources;
the sub-control service comprises one or more of a real-time data sub-service, a historical data sub-service, an alarm sub-service, a diagnostic sub-service, and a picture data sub-service.
6. The data subscription method according to claim 1, wherein the registration information is a dynamic routing information table, and the dynamic routing information table includes an id of a sub-control service and a resource type local to the sub-control service;
the S2 comprises: and the data agent service searches the identity identification code of the target sub-control service with the target data of the resource type based on a dynamic routing information table according to the resource type in the subscription request, and sends the subscription request to the target sub-control service corresponding to the identity identification code according to the identity identification code.
7. The data subscription method according to claim 6,
when the data proxy service receives a registration request of a new sub-control service, extracting an identification code of the new sub-control service and a local resource type of the sub-control service from the registration request, and adding the identification code of the sub-control service and the local resource type of the sub-control service to a dynamic routing information table;
when the data agent service receives a logout request of the registered sub-control service, the identity identification code of the registered sub-control service is extracted from the logout request, and the identity identification code and the resource type corresponding to the identity identification code are deleted from a dynamic routing information table.
8. A microservice system, comprising:
the industrial control component is used for sending a subscription request for target data to the data proxy service module, the subscription request comprises a resource type and a resource path of the target data, and the subscription request is in a global unified format;
the data proxy service module locally stores registration information of at least one sub-control module, and the registration information comprises local resource types of the sub-control modules; the data agent service module is used for receiving the subscription request sent by the industrial control assembly, searching a target sub-control module with target data of the resource type based on the resource type contained in the subscription request, and sending the subscription request to the target sub-control module; receiving target data returned by the target sub-control module, and forwarding the target data to the industrial control component;
and the sub-control module is used for receiving the subscription request sent by the data proxy service module and sending target data specified by the resource path to the data proxy service module based on the resource path contained in the subscription request.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the microservice architecture-based data subscription method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the microservice architecture-based data subscription method according to any one of claims 1 to 7.
CN202211302727.6A 2022-10-24 2022-10-24 Data subscription method, system, equipment and storage medium based on micro-service architecture Pending CN115695512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211302727.6A CN115695512A (en) 2022-10-24 2022-10-24 Data subscription method, system, equipment and storage medium based on micro-service architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211302727.6A CN115695512A (en) 2022-10-24 2022-10-24 Data subscription method, system, equipment and storage medium based on micro-service architecture

Publications (1)

Publication Number Publication Date
CN115695512A true CN115695512A (en) 2023-02-03

Family

ID=85099477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211302727.6A Pending CN115695512A (en) 2022-10-24 2022-10-24 Data subscription method, system, equipment and storage medium based on micro-service architecture

Country Status (1)

Country Link
CN (1) CN115695512A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881571A (en) * 2023-07-27 2023-10-13 广东麦视互联网科技有限公司 Data mining method and system based on micro-service

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881571A (en) * 2023-07-27 2023-10-13 广东麦视互联网科技有限公司 Data mining method and system based on micro-service
CN116881571B (en) * 2023-07-27 2024-01-12 广东麦视互联网科技有限公司 Data mining method and system based on micro-service

Similar Documents

Publication Publication Date Title
CN102136933B (en) Equipment management method, middleware and machine communication platform, equipment and system
US10965718B2 (en) Method for providing wireless application privilege management
EP1542409B1 (en) Protocol for multi-hop ad-hoc networks
AU2002351015B2 (en) Method and device for defining objects allowing to establish a device management tree for mobile communication devices
US6708217B1 (en) Method and system for receiving and demultiplexing multi-modal document content
CN100499498C (en) A device, system and method for realizing MIB adaptation
KR102146884B1 (en) Chatting system, ChatBot Server Apparatus, ChatBot ID Managing Apparatus, Chatting Mediating Server Apparatus, Program, Chatting Method, and Chatting Mediating Method
EP1497966A1 (en) Method for implementing content delivery network (cdn) internetworking, respective networks and interface component
EP1036455A1 (en) Communications network
CN103534988A (en) Publish and subscribe messaging method and apparatus
CN115695512A (en) Data subscription method, system, equipment and storage medium based on micro-service architecture
US7693972B2 (en) Directory service in an automation system
US20100049804A1 (en) Instant Messaging
KR20210066114A (en) PROXY, METHOD FOR INTERWORKING BETWEEN HETEROGENEOUS IoT DEVICE AND IoT FLATFORM AND SYSTEM THE PROXY
JP2005143100A (en) Erp access method from mobile device
CN105991579B (en) Method for sending information, related network device and system
CN101257495B (en) Semantic message transmission method and communication system as well as message processing device
CN113301088B (en) Message processing method, device and system, electronic equipment and readable storage medium
Alaya et al. Semantic-aware IoT platforms
Millard et al. Reworking OHP: the road to OHP-Nav
CN105162618A (en) Device interconnection method and device interconnection system based on Smart PnP protocol
CN1980147A (en) Method for realizing integration of multi-standard management infor mation library of agent part
CN101534323A (en) Method for realizing adaptation and initiative of nomadic mission and nomadic calculation supporting platform
CN112954658B (en) Business card system suitable for data exchange of communication protocol layer and data exchange method
CN108848031A (en) Information transferring method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination