CN113609220A - Data sharing method and device based on service chain cooperation - Google Patents

Data sharing method and device based on service chain cooperation Download PDF

Info

Publication number
CN113609220A
CN113609220A CN202110832164.0A CN202110832164A CN113609220A CN 113609220 A CN113609220 A CN 113609220A CN 202110832164 A CN202110832164 A CN 202110832164A CN 113609220 A CN113609220 A CN 113609220A
Authority
CN
China
Prior art keywords
data
consumer
service chain
change
queue
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
CN202110832164.0A
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.)
Wuhan Tianyu Education Technology Co ltd
Original Assignee
Wuhan Tianyu Education 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 Wuhan Tianyu Education Technology Co ltd filed Critical Wuhan Tianyu Education Technology Co ltd
Publication of CN113609220A publication Critical patent/CN113609220A/en
Pending legal-status Critical Current

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/2365Ensuring data consistency and integrity

Abstract

The invention provides a data sharing method and device based on service chain cooperation. The method comprises the following steps: receiving data sent by a data provider, pushing the data to a data writing queue, and writing the data in the data writing queue into a memory; receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue. The invention can share the data of the data provider to the data consumer, and realizes the data sharing among different service systems.

Description

Data sharing method and device based on service chain cooperation
Technical Field
The invention relates to the technical field of big data, in particular to a data sharing method and device based on service chain cooperation.
Background
In the prior art, basic data or service data of each service system of a platform are maintained independently, that is, information islands are formed among the service systems. When a service system needs to use data of other service systems, data sharing cannot be realized.
Disclosure of Invention
The invention mainly aims to provide a data sharing method and device based on service chain cooperation, and aims to solve the technical problem that data sharing cannot be realized among all service systems in a platform in the prior art.
In a first aspect, the present invention provides a data sharing method based on service chain coordination, where the data sharing method based on service chain coordination includes:
receiving data sent by a data provider, pushing the data to a data writing queue, and writing the data in the data writing queue into a memory;
receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue.
Optionally, the data sharing method based on service chain cooperation further includes:
when the data of the data provider is monitored to change, generating a change reminding message;
and sending the change reminding message to a data consumer.
Optionally, when it is monitored that data of the data provider changes, the step of generating a change reminding message includes:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
Optionally, the step of sending the change reminding message to a data consumer includes:
and sending the change reminding message to a data consumer subscribing the changed data.
Optionally, the data provider and the data consumer are different service systems in the same platform.
In a second aspect, the present invention further provides a data sharing apparatus based on service chain coordination, where the data sharing apparatus based on service chain coordination includes:
the write-in module is used for receiving data sent by a data provider, pushing the data to a data write-in queue and writing the data in the data write-in queue into a memory;
the sharing module is used for receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue so that the data consumer can read the target data from the data reading queue.
Optionally, the data sharing apparatus based on service chain coordination further includes a change reminding module, configured to:
when the data of the data provider is monitored to change, generating a change reminding message;
and sending the change reminding message to a data consumer.
Optionally, the change reminding module is configured to:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
Optionally, the change reminding module is configured to:
and sending the change reminding message to a data consumer subscribing the changed data.
Optionally, the data provider and the data consumer are different service systems in the same platform.
In the invention, data sent by a data provider is received, the data is pushed to a data writing queue, and the data in the data writing queue is written into a memory; receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue. The invention can share the data of the data provider to the data consumer, and realizes the data sharing among different service systems.
Drawings
FIG. 1 is a flowchart illustrating a data sharing method based on service chain coordination according to an embodiment of the present invention;
fig. 2 is a functional block diagram of a data sharing apparatus based on service chain coordination according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In a first aspect, an embodiment of the present invention provides a data sharing method based on service chain coordination.
In an embodiment, referring to fig. 1, fig. 1 is a flowchart illustrating a data sharing method based on service chain coordination according to an embodiment of the present invention. As shown in fig. 1, the data sharing method based on service chain coordination includes:
step S10, receiving data sent by a data provider, pushing the data to a data writing queue, and writing the data in the data writing queue into a memory;
in this embodiment, if the data of the service system a is subscribed by other service systems, the service system a is used as a data provider, and the other service systems subscribing to the data of the service system a are used as data consumers. The execution subject of the scheme of the embodiment is the server. The data sent by the data provider is received through the server, the data comprises basic data, user data and the like, the data is pushed to the data writing queue, and then the data written in the queue is written in the memory.
Step S20, receiving a subscription request sent by a data consumer, obtaining target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue.
In this embodiment, the server receives a subscription request sent by the data consumer, and the target data required by the data consumer can be determined through the subscription request. For example, the data consumer is a service system B, the server determines that target data required by the service system B is user data of the service system a according to a subscription request sent by the service system B, obtains the target data corresponding to the subscription request, for example, the user data of the service system a, from the memory, and then pushes the target data to the data reading queue, so that the data consumer can read the target data from the data reading queue. It should be noted that the target data corresponding to the subscription request is set according to actual needs. Thus, the data of the service system A can be shared to the service system B.
Further, in an embodiment, the data provider and the data consumer are different business systems in the same platform.
In this embodiment, if the service system a and the service system B in the same platform and the data of the service system a is subscribed by the service system B, the service system a is a data provider and the service system B is a data consumer.
In the embodiment, data sent by a data provider is received, the data is pushed to a data writing queue, and the data in the data writing queue is written into a memory; receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue. By the embodiment, the data of the data provider can be shared to the data consumer, and data sharing among different service systems is realized.
Further, in an embodiment, after step S20, the method further includes:
step S30, when the data of the data provider is monitored to change, a change reminding message is generated;
in this embodiment, when the data of the data provider needs to be changed, the data stored in the memory is changed through the corresponding instruction, when the change is completed, the server monitors that the data of the data provider stored in the memory changes, and generates a change reminding message according to the change.
Further, in one embodiment, step S30 includes:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
In this embodiment, it is considered that the changed data may not be subscribed by other service systems, that is, there is no data consumer, and it is not necessary to generate a change notification packet. Therefore, when the data of the data provider is monitored to change, whether a data consumer subscribing the changed data exists is detected, and only when the data consumer subscribing the changed data exists, a change reminding message is generated so as to send the change reminding message to the data consumer subscribing the changed data. Wherein, the data change includes but is not limited to: adding data, modifying data, and deleting data.
And step S40, sending the change reminding message to a data consumer.
In this embodiment, the change reminding message is sent to the data consumer, so that the data consumer can synchronously update the data of the data provider recorded at the local end according to the change reminding message, and consistency of the data at the two ends is ensured.
Further, in one embodiment, step S40 includes:
and sending the change reminding message to a data consumer subscribing the changed data.
In this embodiment, the data consumer that subscribes to the changed data is determined first, and then the change reminding message is sent to the data consumer that subscribes to the changed data.
Further, in one embodiment, a publish schema and a subscribe schema are provided. The resource aggregation and exchange service (server) follows the metadata specification and the data exchange specification, mainly providing centralized access and management of applications. The publishing mode is applicable to the data provider (platform subsystems or third party applications). When service data (such as user information, resource information and the like) of a data provider changes (is newly added, modified or deleted), an agent program assembles monitored data change information and change types into a message according to message specifications and sends the message to a data queue special channel of a resource convergence and exchange service, for example, the user information of a service system A is subscribed and shared by a service system B, the message comprises user information such as a user id, a user name and a user affiliated mechanism, when the user information of the service system A changes, the resource convergence and exchange service receives the message, checks a message format and analyzes the message, and pushes the checked data to a data consumer. The subscription mode is applicable to data consumers. The data consumer subscribes the required data through the resource aggregation and exchange service, and when the subscribed data is monitored to be changed, a corresponding message is generated according to the message specification and is sent to the data subscriber. After receiving the message, the data subscriber can consume the message and complete the data update of the database of the data subscriber. The data providing direction resource aggregation and exchange service submits a data exchange release application, generates a corresponding message, pushes data into a data queue and puts the data into a storage. And the data consuming side submits a subscription application to the resource gathering and exchanging service, calls the subscription API + service code, retrieves the data queue according to the subscription rule and returns a corresponding data message to the data consuming side.
In a second aspect, an embodiment of the present invention further provides a data sharing apparatus based on service chain coordination.
In an embodiment, referring to fig. 2, fig. 2 is a functional module diagram of an embodiment of a data sharing device based on service chain coordination according to the present invention. As shown in fig. 2, the data sharing apparatus based on service chain cooperation includes:
the write-in module 10 is configured to receive data sent by a data provider, push the data to a data write-in queue, and write data in the data write-in queue into a memory;
the sharing module 20 is configured to receive a subscription request sent by a data consumer, acquire target data corresponding to the subscription request from a memory, and push the target data to a data reading queue, so that the data consumer reads the target data from the data reading queue.
Further, in an embodiment, the data sharing apparatus based on service chain coordination further includes a change reminding module, configured to:
when the data of the data provider is monitored to change, generating a change reminding message;
and sending the change reminding message to a data consumer.
Further, in an embodiment, the change reminding module is configured to:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
Further, in an embodiment, the change reminding module is configured to:
and sending the change reminding message to a data consumer subscribing the changed data.
Further, in an embodiment, the data provider and the data consumer are different business systems in the same platform.
The implementation of the functions of each module in the data sharing apparatus based on service chain cooperation corresponds to each step in the data sharing method based on service chain cooperation, and the functions and implementation processes are not described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for causing a terminal device to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data sharing method based on service chain cooperation is characterized in that the data sharing method based on service chain cooperation comprises the following steps:
receiving data sent by a data provider, pushing the data to a data writing queue, and writing the data in the data writing queue into a memory;
receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue for the data consumer to read the target data from the data reading queue.
2. The data sharing method based on service chain coordination according to claim 1, wherein the data sharing method based on service chain coordination further comprises:
when the data of the data provider is monitored to change, generating a change reminding message;
and sending the change reminding message to a data consumer.
3. The data sharing method based on service chain coordination as claimed in claim 2, wherein the step of generating a change reminding message when the data of the data provider is monitored to be changed comprises:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
4. The data sharing method based on service chain coordination according to claim 3, wherein the step of sending the change reminding message to a data consumer comprises:
and sending the change reminding message to a data consumer subscribing the changed data.
5. The service chain collaboration based data sharing method as claimed in claim 1 wherein the data provider and the data consumer are different business systems in the same platform.
6. A data sharing apparatus based on service chain coordination, wherein the data sharing apparatus based on service chain coordination comprises:
the write-in module is used for receiving data sent by a data provider, pushing the data to a data write-in queue and writing the data in the data write-in queue into a memory;
the sharing module is used for receiving a subscription request sent by a data consumer, acquiring target data corresponding to the subscription request from a memory, and pushing the target data to a data reading queue so that the data consumer can read the target data from the data reading queue.
7. The data sharing device based on service chain coordination as claimed in claim 6, wherein the data sharing device based on service chain coordination further comprises a change reminding module for:
when the data of the data provider is monitored to change, generating a change reminding message;
and sending the change reminding message to a data consumer.
8. The data sharing apparatus based on service chain coordination according to claim 7, wherein the change reminding module is configured to:
when the data of a data provider is monitored to change, detecting whether a data consumer subscribing the changed data exists;
and if so, generating a change reminding message.
9. The data sharing apparatus based on service chain coordination according to claim 8, wherein the change reminding module is configured to:
and sending the change reminding message to a data consumer subscribing the changed data.
10. The service chain collaboration based data sharing apparatus as claimed in claim 6 wherein the data provider and the data consumer are different business systems in the same platform.
CN202110832164.0A 2021-06-29 2021-07-22 Data sharing method and device based on service chain cooperation Pending CN113609220A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110729184 2021-06-29
CN2021107291845 2021-06-29

Publications (1)

Publication Number Publication Date
CN113609220A true CN113609220A (en) 2021-11-05

Family

ID=78338110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110832164.0A Pending CN113609220A (en) 2021-06-29 2021-07-22 Data sharing method and device based on service chain cooperation

Country Status (1)

Country Link
CN (1) CN113609220A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319650A (en) * 2023-05-22 2023-06-23 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795689A (en) * 2012-10-29 2014-05-14 中兴通讯股份有限公司 Resource subscription method and device
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof
CN112527528A (en) * 2020-12-18 2021-03-19 平安科技(深圳)有限公司 Data transmission method, device and storage medium based on message queue

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795689A (en) * 2012-10-29 2014-05-14 中兴通讯股份有限公司 Resource subscription method and device
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof
CN112527528A (en) * 2020-12-18 2021-03-19 平安科技(深圳)有限公司 Data transmission method, device and storage medium based on message queue

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319650A (en) * 2023-05-22 2023-06-23 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane
CN116319650B (en) * 2023-05-22 2024-01-30 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane

Similar Documents

Publication Publication Date Title
RU2471227C2 (en) Peer-to-peer synchronisation assisted with service unit
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US8923823B1 (en) System for delivering and confirming receipt of notification messages across different notification media
US7933296B2 (en) Services for data sharing and synchronization
CN107026882B (en) Resource acquisition method and related equipment
US20080098014A1 (en) Method and system for data collection for alert delivery
CN110968586A (en) Distributed transaction processing method and device
CN106874334B (en) Data processing method and device and information processing system
CN114363407B (en) Message service method and device, readable storage medium and electronic equipment
US7869585B2 (en) Declarations for transformations within service sequences
CN107179940B (en) Task execution method and device
CN113609220A (en) Data sharing method and device based on service chain cooperation
CN101064692B (en) Method, apparatus and system for publishing present information
CN113766027B (en) Method and equipment for forwarding data by stream replication cluster node
WO2013119456A1 (en) Retrieving availability information from published calendars
CN112865927B (en) Message delivery verification method, device, computer equipment and storage medium
CN103747035A (en) Message middleware multi-target routing and copying technology based on rule
CN101506805A (en) Method and apparatus for multi-format data exchange
US20150039759A1 (en) Apparatus, method, and non-transitory computer readable storage medium thereof for controlling access of a resource
CN111090530B (en) Distributed inter-process communication bus system
CN114553666A (en) Channel event reporting method, system, device and storage medium
US20160188748A1 (en) Method for providing information to determine a graph associated with a data item
CN115442420A (en) Block chain cross-chain service management method and device
US10091627B2 (en) Text message handshaking and integration
CN113204436A (en) Message processing method, device, equipment and computer readable storage 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