An oil and gas data synchronization method and related device for a data publishing system

By independently synchronizing oil and gas data through the target database and combining the discrimination mechanism of data release time and unit name, the problem of data synchronization efficiency and accuracy in Changqing Oilfield has been solved, achieving efficient and stable data synchronization and simplifying system complexity and operation and maintenance costs.

CN122152931APending Publication Date: 2026-06-05PETROCHINA CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2024-12-03
Publication Date
2026-06-05

Smart Images

  • Figure CN122152931A_ABST
    Figure CN122152931A_ABST
Patent Text Reader

Abstract

The application discloses an oil and gas data synchronization method for a data publishing system and related devices, writes data publishing time corresponding to a unit name without data publishing time in a synchronization log into the synchronization log from a source database; screens out units with data publishing time and without data synchronization start time from the synchronization log; synchronizes data corresponding to each screened unit in the source database to a target database, and writes data synchronization start time into the synchronization log; judges whether data publishing time of each unit in the source database is consistent with data publishing time written in the synchronization log; if yes, data synchronization ends, and if not, updates data of inconsistent units in the target database. The application independently completes a synchronization task by the target database, does not need the source database to participate, and synchronizes and updates data based on comprehensive discrimination of data publishing time, data synchronization start time and the unit name, so that the efficiency and accuracy of data synchronization are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information technology for oil and gas production, specifically relating to a method and related apparatus for synchronizing oil and gas data for a data publishing system. Background Technology

[0002] The Oil, Gas and Water Well Production Data Management System (A2) collects and manages all oil and gas production data of the oilfield company, playing a crucial supporting role in exploration deployment, development plan adjustments, and production dynamic analysis. However, due to poor network link quality and the large volume of statistical data for research and analysis, Changqing Oilfield's self-built information system cannot directly utilize the Beijing A2 database. Therefore, a data synchronization method is needed to achieve efficient synchronization of databases over private networks, over long distances, and with a data publishing mechanism.

[0003] Regarding data synchronization, currently disclosed methods mainly include updating data by packaging it, or writing data by monitoring the source database and comparing it with the target database. For example, patent CN108647237A discloses a data synchronization method between heterogeneous relational databases. It uses a web application server to encapsulate the data to be synchronized from the source database and then transmits it to the target database in the form of a jar file. This method requires the deployment of an additional complex application service, which increases the complexity of the system and the cost of operation and maintenance. Furthermore, it does not consider how to determine the scope of data synchronization based on certain identifiers, which may affect the efficiency and accuracy of data synchronization. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides an oil and gas data synchronization method and related apparatus for a data publishing system. The target database independently completes the synchronization task without the participation of the source database. Data synchronization and updates are performed based on a comprehensive judgment of data publishing time, data synchronization start time, and unit name, ensuring the efficiency and accuracy of data synchronization.

[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: According to a first aspect of the present invention, a method for synchronizing oil and gas data for a data publishing system is provided, comprising: Trigger synchronization log initialization, and write the current date and the unit name of the data to be synchronized into the synchronization log; Write the data release time corresponding to the unit name that has a data release time in the source database but no data release time in the synchronization log into the synchronization log. The data release time refers to the time within the current date. Filter the units in the synchronization log that have data publication time but no data synchronization start time; Synchronize the data corresponding to each selected unit in the source database to the target database, and write the data synchronization start time to the synchronization log. Once the data synchronization of each unit in the source database is complete, it is determined whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log. If they are consistent, the data synchronization ends; if they are inconsistent, the data of the inconsistent units in the target database is updated.

[0006] In one possible implementation of the first aspect, the updating of inconsistent units in the target database specifically involves: Starting from the synchronization date, iterate in reverse chronological order, comparing the data release time of inconsistent units in the source database with the data release time written in the synchronization log, until two dates with the same data release time are found, and that date is determined to be the earliest date with inconsistent data release times; Starting from the earliest date where the data release time is inconsistent, synchronize the data corresponding to the inconsistent units from the source database to the target database one day at a time in ascending date order, until the current date.

[0007] In one possible implementation of the first aspect, while synchronizing data corresponding to inconsistent units from the source database to the target database daily in ascending date order, it also includes: Update the data release time and data synchronization start time corresponding to inconsistent units in the synchronization log.

[0008] In one possible implementation of the first aspect, while updating the data publication time corresponding to the inconsistent units in the synchronization log, it also includes: Note the historical data release time corresponding to inconsistent units in the synchronization log.

[0009] In one possible implementation of the first aspect, after the inconsistent unit has updated the data in the target database, it further includes: Write the data update completion time of inconsistent units in the target database to the synchronization log.

[0010] In one possible implementation of the first aspect, after the data synchronization between the units in the source database is completed, it also includes: Write the data synchronization completion time of each unit into the synchronization log.

[0011] In one possible implementation of the first aspect, after writing the data synchronization completion time of each unit to the synchronization log, it also includes: Write the synchronization time of each unit into the synchronization log.

[0012] According to a second aspect of the present invention, an oil and gas data synchronization device for a data publishing system is provided, comprising: The synchronous log initialization module is configured as follows: Trigger synchronization log initialization, and write the current date and the unit name of the data to be synchronized into the synchronization log; The synchronization module is configured as follows: Write the data release time corresponding to the unit name that has a data release time in the source database but no data release time in the synchronization log into the synchronization log. The data release time refers to the time within the current date. Additionally, filter out units from the synchronization logs that have a data publication time but no data synchronization start time; In addition, the data corresponding to each selected unit in the source database is synchronized to the target database, and the data synchronization start time is written to the synchronization log; The verification update module is configured as follows: Once the data synchronization of each unit in the source database is complete, it is determined whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log. If they are consistent, the data synchronization ends; if they are inconsistent, the data of the inconsistent units in the target database is updated.

[0013] In one possible implementation of the second aspect, the updating of inconsistent units in the target database specifically involves: Starting from the synchronization date, iterate in reverse chronological order, comparing the data release time of inconsistent units in the source database with the data release time written in the synchronization log, until two dates with the same data release time are found, and that date is determined to be the earliest date with inconsistent data release times; Starting from the earliest date where the data release time is inconsistent, synchronize the data corresponding to the inconsistent units from the source database to the target database one day at a time in ascending date order, until the current date.

[0014] In one possible implementation of the second aspect, while synchronizing data corresponding to inconsistent units from the source database to the target database daily in ascending date order, it also includes: Update the data release time and data synchronization start time corresponding to inconsistent units in the synchronization log.

[0015] In one possible implementation of the second aspect, while updating the data publication time corresponding to the inconsistent units in the synchronization log, it also includes: Note the historical data release time corresponding to inconsistent units in the synchronization log.

[0016] In one possible implementation of the second aspect, after the inconsistent unit has updated the data in the target database, it also includes: Write the data update completion time of inconsistent units in the target database to the synchronization log.

[0017] In one possible implementation of the first aspect, after the data synchronization between the units in the source database is completed, it also includes: Write the data synchronization completion time of each unit into the synchronization log.

[0018] In one possible implementation of the second aspect, after writing the data synchronization completion time of each unit to the synchronization log, it also includes: Write the synchronization time of each unit into the synchronization log.

[0019] According to a third aspect of the present invention, an apparatus is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the aforementioned oil and gas data synchronization method for a data publishing system.

[0020] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned oil and gas data synchronization method for a data publishing system.

[0021] Compared with the prior art, the present invention has at least the following beneficial effects: This invention provides an oil and gas data synchronization method for data publishing systems. By introducing a comprehensive discrimination mechanism based on data publishing time, data synchronization start time, and unit name, it achieves precise control over the scope and timing of data synchronization, effectively avoiding unnecessary data transmission and duplicate synchronization, and improving the accuracy and efficiency of data synchronization. Actual tests show that using this method, the average data synchronization time is significantly reduced from 80 minutes to 2 minutes. This improvement is of great significance for oil, gas, and water well production data management systems that require frequent synchronization of large amounts of data. This invention eliminates the need for a source database; the target database independently completes the synchronization task, simplifying the synchronization process, reducing system complexity, and minimizing maintenance costs associated with deploying additional application services or middleware. Addressing the challenge of data synchronization in oil, gas, and water well production data management systems under long-distance and insufficient network link performance conditions, this invention optimizes synchronization strategies and mechanisms, achieving efficient and stable data synchronization in complex network environments and improving the reliability of data synchronization.

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings used in the description of the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart of an oil and gas data synchronization method for a data publishing system according to one embodiment of the present invention; Figure 2 This is a flowchart of an oil and gas data synchronization method for a data publishing system, as shown in the embodiment. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] like Figure 1 As shown, this invention provides a method for synchronizing oil and gas data in a data publishing system. It primarily addresses the database synchronization challenges caused by network limitations and massive data volumes in environments like the Changqing Oilfield. The synchronization method specifically includes the following steps: S1. Trigger synchronization log initialization, write the current date and the unit name of the data to be synchronized into the synchronization log.

[0027] Specifically, before the data synchronization task starts, the system automatically triggers the initialization process of the synchronization log. This process includes creating a new record entry in the synchronization log file, which contains the current date (in YYYY-MM-DD format) and a list of unit names for the data to be synchronized. For example, the list of unit names can be the identifiers of various production units or departments within the oilfield company, used to distinguish datasets from different sources. After initialization, the synchronization log is empty or contains only basic information, preparing for subsequent data filtering and synchronization operations.

[0028] S2. Write the data release time corresponding to the unit name in the source database that has a data release time but no data release time in the synchronization log into the synchronization log. The data release time refers to the time within the current date.

[0029] Specifically, the data publication time is written to the synchronization log. The system iterates through all data publication records in the source database, each containing a timestamp of the publication and the identifier of the organization to which it belongs. The system then filters out records with valid publication times (i.e., publication dates matching the date recorded in S1) and whose organization names have not yet been recorded in the synchronization log. For these filtered records, the system appends their publication time information to the corresponding organization name entry in the synchronization log. This step ensures that only data newly published on the current day is considered during synchronization.

[0030] S3. Filter out units from the synchronization log that have a data publication time but no data synchronization start time.

[0031] Specifically, after recording the data release time, the system iterates through the synchronization log again to filter out units whose data release time has been recorded but whose data synchronization start time has not yet been recorded. These units represent the highest priority datasets to be processed in the current round of synchronization tasks, because the data in these units is the latest and has not yet been synchronized to the target database.

[0032] S4. Synchronize the data corresponding to each selected unit in the source database to the target database, and write the data synchronization start time to the synchronization log.

[0033] Specifically, for each unit selected in step S3, the system extracts its corresponding dataset from the source database and securely transmits it to the target database via a private network or dedicated link. Once the data transmission is complete, the system immediately records the start time of data synchronization for these units in the synchronization log, indicating that this portion of the data has been successfully copied to the target database.

[0034] S5. After the data synchronization of each unit in the source database is completed, determine whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log. If they are consistent, the data synchronization ends; if they are inconsistent, update the data of the inconsistent units in the target database.

[0035] This operation is called data consistency verification and update. Specifically, after data synchronization is complete, the system performs a consistency verification step. For each synchronized unit, the system compares the data publication time of that unit in the source database with the data publication time recorded in the synchronization log. If the two are completely consistent, it means that the data synchronization is accurate and error-free, and processing of that unit can be terminated. If any inconsistency is found (for example, data in the source database is updated during the synchronization process), the system triggers a data update mechanism, retrieves the latest data from the source database again, and overwrites the corresponding old data in the target database, ensuring that the data in the target database is always consistent with the source database.

[0036] In summary, the oil and gas data synchronization method for data publishing systems provided by this invention achieves efficient and accurate data synchronization in complex network environments by independently executing synchronization tasks on the target database and combining a comprehensive discrimination mechanism based on data publishing time, data synchronization start time, and unit name. This effectively solves the database synchronization problem faced by oilfield enterprises such as Changqing Oilfield.

[0037] In one possible implementation, updating the inconsistent unit's data in the target database can be achieved in the following way: a. Starting from the synchronization date, iterate in reverse chronological order, comparing the data release time of inconsistent units in the source database with the data release time written in the synchronization log, until two dates with the same data release time are found, and determine that date as the earliest date with inconsistent data release time.

[0038] The purpose of this step is to determine the earliest date of data publication time discrepancy. Specifically, when step S5 reveals a discrepancy between the data publication time of a unit in the source database and the time recorded in the synchronization log, the system needs to determine the starting point of the data inconsistency, i.e., the earliest date of data publication time discrepancy. To do this, the system iterates through the data publication records of that unit in the source database in reverse chronological order, starting from the synchronization date. Simultaneously, the system also iterates through the data publication times of that unit recorded in the synchronization log in reverse chronological order. By comparing the timestamps in the source database and the synchronization log, the system can find the date on which the first discrepancy occurs between the two timestamp sequences; this date is the earliest date of data publication time discrepancy.

[0039] b. Starting from the earliest date where the data release time is inconsistent, synchronize the data corresponding to the inconsistent units from the source database to the target database one day at a time in ascending date order, until the current date.

[0040] Specifically, after determining the earliest date of data inconsistency, the system extracts the corresponding dataset for that unit from the source database day by day in ascending order, starting from that date. For each day's data, the system performs a synchronization operation similar to step S4, which involves securely transferring the data from the source database to the target database and updating the corresponding data synchronization start time in the synchronization log. This process continues until the date of synchronization, ensuring that all inconsistent data is updated in the target database.

[0041] In this embodiment, by refining the process of updating inconsistent units' data in the target database, the data inconsistency problem can be located and resolved more accurately, ensuring that the data in the target database is always consistent with the source database.

[0042] In one possible implementation, while synchronizing the data corresponding to inconsistent units from the source database to the target database in ascending date order, it also includes updating the data release time and data synchronization start time corresponding to the inconsistent units in the synchronization log.

[0043] In other words, once the earliest date of the data release discrepancy is determined, the system enters a daily synchronization phase. During this phase, the system not only needs to extract and synchronize data from the source database to the target database, but also needs to synchronously update relevant information in the synchronization log. Detailed explanation follows: Starting from the earliest date where the data publication time is inconsistent, the system extracts the datasets corresponding to the inconsistent units from the source database day by day in ascending date order. For each day's data, the system performs data extraction and transmission operations, securely transferring the data from the source database to the target database. During each day's data synchronization process, the system needs to update the synchronization log synchronously, including recording the data publication time (obtained from the source database) and the data synchronization start time (current system time) for that day.

[0044] Preferably, to ensure the smooth progress of the synchronization process, the system can also provide a real-time synchronization progress monitoring and feedback mechanism. For example, this can be achieved by displaying information such as the synchronization progress bar, the amount of data synchronized, and the estimated remaining time on the user interface.

[0045] In one possible approach, while updating the data publication time corresponding to the inconsistent unit in the synchronization log, the method also includes: noting the historical data publication time corresponding to the inconsistent unit in the synchronization log to ensure the historical traceability of the synchronization process.

[0046] In other words, during the daily synchronization of data corresponding to inconsistent units to the target database, the system not only needs to update the current data publication time in the synchronization log, but also needs to add notes to the historical data publication time of the inconsistent unit in the synchronization log. For example, this can be achieved by adding a new field or comment to the log record to store previous data publication timestamps. Of course, as a more preferred implementation, the system can also record the number of changes to the data publication time and the specific time of each change to save more detailed historical data tracking information.

[0047] In one possible implementation, after the inconsistent unit has completed updating its data in the target database, the method further includes writing the completion time of the inconsistent unit's data update in the target database into the synchronization log.

[0048] In other words, the system needs to record the time when inconsistent units complete data updates in the target database in the synchronization log. This time point can be used to evaluate the execution efficiency of the synchronization task and monitor the data synchronization status.

[0049] Preferably, to ensure the readability of the synchronization log, a standardized log format should be adopted, and the data update completion time should be recorded as an independent field in the synchronization log, along with other synchronization information (such as data release time, data synchronization start time, etc.) in a structured manner.

[0050] In one possible implementation, after the data synchronization of each unit in the source database is completed, the method further includes: writing the data synchronization completion time of each unit into the synchronization log.

[0051] In other words, the system needs to record the time point when data synchronization of each unit is completed in the synchronization log. Similarly, this time point can be used to evaluate the execution efficiency of the entire synchronization task and monitor the data synchronization status.

[0052] In one possible implementation, after writing the data synchronization completion time of each unit to the synchronization log, it also includes writing the synchronization time of each unit to the synchronization log.

[0053] In other words, the system calculates the time spent by each unit from the start to the completion of synchronization, i.e., the synchronization time. Synchronization time can be calculated by comparing the data synchronization start time and the data synchronization completion time. Synchronization time is an important indicator for evaluating synchronization efficiency. For example, to ensure the readability of the synchronization log, synchronization time is also recorded as an independent field or entry in the synchronization log, along with other synchronization information (such as data publication time, data synchronization start time, data synchronization completion time, etc.) in a structured manner.

[0054] It should be noted that in the above implementation methods, the data format for data release time and data synchronization start time is: YYYY-MM-DD HH24:MI:SS. The data format for synchronization time is: HH:MI:SS.

[0055] In one specific embodiment, combined with Figure 2 As shown, a method for synchronizing oil and gas data for a data publishing system is as follows: (1) Synchronization log initialization On May 12, 2024, at 8:00 AM, preparations were made to initialize the synchronization log. The date and the unit name of the data to be synchronized were written line by line, as shown in Table 1.

[0056] Table 1 Synchronization Log Initialization

[0057] (2) Data synchronization a. Check the data release status of each unit in the source database at 5-minute intervals, and record the data release time corresponding to the unit name in the synchronization log that is not empty in the source database but is empty in the synchronization log.

[0058] b. Check if there are any units in the synchronization log where the data publication time is not empty and the synchronization start time is empty. If so, retrieve these units sequentially, obtain the data to be synchronized from the source database, and write it to the target database. Write the data synchronization start time and data synchronization completion time to the synchronization log, and calculate the synchronization time, as detailed in Table 2.

[0059] Table 2 Synchronization Log - Data Synchronization

[0060] (3) Verification and Update a. After any data synchronization phase is completed, the data verification and update phase begins.

[0061] b. Compare the data release time of each unit in the source database with the data release time in the synchronization log, and record the name of the unit with inconsistent times and the corresponding data release time in the source database.

[0062] c. For units with inconsistencies, starting from the synchronization date, iterate through the data publication times in the source database and the synchronization log in reverse chronological order until the data matches. Starting from the earliest day of inconsistency, synchronize the data for that unit day by day until that day, and when synchronizing the data each day, write the last data publication time in the source database into the notes of the synchronization log.

[0063] Table 3 Synchronization Log - Data Unlock

[0064] In another embodiment of the present invention, an oil and gas data synchronization device for a data publishing system is provided, which is used to implement an oil and gas data synchronization method for a data publishing system as described in the above embodiment. Specifically, it includes a synchronization log initialization module, a synchronization module, and a verification and update module, each module being configured with the following functions: The synchronization log initialization module is configured to trigger synchronization log initialization and write the current date and the unit name of the data to be synchronized into the synchronization log.

[0065] The synchronization module is configured to: write the data release time corresponding to the unit name in the source database that has a data release time but no data release time in the synchronization log into the synchronization log, where the data release time refers to the time within the current date; and filter out units in the synchronization log that have a data release time but no data synchronization start time; and synchronize the data corresponding to each selected unit in the source database to the target database, and write the data synchronization start time into the synchronization log.

[0066] The verification and update module is configured to: after the data synchronization of each unit in the source database is completed, determine whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log; if they are consistent, the data synchronization ends; if they are inconsistent, update the data of the inconsistent units in the target database.

[0067] Preferably, updating inconsistent units' data in the target database can be achieved in the following way: a. Starting from the synchronization date, iterate in reverse chronological order, comparing the data release time of inconsistent units in the source database with the data release time written in the synchronization log, until two dates with the same data release time are found, and determine that date as the earliest date with inconsistent data release time.

[0068] b. Starting from the earliest date where the data release time is inconsistent, synchronize the data corresponding to the inconsistent units from the source database to the target database one day at a time in ascending date order, until the current date.

[0069] All relevant content regarding the steps involved in the aforementioned embodiment of an oil and gas data synchronization method for a data publishing system can be referenced from the functional description of the corresponding functional module of an oil and gas data synchronization device for a data publishing system in this embodiment of the invention, and will not be repeated here. The module division in this embodiment of the invention is illustrative and only represents a logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of the invention can be integrated into a processor, exist as separate physical entities, or have two or more modules integrated into one module. The integrated module can be implemented in hardware or as a software functional module.

[0070] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used in the operation of an oil and gas data synchronization method for a data publishing system.

[0071] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the oil and gas data synchronization method for a data publishing system described in the above embodiments.

[0072] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxesFigure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] In this invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the 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.

[0077] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for synchronizing oil and gas data for a data publishing system, characterized in that, include: Trigger synchronization log initialization, and write the current date and the unit name of the data to be synchronized into the synchronization log; Write the data release time corresponding to the unit name that has a data release time in the source database but no data release time in the synchronization log into the synchronization log. The data release time refers to the time within the current date. Filter the units in the synchronization log that have data publication time but no data synchronization start time; Synchronize the data corresponding to each selected unit in the source database to the target database, and write the data synchronization start time to the synchronization log. Once the data synchronization of each unit in the source database is complete, it is determined whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log. If they are consistent, the data synchronization ends; if they are inconsistent, the data of the inconsistent units in the target database is updated.

2. The method for synchronizing oil and gas data for a data publishing system according to claim 1, characterized in that, The update of inconsistent units in the target database specifically includes: Starting from the synchronization date, iterate in reverse chronological order, comparing the data release time of inconsistent units in the source database with the data release time written in the synchronization log, until two dates with the same data release time are found, and that date is determined to be the earliest date with inconsistent data release times; Starting from the earliest date where the data release time is inconsistent, synchronize the data corresponding to the inconsistent units from the source database to the target database one day at a time in ascending date order, until the current date.

3. The method for synchronizing oil and gas data for a data publishing system according to claim 2, characterized in that, While synchronizing data corresponding to inconsistent units from the source database to the target database in ascending date order, it also includes: Update the data release time and data synchronization start time corresponding to inconsistent units in the synchronization log.

4. The method for synchronizing oil and gas data for a data publishing system according to claim 3, characterized in that, In addition to updating the data publication time corresponding to inconsistent units in the synchronization log, it also includes: Note the historical data release time corresponding to inconsistent units in the synchronization log.

5. The method for synchronizing oil and gas data for a data publishing system according to claim 2, characterized in that, After the inconsistent units have updated the data in the target database, the following also applies: Write the data update completion time of inconsistent units in the target database to the synchronization log.

6. The method for synchronizing oil and gas data for a data publishing system according to claim 1, characterized in that, Once the data synchronization between each unit and the source database is complete, it also includes: Write the data synchronization completion time of each unit into the synchronization log.

7. The method for synchronizing oil and gas data for a data publishing system according to claim 6, characterized in that, After writing the data synchronization completion time of each unit to the synchronization log, the following is also included: Write the synchronization time of each unit into the synchronization log.

8. An oil and gas data synchronization device for a data publishing system, characterized in that, include: The synchronous log initialization module is configured as follows: Trigger synchronization log initialization, and write the current date and the unit name of the data to be synchronized into the synchronization log; The synchronization module is configured as follows: Write the data release time corresponding to the unit name that has a data release time in the source database but no data release time in the synchronization log into the synchronization log. The data release time refers to the time within the current date. Additionally, filter out units from the synchronization logs that have a data publication time but no data synchronization start time; In addition, the data corresponding to each selected unit in the source database is synchronized to the target database, and the data synchronization start time is written to the synchronization log; The verification update module is configured as follows: Once the data synchronization of each unit in the source database is complete, it is determined whether the data release time of each unit in the source database is consistent with the data release time written in the synchronization log. If they are consistent, the data synchronization ends; if they are inconsistent, the data of the inconsistent units in the target database is updated.

9. An apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements an oil and gas data synchronization method for a data publishing system as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements an oil and gas data synchronization method for a data publishing system as described in any one of claims 1 to 7.