Data sharing method and data sharing system
By sensing and detecting the database status of the second service node in a distributed cluster, timely and effective sharing of target business data is achieved, solving the problem of complex operations in the process of data sharing and exchange among multiple departments, and improving the flexibility and timeliness of data sharing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BIG DATA CENT
- Filing Date
- 2022-11-23
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the process of data sharing and exchange between multiple departments is complicated, which increases the processing burden on relevant staff and makes it impossible for data requesters to obtain the required data resources in a timely manner, thus failing to guarantee the timeliness and effectiveness of data resource acquisition.
By detecting whether target business data exists in the first database through the second service node in the distributed cluster and performing environmental detection, the target business data is retrieved from the first database and aggregated into the second database when the network and database status are normal, and then pushed to the third service node to achieve data sharing.
It enables flexible, timely, and effective sharing of business data, reduces duplicate data pushes and resource waste, and improves data push efficiency and system reliability.
Smart Images

Figure CN115776491B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a data sharing method and a data sharing system. Background Technology
[0002] With the advancement of smart cities and the continued development of the data economy, data exchange and sharing among various parties have accelerated. The most crucial aspect of making a smart city operational is strengthening collaboration and coordination among multiple departments through data exchange and sharing.
[0003] Therefore, it is very important to achieve data sharing and application among multiple departments. Summary of the Invention
[0004] This disclosure aims to at least partially address one of the technical problems in the related art.
[0005] This disclosure proposes a data sharing method and a data sharing system. When updated and / or newly added target business data is detected in the first database in the second service node, the updated and / or newly added target business data is aggregated, thereby timely and effectively pushing the aggregated target business data to the second database. This enables the sharing of target business data and achieves flexibility, timeliness, and effectiveness in business data sharing.
[0006] The first aspect of this disclosure proposes a data sharing method applied to a first service node in a distributed cluster, the method comprising:
[0007] The first database in the second service node of the distributed cluster is sensed to sense whether target business data exists in the first database, wherein the target business data is business data that has been updated and / or newly added business data in the first database;
[0008] Environmental detection is performed on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database;
[0009] In response to the first network status being online, the first operating status being non-abnormal, and the target business data existing in the first database, the target business data is obtained from the first database and aggregated into the second database in the first service node;
[0010] The target business data stored in the second database is pushed to the third service node in the distributed cluster to achieve the sharing of the target business data.
[0011] Optionally, pushing the target business data stored in the second database to the third service node in the distributed cluster includes: performing environmental detection on the third service node to obtain second environmental detection information, wherein the second environmental detection information is used to indicate the second network status of the third service node and the second operating status of the third database in the third service node; and pushing the target business data stored in the second database to the third service node in response to the second network status being online and the second operating status being non-abnormal.
[0012] Optionally, the method further includes: in response to the second network state being offline and / or the second operating state being abnormal, caching the target service data in the target memory of the first service node; starting a timer; in response to the timer's runtime being equal to a set duration, re-performing an environment check on the third service node, so that if the re-checked environment check information of the third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal, pushing the target service data cached in the target memory to the third service node.
[0013] Optionally, the method further includes: in response to the second network state being offline and / or the second operating state being abnormal, periodically performing environmental detection on the third service node according to a set period, so as to push the target service data stored in the second database to the third service node when the environmental detection information of the re-detected third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal.
[0014] Optionally, the step of aggregating the target business data into the second database in the first service node includes: obtaining a reference file corresponding to the target business data, wherein the reference file contains reference business data; comparing the target business data with the reference business data in the reference file to determine whether there is any difference data in the target business data that is different from the reference business data; and in response to the fact that there is no difference data in the target business data, aggregating the target business data into the second database in the first service node.
[0015] Optionally, the method further includes: in response to the existence of the difference data in the target business data, generating modification prompt information based on the difference data, wherein the modification prompt information is used to prompt modification of the difference data in the target business data; displaying the modification prompt information; in response to an update operation on the target business data, updating the difference data in the target business data to obtain updated target business data; and aggregating the updated target business data into a second database in the first service node.
[0016] Optionally, the method further includes: in response to the existence of the difference data in the target service data, generating modification instruction information based on the difference data, wherein the modification instruction information is used to indicate the difference data in the target service data and to indicate that the difference data should be modified; sending the modification instruction information to a designated device; receiving update information sent by the designated device in response to the modification instruction information, and updating the difference data in the target service data based on the update information to obtain updated target service data; and aggregating the updated target service data into a second database in the first service node.
[0017] Optionally, the step of aggregating the target business data into the second database in the first service node includes: obtaining attribute information of the target business data; aggregating the target business data into the second database in the first service node when the attribute information indicates that the target business data is unconditionally shared; obtaining authorization information of the target business data when the attribute information indicates that the target business data is conditionally shared; and aggregating the target business data into the second database in the first service node when the authorization information indicates that the target business data is authorized to the third service node.
[0018] Optionally, the method further includes: sending an authorization prompt to the second service node when the authorization information indicates that the target service data is not authorized to the third service node; wherein the authorization prompt is used to prompt the second service node whether to authorize the target service data to the third service node; receiving authorization instruction information sent by the second service node; and in response to the authorization instruction information indicating that the target service data is authorized to the third service node, aggregating the target service data into the second database in the first service node.
[0019] Optionally, the step of sensing the first database in the second service node of the distributed cluster to sense whether target business data exists in the first database includes: obtaining the log file of the first database in the second service node of the distributed cluster and parsing the log file to determine whether target business data exists in the first database; or, determining whether business data associated with the target event exists in the first database in the second service node of the distributed cluster, and in response to the existence of business data associated with the target event in the first database, determining that the target business data exists in the first database.
[0020] Optionally, the method further includes: in response to pushing the first service data in the target service data in the second database to the third service node, marking the first service data in the second database; obtaining the second service data without marking from the target service data in the second database; and pushing the second service data to the third service node.
[0021] A second aspect of this disclosure provides a data sharing system including a distributed cluster, wherein the distributed cluster includes a first service node, a second service node, and a third service node:
[0022] The first service node is used to execute the data sharing method described in the first aspect of this disclosure;
[0023] The second service node is used to provide target business data; wherein, the target business data is updated business data and / or newly added business data in the first database of the second service node;
[0024] The third service node is used to receive the target service data.
[0025] A third aspect of this disclosure provides a data sharing apparatus, the apparatus comprising:
[0026] The perception module is used to perceive the first database in the second service node of the distributed cluster, so as to perceive whether the target business data exists in the first database, wherein the target business data is the business data that has been updated and / or the newly added business data in the first database;
[0027] The detection module is used to perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0028] The first processing module is configured to, in response to the first network status being online, the first operating status being non-abnormal, and the target business data existing in the first database, retrieve the target business data from the first database and aggregate the target business data into the second database in the first service node;
[0029] The first push module is used to push the target business data stored in the second database to the third service node in the distributed cluster, so as to realize the sharing of the target business data.
[0030] A fourth aspect of this disclosure provides an electronic device including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the data sharing method as described in the first aspect.
[0031] A fifth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the data sharing method as described in the first aspect.
[0032] A sixth aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the data storage method described in the first aspect of this disclosure.
[0033] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0034] By sensing the first database in the second service node of the distributed cluster to detect the existence of target business data in the first database, where the target business data refers to updated and / or newly added business data in the first database; performing environmental detection on the second service node to obtain first environmental detection information, which indicates the first network status of the second service node and the first operating status of the first database; responding to the first network status being online, the first operating status being non-abnormal, and the existence of target business data in the first database, the target business data is retrieved from the first database and aggregated into the second database in the first service node; and the target business data stored in the second database is pushed to the third service node in the distributed cluster to achieve target business data sharing. Therefore, by driving the aggregation of updated and / or newly added target business data in the first database of the second service node when it is sensed, and thus timely and effectively pushing the aggregated target business data to the second database, target business data sharing can be achieved, realizing the flexibility, timeliness, and effectiveness of business data sharing.
[0035] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0036] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0037] Figure 1 This is a schematic diagram of the architecture of an information resource sharing and exchange platform.
[0038] Figure 2 A schematic diagram illustrating the implementation process of data sharing and exchange;
[0039] Figure 3 This is a flowchart illustrating the data sharing method provided in Embodiment 1 of this disclosure;
[0040] Figure 4 This is a flowchart illustrating the data sharing method provided in Embodiment 2 of this disclosure;
[0041] Figure 5 This is a flowchart illustrating the data sharing method provided in Embodiment 3 of this disclosure;
[0042] Figure 6 This is a flowchart illustrating the data sharing method provided in Embodiment 4 of this disclosure;
[0043] Figure 7 This is a schematic diagram of the data aggregation process provided in this disclosure;
[0044] Figure 8 This is a schematic diagram of the structure of a data sharing device provided in the fifth embodiment of this disclosure;
[0045] Figure 9 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present invention is shown. Detailed Implementation
[0046] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0047] Currently, data sharing among multiple departments is achieved based on data sharing and exchange platforms (also known as information resource sharing and exchange platforms). By establishing standardized and orderly information exchange and sharing mechanisms, the shared application of data among departments can be realized.
[0048] The information resource sharing and exchange platform consists of a central data exchange system, a central data exchange service management system, departmental exchange node server software, a departmental bridging service management subsystem, and a departmental exchange management client. For example, the architecture of the information resource sharing and exchange platform can be as follows: Figure 1 As shown in the image.
[0049] The central data exchange service management system supports the big data center in visually monitoring and managing the data resource sharing and exchange platform, including exchange process management, service management, resource management, data tracking, log management, statistical analysis, audit management, and authorization management. Through authorization from the big data center, it can provide departmental users with services such as process orchestration, data tracking, exchange rule auditing, exchange resource catalog, and exchange service catalog.
[0050] An information resource sharing and exchange platform may include a data layer, an application support layer, a business application layer, and an access layer.
[0051] The data layer is a crucial foundational component of the information resource sharing and exchange platform. It includes basic information databases, monitoring and management information databases, exchange and management information databases, service information databases, resource management databases, log management databases, audit management databases, query and statistics databases, and system management databases, all of which support the information resource sharing and exchange platform.
[0052] The application support layer serves as the middleware layer supporting business application systems, including chart display services, operating systems, database management software, application servers, and Office middleware.
[0053] The business application layer includes basic information, monitoring and management information, exchange and management information, service information, resource management, log management, audit management, query and statistics, and system management, providing business application services based on the data provided by the data layer.
[0054] At the access layer, departmental users can access the site via a Web (World Wide Web) browser.
[0055] The technical approach adopted by the information resource sharing and exchange platform is as follows:
[0056] (1) The server-side and client-side development adopts the Java technology system.
[0057] The software development for both the server and client sides of the information resource sharing and exchange platform adopts the Java technology system to maintain system consistency.
[0058] (2) The server uses an open-source database and lightweight server software.
[0059] The server-side database system can use Oracle, and the system deployment uses the lightweight open-source server software Tomcat.
[0060] (3) Network access technology
[0061] Establish a designated external network within the system, allowing access to the server system via this network for daily data sharing and exchange, while maintaining the consistency of backend data.
[0062] The information resource sharing and exchange platform adopts a B / S (Browser / Server) model, and the implementation process for data sharing and exchange between departments is designed as follows: Figure 2 As shown, after the data requester submits a data sharing application, it needs to be reviewed and approved at each level, including the project leader, department head, and department head. After the department head approves the application, the project leader communicates the technical requirements and data specifications for data sharing and exchange with both the data requester and the data provider. The data provider sets the data provision method, data format, and exchange frequency, while the data requester sets the data reception method and data integration rules. Once the above communication is successful, the project leader implements the data sharing and exchange, where the data provider provides data access information, and the data requester receives this information. After receiving the data access information, the data requester can provide feedback and confirmation on the results of the sharing and exchange.
[0063] In summary, the data sharing and exchange process between the aforementioned departments is cumbersome, increasing the processing burden on relevant staff. Furthermore, data requesters cannot obtain the necessary data resources in a timely manner, failing to guarantee the timeliness and effectiveness of data resource acquisition.
[0064] Therefore, in response to the aforementioned problems, this disclosure proposes a data sharing method and a data sharing system.
[0065] The data sharing method and data sharing system of embodiments of this disclosure are described below with reference to the accompanying drawings.
[0066] Figure 3 This is a flowchart illustrating the data sharing method provided in Embodiment 1 of this disclosure.
[0067] The data sharing method of this disclosure can be applied to the first service node in a distributed cluster.
[0068] like Figure 3 As shown, the data sharing method may include the following steps:
[0069] Step 301: Sensing the first database in the second service node of the distributed cluster to determine whether the target business data exists in the first database.
[0070] The target business data can be updated business data and / or newly added business data in the first database.
[0071] In this embodiment of the disclosure, the second service node may be equipped with a first database, which can be used to store business data. The first database may be, for example, an SQL Server (Structured Query Language Server) database, an Oracle database, etc., and this disclosure does not impose any limitations on it.
[0072] In this embodiment of the disclosure, the first database in the second service node of the distributed cluster can be sensed to detect whether target business data exists in the first database.
[0073] As one possible implementation, the log file of the first database in the second service node of the distributed cluster can be obtained and parsed to determine whether the target business data exists in the first database.
[0074] For example, taking the first database as an example of the SQL Server database, log files (such as transaction logs) can be obtained from the SQL Server database in the second service node of the distributed cluster. The obtained transaction logs can be parsed to determine whether there is updated business data and / or newly added business data in the SQL Server database, that is, to determine whether the target business data exists in the SQL Server database.
[0075] As another possible implementation, it can be determined from the first database in the second service node of the distributed cluster whether there is business data associated with the target event. In response to the existence of business data associated with the target event in the first database, it can be determined that the target business data exists in the first database.
[0076] The target event can be a data increment event, such as a data update event or a data insert event. This disclosure does not impose any restrictions on this.
[0077] As an example, a trigger can be predefined to listen to the first database in the second service node of the distributed cluster. When the trigger listens to the target event in the first database, it can be determined that there is business data associated with the target event in the first database, thus confirming the existence of the target business data in the first database.
[0078] As another possible implementation, the Change Data Capture (CDC) tool can be used to detect the first database in the second service node of the distributed cluster, so as to detect whether the target business data exists in the first database.
[0079] Specifically, the Change Data Acquisition Tool (CDC) can monitor and capture changes in business data in the first database within the second service node of the distributed cluster. It can also record change information of business data in the first database and transmit this information to a message queue middleware. Thus, if the first service node subscribes to the message queue middleware, it can obtain change information of business data from the middleware and determine whether the business data has been updated and / or whether new business data has been added based on the change information. If it is determined that the business data has been updated and / or new business data has been added, it can be determined that the target business data exists in the first database.
[0080] Step 302: Perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0081] In this embodiment of the disclosure, the first network state of the second service node may include an online state and an offline state.
[0082] In this embodiment of the disclosure, the first operating state of the first database can be used to indicate whether the first database can be read, written, updated, deleted, etc. normally. The first operating state can include abnormal state and non-abnormal state. For example, in a non-abnormal state, the first database can be read, written, updated, deleted, etc. normally, while in an abnormal state, the first database may not be able to be read, written, updated, or deleted normally.
[0083] In this embodiment of the disclosure, environmental detection can be performed on the second service node to obtain first environmental detection information. This first environmental detection information can be used to indicate the first network status of the second service node and the first operating status of the first database.
[0084] It should be noted that this disclosure does not restrict the execution order of steps 301 and 302. That is, step 301 can be executed in parallel with step 302, or step 302 can be executed before step 301. This disclosure only provides an example of step 301 occurring before step 302.
[0085] Step 303: In response to the first network status being online, the first running status being non-abnormal, and the existence of target business data in the first database, the target business data is obtained from the first database and aggregated into the second database in the first service node.
[0086] In this embodiment of the disclosure, the first service node in the distributed cluster may be configured with a second database, such as an SQL Server database or an Oracle database, and this disclosure does not limit this.
[0087] In this embodiment of the disclosure, when the first network status is online, the first operating status is non-abnormal, and the target business data exists in the first database, the target business data can be obtained from the first database in the second service node, and the target business data can be aggregated into the second database in the first service node.
[0088] It should be noted that the target business data can be obtained from the first database in real time, or it can be obtained from the first database at a set time. This disclosure does not impose any restrictions on this.
[0089] The set time is a pre-defined time, such as 7:00 every day, 8:30 every Monday, or 3:20 on the first of every month.
[0090] It should be noted that the above examples of setting time are merely illustrative. In practical applications, the setting time can be configured as needed, and this disclosure does not impose any restrictions on it.
[0091] As one possible approach, the time setting can be configured based on the actual needs of the data provider (such as the second service node) or the data requester (such as the third service node).
[0092] Step 304: Push the target business data stored in the second database to the third service node in the distributed cluster to achieve the sharing of the target business data.
[0093] In this embodiment of the disclosure, the first service node can push the target business data stored in the second database to the third service node in the distributed cluster, thereby enabling the sharing of the target business data.
[0094] In this scenario, all target business data can be pushed to the third service node at once, or, if the amount of target business data is large, the target business data can be pushed to the third service node in batches.
[0095] As one possible implementation, when pushing target business data from the second database to the third service node, if the first business data from the target business data has already been pushed to the third service node, the first business data in the second database can be marked, for example, by marking that the first business data has been shared. Thus, when pushing data to the third service node in the future, the unmarked second business data can be obtained from the target business data in the second database, and the second business data can be pushed to the third service node to avoid duplicate transmission of business data.
[0096] Therefore, by marking the target business data in the second database, the sharing status of the target business data can be determined. Based on this sharing status, unshared target business data can be identified from the second database, and then pushed to the third service node. On one hand, this avoids pushing already shared target business data to the third service node, reducing resource waste during data push. On the other hand, if the first service node crashes, or the instance on the first service node used for pushing target business data crashes or migrates, the unmarked business data can be retrieved from the second database after the instance restarts. This avoids retrieving already shared business data (i.e., marked business data) from the second database when the device crashes or the instance migrates, preventing duplicate data pushes. This improves data push efficiency, reduces resource consumption, and achieves the goal of resuming interrupted data transmission.
[0097] As an example, taking the first service node as the data resource sharing and exchange platform, the second service node as the front-end machine corresponding to the data provider, and the third service node as the front-end machine corresponding to the data receiver (or data requester) for illustrative purposes, the data resource sharing and exchange platform can sense the first database on the front-end machine corresponding to the data provider to detect whether there is updated and / or newly added target business data in the first database; and the data resource sharing and exchange platform can perform environmental detection on the front-end machine corresponding to the data provider to obtain first environmental detection information, wherein the first environmental detection information can be used to indicate the first network status and first data of the front-end machine of the data provider. The first operating state of the database; when the first network state is online, the first operating state is non-abnormal, and the target business data exists in the first database, that is, the front-end machine corresponding to the data provider is online, the first operating state of the first database in the front-end machine corresponding to the data provider is non-abnormal, and the target business data that has been updated and / or added exists in the first database, the target business data can be obtained from the first database, and the target business data can be aggregated into the second database in the data resource sharing and exchange platform; and the target business data stored in the second database can be pushed to the front-end machine corresponding to the data receiver, thereby realizing the sharing of target business data.
[0098] The data sharing method of this disclosure embodiment senses the first database in the second service node of the distributed cluster to detect whether target business data exists in the first database, wherein the target business data is updated and / or newly added business data in the first database; performs environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database; in response to the first network status being online, the first operating status being non-abnormal, and the existence of target business data in the first database, the target business data is obtained from the first database and aggregated into the second database in the first service node; the target business data stored in the second database is pushed to the third service node in the distributed cluster to achieve the sharing of target business data. Therefore, by sensing the existence of updated and / or newly added target business data in the first database in the second service node, the method drives the aggregation of updated and / or newly added target business data, thereby timely and effectively pushing the target business data aggregated into the second database, achieving the sharing of target business data and realizing the flexibility, timeliness, and effectiveness of business data sharing.
[0099] To clearly illustrate how the target business data stored in the second database is pushed to the third service node in the distributed cluster in the above embodiments of this disclosure, this disclosure also proposes a data sharing method.
[0100] Figure 4 This is a flowchart illustrating the data sharing method provided in Embodiment 2 of this disclosure.
[0101] like Figure 4 As shown, the data sharing method may include the following steps:
[0102] Step 401: Sensing the first database in the second service node of the distributed cluster to determine whether the target business data exists in the first database.
[0103] Step 402: Perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0104] Step 403: In response to the first network status being online, the first running status being non-abnormal, and the existence of target business data in the first database, the target business data is obtained from the first database and aggregated into the second database in the first service node.
[0105] The execution process of steps 401 to 403 can be found in the execution process of any embodiment of this disclosure, and will not be described in detail here.
[0106] Step 404: Perform environmental detection on the third service node to obtain second environmental detection information, wherein the second environmental detection information is used to indicate the second network status of the third service node and the second operating status of the third database in the third service node.
[0107] In this embodiment of the disclosure, the first network state of the third service node may include an online state and an offline state.
[0108] In this embodiment of the disclosure, the second operating state of the third database may include an abnormal state and a non-abnormal state.
[0109] In this embodiment of the disclosure, environmental detection can be performed on the third service node to obtain second environmental detection information. This second environmental detection information can be used to indicate the second network status of the third service node and the second operating status of the third database within the third service node.
[0110] Step 405: In response to the second network status being online and the second running status being non-abnormal, push the target business data stored in the second database to the third service node.
[0111] In this embodiment of the disclosure, when the second network status of the third service node is online and the second operating status of the third database in the third service node is non-abnormal, the target business data stored in the second database can be pushed to the third service node.
[0112] It is understandable that in practical applications, there may be situations where the second network status of the third service node is offline, and / or the second operating status of the third database in the third service node is abnormal.
[0113] As one possible implementation of this disclosure, when the second network state is offline and / or the second operating state is abnormal, the target service data can be cached in the target memory of the first service node, and a timer can be started simultaneously or synchronously. When the timer's runtime is equal to the set duration, the environment of the third service node can be re-detected. If the re-detected environment detection information of the third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal, the target service data cached in the target memory can be pushed to the third service node.
[0114] In the embodiments of this disclosure, the set duration can be a preset duration, such as 10 seconds, 1 minute, 2 minutes, etc., and this disclosure does not limit it.
[0115] In summary, when the second network state is offline and / or the second operating state is abnormal, targeted storage of the target business data can, on the one hand, prevent the loss of the target business data, and on the other hand, when the environment of the third service node is re-detected and the re-detected environment detection information of the third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal, the target business data that has not yet been pushed to the third service node can be accurately and conveniently retrieved from the target memory.
[0116] As another possible implementation of this disclosure, when the second network state is offline and / or the second operating state is abnormal, the third service node can be periodically tested according to a set period, so that when the environmental test information of the retested third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal, the target business data stored in the second database can be pushed to the third service node.
[0117] In the embodiments of this disclosure, the set period can be a pre-set period, such as 10s, 20s, 1min, etc., and this disclosure does not limit it.
[0118] In summary, when the second network state is offline and / or the second operating state is abnormal, the third service node is periodically tested for environment until the environment test information of the third service node indicates that the network state of the third service node is online and the operating state of the third database is not abnormal. Only then can the target business data stored in the second database be pushed to the third service node, so as to avoid the situation where the target business data cannot be effectively pushed to the third service node, thereby improving the timeliness and effectiveness of business data push.
[0119] The data sharing method of this disclosure embodiment performs environmental detection on a third service node to obtain second environmental detection information. This second environmental detection information indicates the second network status of the third service node and the second operating status of the third database within the third service node. In response to the second network status being online and the second operating status being non-abnormal, target service data stored in the second database is pushed to the third service node. Therefore, before pushing the target service data stored in the second database to the third service node, environmental detection is performed on the third service node. This ensures that the target service data is pushed to the third service node only after confirming that the third service node's network status is online and the third database within the third service node is operating normally. This avoids situations where the third service node cannot receive the target service data, and / or avoids situations where the third service node receives the target service data but cannot store it, thereby achieving effective push of the target service data.
[0120] To clearly illustrate how target business data is aggregated into the second database in the first service node in any embodiment of this disclosure, this disclosure also proposes a data sharing method.
[0121] Figure 5 This is a flowchart illustrating the data sharing method provided in Embodiment 3 of this disclosure.
[0122] like Figure 5 As shown, the data sharing method may include the following steps:
[0123] Step 501: Sensing the first database in the second service node of the distributed cluster to determine whether the target business data exists in the first database.
[0124] Step 502: Perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0125] Step 503: In response to the first network status being online, the first running status being non-abnormal, and the target business data existing in the first database, the target business data is retrieved from the first database.
[0126] The execution process of steps 501 to 503 can be found in the execution process of any embodiment of this disclosure, and will not be described in detail here.
[0127] Step 504: Obtain the reference file corresponding to the target business data, wherein the reference file contains reference business data.
[0128] In this embodiment of the disclosure, a reference file corresponding to the target business data can be obtained. The reference file may contain reference business data, which contains business data with correct format and content.
[0129] Step 505: Compare the target business data with the reference business data in the reference file to determine whether there is any data difference between the target business data and the reference business data.
[0130] In this embodiment of the disclosure, the target service data can be compared with the reference service data in the reference file, thereby determining whether there is any difference data in the target service data that is different from the reference service data.
[0131] Step 506: In response to the absence of discrepancies in the target business data, the target business data is aggregated into the second database in the first service node.
[0132] In this embodiment of the disclosure, when there is no discrepancy data in the target business data, the target business data can be aggregated into the second database in the first service node.
[0133] It should be noted that the target business data can also be manually reviewed to determine whether the content of the target business data is correct. If the content of the target business data is confirmed to be correct by manual review, the target business data can be aggregated into the second database in the first service node.
[0134] It is understandable that in practical applications, there may be situations where there are discrepancies in the target business data. Therefore, in one possible implementation of this disclosure, when there are discrepancies in the target business data, modification prompt information can be generated based on the discrepancies. This modification prompt information can be used to prompt for modification of the discrepancies in the target business data and can be displayed. In response to an update operation on the target business data, the discrepancies in the target business data can be updated to obtain updated target business data. Thus, the updated target business data can be aggregated into the second database in the first service node.
[0135] As an example, when discrepancies exist in the target business data, the first service node can generate modification prompts based on these discrepancies. These prompts can be used to instruct relevant personnel at the first service node to modify the discrepancies in the target business data and can be displayed to them. After the relevant personnel at the first service node update the target business data according to the modification prompts, the first service node can respond to the update operation by updating the discrepancies in the target business data to obtain the updated target business data. This updated target business data can then be aggregated into the second database within the first service node.
[0136] In another possible implementation of this disclosure, when there is discrepancy data in the target service data, modification instruction information can be generated based on the discrepancy data. The modification instruction information can be used to indicate the discrepancy data in the target service data and to indicate the modification of the discrepancy data. The modification instruction information can be sent to a designated device. The device can also receive update information sent in response to the modification instruction information. The device can update the discrepancy data in the target service data based on the update information to obtain the updated target service data. The updated target service data is then aggregated into the second database in the first service node.
[0137] In this embodiment of the disclosure, the designated device can be a pre-specified device.
[0138] As an example, when discrepancies exist in the target business data, the first service node can generate modification instructions based on these discrepancies. These instructions can be used to indicate the discrepancies in the target business data and to modify them. The first service node can send these instructions to a designated device. After the designated device's personnel confirm that the discrepancies in the target business data can be modified based on these instructions, the designated device can send update information to the first service node, indicating that the personnel have updated the discrepancies in the target business data. Correspondingly, the first service node can receive this update information and update the discrepancies in the target business data accordingly, resulting in updated target business data. The updated target business data can then be aggregated into the second database within the first service node.
[0139] For example, the aforementioned contact person can be the data provider, and the designated device can be the second service node.
[0140] Therefore, updating the discrepancies in the target business data before aggregating it into the second database in the first service node can improve the accuracy of the target business data aggregating into the second database and enable the data recipient using the target business data to obtain the correct business data, thus allowing the data recipient to interpret and use the correct business data.
[0141] Step 507: Push the target business data stored in the second database to the third service node in the distributed cluster to achieve the sharing of the target business data.
[0142] The execution process of step 507 can be found in any embodiment of this disclosure, and will not be described in detail here.
[0143] The data sharing method of this disclosure involves obtaining a reference file corresponding to target business data, wherein the reference file contains reference business data; comparing the target business data with the reference business data in the reference file to determine whether there is any data in the target business data that differs from the reference business data; and, in response to the absence of any data discrepancies in the target business data, aggregating the target business data into a second database in a first service node. Therefore, before the target business data is aggregated into the second database in the first service node, effective detection of the target business data can be achieved, thereby improving the accuracy of the business data aggregated into the second database.
[0144] As one possible implementation of this disclosure, in order to clearly illustrate how target business data is aggregated to the second database in the first service node in any embodiment of this disclosure, this disclosure also proposes a data sharing method.
[0145] Figure 6 This is a flowchart illustrating the data sharing method provided in Embodiment 4 of this disclosure.
[0146] like Figure 6 As shown, the data sharing method may include the following steps:
[0147] Step 601: Sensing the first database in the second service node of the distributed cluster to determine whether the target business data exists in the first database.
[0148] Step 602: Perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0149] Step 603: In response to the first network status being online, the first running status being non-abnormal, and the target business data existing in the first database, the target business data is retrieved from the first database.
[0150] The execution process of steps 601 to 603 can be found in the execution process of any embodiment of this disclosure, and will not be described in detail here.
[0151] Step 604: Obtain the attribute information of the target business data.
[0152] In this embodiment of the disclosure, the attribute information of the target business data can be used to indicate whether the target salesperson's data can be shared. The attribute information may include, for example, conditional sharing or unconditional sharing, and this disclosure does not limit it.
[0153] In this embodiment of the disclosure, attribute information of the target business data can be obtained.
[0154] Step 605: If the attribute information indicates that the target business data is unconditionally shared, the target business data is aggregated into the second database in the first service node.
[0155] In this embodiment of the disclosure, when the attribute information indicates that the target business data is unconditionally shared, the target business data can be aggregated into the second database in the first service node.
[0156] Step 606: If the attribute information indicates that the target business data can be conditionally shared, obtain the authorization information of the target business data.
[0157] In this embodiment of the disclosure, the authorization information of the target service data can be used to indicate whether the target service data can be authorized to a third service node.
[0158] In this embodiment of the disclosure, when the attribute information indicates that the target business data is conditionally shared, the authorization information of the target business data can be obtained.
[0159] Step 607: If the authorization information indicates that the target business data is authorized to the third service node, the target business data is aggregated into the second database in the first service node.
[0160] In this embodiment of the disclosure, when the authorization information indicates that the target business data is authorized to the third service node, the target business data can be aggregated into the second database in the first service node.
[0161] As one possible implementation of this disclosure, when the authorization information indicates that the target business data is not authorized to the third service node, an authorization prompt message can be sent to the second service node, and an authorization instruction message sent by the second service node can be received. The authorization prompt message can be used to prompt the second service node whether to authorize the target business data to the third service node; the authorization instruction message can be used to indicate whether to authorize the target business data to the third service node. When the authorization instruction message indicates that the target business data is authorized to the third service node, the target business data can be aggregated into the second database in the first service node. Conversely, when the authorization instruction message indicates that the target business data is not authorized to the third service node, it is not necessary to aggregate the target business data into the second database in the first service node.
[0162] It should be noted that this disclosure does not restrict the execution order of steps 605 and 606-607. That is, step 605 can be executed in parallel with steps 606-607, or step 605 can be executed after steps 606-607. This disclosure does not restrict this.
[0163] Step 608: Push the target business data stored in the second database to the third service node in the distributed cluster to achieve the sharing of target business data.
[0164] The execution process of step 608 can be found in any embodiment of this disclosure, and will not be described in detail here.
[0165] As an example, consider data sharing processes such as Figure 7 The example shown illustrates a data resource sharing and exchange platform, referred to as the first service node in this disclosure. The data sharing process may include the following steps:
[0166] (i) Detecting the existence of updated and / or newly added target business data
[0167] Optionally, the Change Data Acquisition (CDC) tool provided by SQL Server, Oracle and other systems can be used to detect the first database on the front-end machine of the department corresponding to the data provider (referred to as the second service node in this disclosure) to detect whether there is any updated and / or newly added target business data.
[0168] Optionally, transaction logs from SQL Server, Oracle, and other systems can be retrieved and analyzed to determine if there is any updated / added target business data.
[0169] Optionally, a trigger can be predefined to listen to the first database. When the trigger listens to the target event in the first database, it is determined that there is business data in the first database associated with the target event, thus confirming the existence of the target business data in the first database.
[0170] Optionally, the database or table can be compared with historical versions of the database or table based on the timestamp to detect whether there is any updated and / or newly added target business data.
[0171] (II) Data Aggregation
[0172] Optionally, the first service node can retrieve updated and / or newly added target business data from the first database at a set time (e.g., 9:00 AM daily, 8:30 AM every Monday) provided by the data provider.
[0173] After acquiring the target business data, the target business data can be aggregated into the second database of the first service node.
[0174] Optionally, the target business data can be audited, for example, by manual auditing or machine auditing. For example, a reference file corresponding to the target business data can be obtained, wherein the reference file contains reference business data; the target business data is compared with the reference business data in the reference file to determine whether there is any data difference between the target business data and the reference business data; in response to the fact that there is no data difference in the target business data, the target business data can be aggregated into the second database in the first service node.
[0175] Optionally, when there are discrepancies in the target business data, the first service node can generate modification prompts based on the discrepancies. These prompts can be used to notify relevant personnel that the discrepancies in the target business data need to be modified, and can be displayed to them. After the relevant personnel update the target business data according to the modification prompts, the first service node, in response to the update operation, can update the discrepancies in the target business data to obtain the updated target business data. This updated target business data can then be aggregated into the second database within the first service node.
[0176] Optionally, when discrepancies exist in the target business data, the first service node can generate modification instructions based on these discrepancies. These instructions can be used to indicate the discrepancies in the target business data and to modify them. The first service node can send these instructions to a designated device (e.g., the front-end server of the department corresponding to the data provider). After the designated device's personnel confirm that the discrepancies in the target business data can be modified according to the instructions, the designated device can send update information to the first service node, indicating that the personnel have updated the discrepancies in the target business data. Correspondingly, the first service node can receive this update information and update the discrepancies in the target business data accordingly, resulting in updated target business data. This updated target business data can then be aggregated into the second database within the first service node.
[0177] Optionally, attribute information of the target business data can be obtained; if the attribute information indicates that the target business data is unconditionally shared, the target business data can be aggregated into the second database in the first service node; if the attribute information indicates that the target business data is conditionally shared, authorization information of the target business data can be obtained; if the authorization information indicates that the target business data is authorized to a third service node, the target business data can be aggregated into the second database in the first service node.
[0178] Optionally, if the authorization information indicates that the target business data is not authorized to the third service node, an authorization prompt information can be sent to the second service node; wherein, the authorization prompt information is used to prompt the second service node whether to authorize the target business data to the third service node; and the second service node can receive the authorization instruction information sent by the second service node; in response to the authorization instruction information indicating that the target business data is authorized to the third service node, the target business data can be aggregated into the second database in the first service node.
[0179] As an example, let's take the manual review of target business data as an example, such as... Figure 7As shown, the data provider updates the data in the first database in its corresponding front-end machine and defines the data aggregation method. Then, it can send a data aggregation request to the data resource sharing and exchange platform. Upon detecting updated and / or newly added target business data, the data resource sharing and exchange platform obtains the target business data and determines whether it has received the data aggregation request. In response to the data resource sharing and exchange platform's personnel confirming receipt of the data aggregation request and logging into the target data system (referred to as the second database in this disclosure), the platform can send the data aggregation request to the data aggregation technical personnel. The data aggregation technical personnel can receive the request and review the target business data. If the target business data is found to be identical, data aggregation can be implemented. If the target business data is found to be different, the review results can be fed back to the data provider for modification and improvement. Furthermore, the data catalog system can modify and save the aggregation and sharing status of the target business data aggregated into the data catalog system.
[0180] (III) Environmental Monitoring for Data Reception
[0181] To enhance the effectiveness of data push, before pushing target business data, upon detecting the existence of target business data, an environment detection can be triggered on the department front-end machine that applied for and authorized the use of the target business data resource, i.e., the department front-end machine corresponding to the data recipient (referred to as the third service node in this disclosure), to obtain second environment detection information. The second environment detection information is used to indicate the second network status of the third service node and the second operating status of the third database in the third service node.
[0182] (iv) Multi-departmental collaboration and data sharing
[0183] When the second network status is online and the second operating status is not abnormal, the target business data aggregated and stored in the second database can be pushed to the third service node.
[0184] Therefore, it can replace the traditional polling mechanism and ensure the timeliness of data sharing and exchange, enabling the timely sharing of data that has been implemented on the data resource sharing and exchange platform with other departments.
[0185] In summary, the data sharing method disclosed herein can improve the timeliness of data sharing and reduce the performance pressure on the front-end machines of various departments.
[0186] The data sharing method of this disclosure involves obtaining attribute information of target business data; when the attribute information indicates that the target business data is to be shared, aggregating the target business data into a second database in a first service node; when the attribute information indicates that the target business data is not to be shared, obtaining authorization information of the target business data; and when the authorization information indicates that the target business data is authorized to a third service node, aggregating the target business data into the second database in the first service node. Therefore, by simultaneously using the attribute information and authorization information of the target business data, the method can effectively aggregate the target business data and prevent the push of target business data to unauthorized users, thereby improving the security of the business data.
[0187] To further illustrate the above embodiments, this disclosure also provides a data sharing system. This data sharing system may include a distributed cluster, wherein the distributed cluster includes a first service node, a second service node, and a third service node.
[0188] The first service node is used to execute the data sharing method proposed in any of the above embodiments of this disclosure;
[0189] The second service node is used to provide target business data; wherein, the target business data is the updated business data and / or newly added business data in the first database of the second service node;
[0190] The third service node is used to receive target business data.
[0191] Optionally, the exchange control operations can be performed visually through the first service node, including the management of exchange nodes, data sources, data standards, mappings, exchange tasks, and scheduling.
[0192] The exchange nodes communicate with each other through a Web Service interface, exchanging command and configuration data, and can also transmit business data via HTTP (Hypertext Transfer Protocol), SFTP (Secret File Transfer Protocol), and messaging.
[0193] Data source management is used to determine the source and format of exchanged data. By configuring information such as IP (Internet Protocol Address), port, username, and password, it can call the JDBC (Java Database Connectivity) interface to extract database metadata, thereby achieving unified management of data resources of all access platforms.
[0194] Mapping management can provide data synchronization and loading rules between business sources and targets.
[0195] The data exchange task management is used to manage and maintain data exchange tasks, and to create and customize task templates.
[0196] Scheduling management is used to trigger the execution of exchange tasks at regular intervals, enabling data extraction, encryption, and transmission.
[0197] Optionally, data exchange strategies such as periodic exchange and real-time exchange are supported.
[0198] Among them, regular exchanges can be configured by pre-defining planned task templates and configuring tasks on cycles such as seconds, minutes, hours, days, weeks, months, and years. The tasks can be automatically triggered after the data is updated. For exchange requirements with high real-time requirements, the platform uses database triggers, timestamp thresholds, data snapshot comparisons, log monitoring and analysis to monitor database changes in real time and trigger the exchange process.
[0199] The switching process can support various data transmission functions such as resume interrupted transmission, encrypted transmission, automatic compression, and flow control to adapt to different network environments.
[0200] With the above Figures 3 to 6 Corresponding to the data sharing method provided in the embodiments, this disclosure also provides a data sharing device. Because the data sharing device provided in the embodiments of this disclosure is similar to the one described above… Figures 3 to 6 The data sharing method provided in the embodiments corresponds to the data sharing device provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.
[0201] Figure 8 This is a schematic diagram of the structure of a data sharing device provided in the fifth embodiment of this disclosure.
[0202] like Figure 8 As shown, the data sharing device 800 may include: a sensing module 801, a detection module 802, a first processing module 803, and a first push module 804.
[0203] The perception module 801 is used to perceive the first database in the second service node of the distributed cluster, so as to perceive whether the target business data exists in the first database. The target business data is the updated business data and / or newly added business data in the first database.
[0204] The detection module 802 is used to perform environmental detection on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database.
[0205] The first processing module 803 is used to retrieve the target business data from the first database and aggregate the target business data into the second database in the first service node when the first network status is online, the first running status is non-abnormal, and the target business data exists in the first database.
[0206] The first push module 804 is used to push the target business data stored in the second database to the third service node in the distributed cluster, so as to realize the sharing of the target business data.
[0207] In one possible implementation of this disclosure, the first push module 804 is configured to: perform environmental detection on the third service node to obtain second environmental detection information, wherein the second environmental detection information is used to indicate the second network status of the third service node and the second operating status of the third database in the third service node; and push the target business data stored in the second database to the third service node in response to the second network status being online and the second operating status being non-abnormal.
[0208] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0209] The caching module is used to cache the target service data to the target memory of the first service node in response to the second network state being offline and / or the second running state being abnormal.
[0210] Enable module, used to start the timer.
[0211] The second processing module is used to re-detect the environment of the third service node in response to the timer's runtime being equal to the set duration. If the re-detected environment detection information of the third service node indicates that the network status of the third service node is online and the running status of the third database is not abnormal, the module will push the target business data cached in the target memory to the third service node.
[0212] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0213] The third processing module is used to periodically perform environmental detection on the third service node according to a set period in response to the second network status being offline and / or the second operating status being abnormal. When the environmental detection information of the third service node indicates that the network status of the third service node is online and the operating status of the third database is not abnormal, the module pushes the target business data stored in the second database to the third service node.
[0214] In one possible implementation of this disclosure, the first processing module 803 is configured to: obtain a reference file corresponding to the target business data, wherein the reference file contains reference business data; compare the target business data with the reference business data in the reference file to determine whether there is any difference data in the target business data that is different from the reference business data; and, in response to the absence of difference data in the target business data, aggregate the target business data into the second database in the first service node.
[0215] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0216] The first generation module is used to respond to the existence of discrepancies in the target business data and generate modification prompts based on the discrepancies. The modification prompts are used to suggest that the discrepancies in the target business data be modified.
[0217] The display module is used to show modification prompts.
[0218] The first update module is used to respond to the update operation on the target business data, update the difference data in the target business data, and obtain the updated target business data.
[0219] The first aggregation module is used to aggregate the updated target business data to the second database in the first service node.
[0220] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0221] The second generation module is used to generate modification instruction information based on the difference data in response to the existence of difference data in the target business data. The modification instruction information is used to indicate the difference data in the target business data and to indicate that the difference data should be modified.
[0222] The first sending module is used to send modification instruction information to the designated device.
[0223] The fourth processing module is used to receive the update information sent by the designated device in response to the modification instruction information, and update the difference data in the target service data according to the update information to obtain the updated target service data.
[0224] The second aggregation module is used to aggregate the updated target business data into the second database in the first service node.
[0225] In one possible implementation of this disclosure, the first processing module 803 is configured to: obtain attribute information of the target business data; when the attribute information indicates that the target business data is unconditionally shared, aggregate the target business data to the second database in the first service node; when the attribute information indicates that the target business data is conditionally shared, obtain authorization information of the target business data; and when the authorization information indicates that the target business data is authorized to a third service node, aggregate the target business data to the second database in the first service node.
[0226] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0227] The second sending module is used to send an authorization prompt message to the second service node when the authorization information indicates that the target service data has not been authorized to the third service node; wherein the authorization prompt message is used to prompt the second service node whether to authorize the target service data to the third service node.
[0228] The receiving module is used to receive authorization instruction information sent by the second service node.
[0229] The third aggregation module is used to aggregate the target business data into the second database in the first service node in response to the authorization instruction information indicating that the target business data is authorized to the third service node.
[0230] In one possible implementation of this disclosure, the perception module 801 is configured to: obtain the log file of the first database in the second service node of the distributed cluster, and parse the log file to determine whether the target business data exists in the first database; or, determine whether the target event-related business data exists in the first database in the second service node of the distributed cluster, and determine that the target business data exists in the first database in response to the existence of the target event-related business data in the first database.
[0231] In one possible implementation of this disclosure, the data sharing device 800 further includes:
[0232] The second push module is used to respond to pushing the first business data in the target business data of the second database to the third service node, and to mark the first business data in the second database.
[0233] The acquisition module is used to acquire untagged second business data from the target business data in the second database.
[0234] The third push module is used to push the second business data to the third service node.
[0235] The data sharing device of this embodiment senses the existence of target business data in the first database of the second service node in the distributed cluster. The target business data refers to updated and / or newly added business data in the first database. The device performs environmental detection on the second service node to obtain first environmental detection information, which indicates the first network status of the second service node and the first operating status of the first database. In response to the first network status being online, the first operating status being non-abnormal, and the existence of target business data in the first database, the device retrieves the target business data from the first database and aggregates it into the second database of the first service node. The device then pushes the target business data stored in the second database to the third service node in the distributed cluster to achieve target business data sharing. Therefore, by sensing the existence of updated and / or newly added target business data in the first database of the second service node, the device drives the aggregation of updated and / or newly added target business data, thereby timely and effectively pushing the aggregated target business data to the second database. This achieves flexibility, timeliness, and effectiveness in business data sharing.
[0236] To implement the above embodiments, the present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the data sharing method proposed in any of the foregoing embodiments of the present invention.
[0237] To implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium storing a computer program thereon, characterized in that the program, when executed by a processor, implements the data sharing method proposed in any of the foregoing embodiments of the present invention.
[0238] To implement the above embodiments, the present invention also proposes a computer program product, which, when the instructions in the computer program product are executed by a processor, performs the data sharing method as proposed in any of the foregoing embodiments of the present invention.
[0239] According to embodiments of the present invention, the present invention also provides an electronic device, a non-transitory computer-readable storage medium, and a computer program product.
[0240] like Figure 9 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0241] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0242] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0243] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 9 Not shown; usually referred to as a "hard drive"). Although Figure 9 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0244] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0245] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0246] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.
[0247] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0248] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0249] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0250] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0251] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0252] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0253] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0254] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A data sharing method, applied to the first service node in a distributed cluster, characterized in that, The method includes: The first database in the second service node of the distributed cluster is sensed to sense whether target business data exists in the first database, wherein the target business data is business data that has been updated and / or newly added business data in the first database; Environmental detection is performed on the second service node to obtain first environmental detection information, wherein the first environmental detection information is used to indicate the first network status of the second service node and the first operating status of the first database; In response to the first network status being online, the first operating status being non-abnormal, and the target business data existing in the first database, the target business data is obtained from the first database and aggregated into the second database in the first service node; The target business data stored in the second database is pushed to the third service node in the distributed cluster to achieve the sharing of the target business data; The step of sensing the first database in the second service node of the distributed cluster to detect whether target business data exists in the first database includes: Obtain the log file of the first database in the second service node of the distributed cluster, and parse the log file to determine whether the target business data exists in the first database; or, From the first database in the second service node of the distributed cluster, determine whether there is business data associated with the target event; in response to the existence of business data associated with the target event in the first database, determine that the target business data exists in the first database. The step of aggregating the target business data into the second database in the first service node includes: Obtain the attribute information of the target business data; When the attribute information indicates that the target business data is conditionally shared, obtain the authorization information of the target business data; When the authorization information indicates that the target business data is authorized to the third service node, the target business data is aggregated into the second database in the first service node.
2. The method according to claim 1, characterized in that, The step of pushing the target business data stored in the second database to the third service node in the distributed cluster includes: Environmental detection is performed on the third service node to obtain second environmental detection information, wherein the second environmental detection information is used to indicate the second network status of the third service node and the second operating status of the third database in the third service node; In response to the second network status being online and the second operating status being non-abnormal, the target business data stored in the second database is pushed to the third service node.
3. The method according to claim 2, characterized in that, The method further includes: In response to the second network state being offline and / or the second operating state being abnormal, the target service data is cached in the target memory of the first service node; Start the timer; In response to the timer's runtime being equal to the set duration, the environment of the third service node is re-detected. If the re-detected environment detection information of the third service node indicates that the network status of the third service node is online and the operation status of the third database is not abnormal, the target business data cached in the target memory is pushed to the third service node.
4. The method according to claim 2, characterized in that, The method further includes: In response to the second network status being offline and / or the second operating status being abnormal, the third service node is periodically subjected to environmental detection according to a set period. If the environmental detection information of the third service node indicates that the network status of the third service node is online and the operating status of the third database is not abnormal, the target service data stored in the second database is pushed to the third service node.
5. The method according to claim 1, characterized in that, The step of aggregating the target business data into the second database in the first service node includes: Obtain a reference file corresponding to the target business data, wherein the reference file contains reference business data; The target business data is compared with the reference business data in the reference file to determine whether there is any difference data in the target business data that is different from the reference business data; In response to the absence of the discrepancy data in the target business data, the target business data is aggregated into the second database in the first service node.
6. The method according to claim 5, characterized in that, The method further includes: In response to the existence of the discrepancy data in the target business data, a modification prompt message is generated based on the discrepancy data, wherein the modification prompt message is used to prompt the modification of the discrepancy data in the target business data; Display the modification prompt information; In response to the update operation on the target service data, the difference data in the target service data is updated to obtain the updated target service data; The updated target business data is aggregated into the second database in the first service node.
7. The method according to claim 5, characterized in that, The method further includes: In response to the existence of the discrepancy data in the target service data, modification instruction information is generated based on the discrepancy data, wherein the modification instruction information is used to indicate the discrepancy data in the target service data and to indicate that the discrepancy data should be modified; Send the modification instruction information to the designated device; The system receives update information sent by the designated device in response to the modification instruction information, and updates the difference data in the target service data according to the update information to obtain the updated target service data. The updated target business data is aggregated into the second database in the first service node.
8. The method according to claim 1, characterized in that, The method further includes: when the attribute information indicates that the target business data is unconditionally shared, aggregating the target business data into a second database in the first service node.
9. The method according to claim 8, characterized in that, The method further includes: If the authorization information indicates that the target service data is not authorized to the third service node, an authorization prompt message is sent to the second service node; wherein, the authorization prompt message is used to prompt the second service node whether to authorize the target service data to the third service node; Receive authorization instruction information sent by the second service node; In response to the authorization instruction information indicating that the target business data is authorized to the third service node, the target business data is aggregated into the second database in the first service node.
10. The method according to any one of claims 1-9, characterized in that, The method further includes: In response to pushing the first business data from the target business data in the second database to the third service node, the first business data in the second database is marked. Obtain untagged second business data from the target business data in the second database; The second business data is pushed to the third service node.
11. A data sharing system, characterized in that, This includes a distributed cluster, wherein the distributed cluster comprises a first service node, a second service node, and a third service node: Wherein, the first service node is used to execute the method as described in any one of claims 1-10; The second service node is used to provide target business data; wherein, the target business data is updated business data and / or newly added business data in the first database of the second service node; The third service node is used to receive the target service data.
Citation Information
Patent Citations
Distributed shared file system based on block storage
CN106815298A
Data synchronization method and device
CN111241194A