Method for preventing logging data file from being covered and related equipment

By monitoring the well logging operation window in real time at the logging site and generating a unique file name to automatically save the logging data file, the problem of easy overwriting of the logging data file is solved, ensuring the safety and integrity of the data, and avoiding quality accidents and economic losses.

CN120216349APending Publication Date: 2025-06-27CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311798197.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

At the logging site, the logging data file names are easily the same, which makes the files easily overwritten, resulting in the loss of important data, which in turn affects the logging results and causes economic losses.

Method used

By generating and starting the logging data monitoring thread, the well logging operation window is monitored in real time. When a file saving instruction is received, a unique file name is generated and the logging data file is automatically saved to avoid file overwriting.

Benefits of technology

It effectively prevents file overwriting problems caused by the same file name, ensures the safety and integrity of logging data, and avoids quality accidents and economic losses caused by data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216349A_ABST
    Figure CN120216349A_ABST
Patent Text Reader

Abstract

The invention discloses a method and related equipment for preventing a logging data file from being covered, and belongs to the field of petroleum logging. The method comprises the steps that firstly, a logging data monitoring thread is generated and started, and a logging operation window is monitored in real time; when the file storage instruction from the logging operation window is received, the unique file name is generated and transmitted, and the current logging data file is automatically stored according to the unique file name, so that the problem that the file is covered due to the same file name is solved; meanwhile, as the method is executed outside the logging software, errors are not introduced to the logging software, the method normally exits when not used, and the operation of the logging software is not influenced; the method has no special requirements on logging software, and has wide adaptability and good popularization and application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of oil logging, and particularly relates to a method for preventing logging data files from being overwritten and related equipment. Background Art

[0002] Logging data plays a crucial role in the oil and gas industry. They are geological information obtained through various logging methods and are used for geological interpretation and prediction. These data can help engineers and geologists understand the physical properties of the formation, such as electrochemical properties, electrical conductivity, acoustic properties, and radioactivity, etc. Logging data is of great significance for the development of the oil and gas industry. It can not only provide rich geological information but also, through various processing and analysis methods, help engineers and geologists better understand and predict the properties of the formation.

[0003] During on-site logging operations, each logging may require multiple trips of the instrument string. Each time the instrument string is tripped, the logging data file needs to be saved. When saving the logging data file, there are often files with the same name. When dealing with files with the same name, if the operator makes a wrong operation or an occasional mistake, it may cause the logging data file to be overwritten, resulting in the loss of the logging data in the file. The lost data may include relatively important data. Once these data are lost, it may lead to the failure of logging and the need to re-log, causing major quality accidents and serious economic losses. Summary of the Invention

[0004] To overcome the shortcomings of the above technology, the present invention provides a method for preventing logging data files from being overwritten and related equipment, which can solve the technical problem that due to the same name of logging data files, the logging data files are easily overwritten.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] A method for preventing logging data files from being overwritten, comprising:

[0007] Generating and starting a logging data monitoring thread to monitor the logging operation window in real time;

[0008] Based on the file saving instruction of the logging operation window, generating a unique file name and automatically saving the current logging data file according to the unique file name.

[0009] Further, the logging data monitoring thread first obtains the thread ID number of the logging data acquisition module, and then uses the enumeration method to monitor the operation window of the logging data acquisition module in real time to monitor the file saving instruction.

[0010] Further, the specific steps for obtaining the thread ID number of the logging data acquisition module are as follows:

[0011] Enumerate all operation windows in real time, and judge the window class and title corresponding to the current operation window and the window class and title corresponding to the logging data acquisition module. If the two are the same, obtain the thread ID number of the logging data acquisition module and end the enumeration; otherwise, continue the enumeration.

[0012] Further, the specific steps for real-time monitoring of the operation window of the logging data acquisition module are as follows:

[0013] Judge whether the current window title is "Save As" or "Save as"; if so, obtain the file save instruction and end the enumeration; otherwise, continue the enumeration.

[0014] Further, among them, the unique file name is generated based on the well number, date, and the serial number of the logging data file on the same day.

[0015] Further, the steps for generating the unique file name are as follows:

[0016] First, search for all logging data files with the preset well number and preset date; then obtain the maximum serial number in the logging data files; use the serial number obtained by adding one to the maximum serial number as the serial number of the current unique file name, and combine it with the well number and date to generate the unique file name.

[0017] Further, the logging data monitoring thread inputs the unique file name into the file save dialog box, and automatically clicks "Save" or "Save" in the file save dialog box to complete the automatic saving of the current logging data file.

[0018] A system for preventing logging data files from being overwritten, used to implement the steps of the above method for preventing logging data files from being overwritten, including:

[0019] A thread monitoring module, used to generate and start a logging data monitoring thread to monitor the logging operation window in real time;

[0020] A file saving module, used to generate a unique file name based on the file save instruction of the logging operation window and automatically save the current logging data file according to the unique file name.

[0021] A device, including:

[0022] A memory, used to store a computer program;

[0023] A processor, used to implement the steps of the above method for preventing logging data files from being overwritten when executing the computer program.

[0024] A computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is used to implement the steps of the above method for preventing logging data files from being overwritten when executed by a processor.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention also provides a method for preventing logging data files from being overwritten. This method first generates and starts a logging data monitoring thread to monitor the logging operation window in real time; when a file save instruction is received from the logging operation window, a unique file name is generated and transmitted, and the current logging data file is automatically saved according to the unique file name, solving the problem of file overwriting due to the same file name; at the same time, since this method is executed outside the logging software, it will not introduce errors to the logging software, and it exits normally when not in use without affecting the operation of the logging software; this method has no special requirements for the logging software, has wide adaptability, and has good popularization and application value.

[0027] Preferably, in the present invention, the logging data monitoring thread obtains the thread ID number of the logging data acquisition module (logging software), and uses the enumeration method to monitor the operation window ID number of the same thread as the logging software in real time. In this way, it is not necessary to judge each operation window one by one, and only the operation window with the same thread ID number as the logging software needs to be judged, improving the work efficiency.

[0028] Preferably, in the present invention, the file name is named in three parts, which is also convenient for subsequent searching of the required logging data files from two aspects of well number and date, improving the subsequent file search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flowchart of a method for preventing logging data files from being overwritten provided by an embodiment of the present invention;

[0030] Figure 2 It is a flowchart of obtaining the thread ID number of the logging software provided by an embodiment of the present invention;

[0031] Figure 3 It is a flowchart of the callback function C for enumerating windows used by an embodiment of the present invention;

[0032] Figure 4 It is a flowchart of the callback function D for enumerating windows used by an embodiment of the present invention;

[0033] Figure 5 It is a flowchart of generating a unique file name provided by an embodiment of the present invention;

[0034] Figure 6 It is a flowchart of automatically inputting the file name into the file save dialog box provided by an embodiment of the present invention;

[0035] Figure 7 It is a flowchart of the callback function E provided by an embodiment of the present invention;

[0036] Figure 8 Flow chart of automatically clicking a button provided by an embodiment of the present invention;

[0037] Figure 9 Flow chart of writing a file name into the clipboard provided by an embodiment of the present invention;

[0038] Figure 10 Flow chart of a method for preventing a logging data file from being overwritten provided by the present invention;

[0039] Figure 11 Structural schematic diagram of a system for preventing a logging data file from being overwritten provided by the present invention. Detailed implementation manners

[0040] The present invention provides a method for preventing a logging data file from being overwritten. As Figure 10 shown, the method includes the following steps:

[0041] S1: Generate and start a logging data monitoring thread to monitor the logging operation window in real time.

[0042] S2: Based on the file save instruction of the logging operation window, generate and transmit a unique file name, and automatically save the current logging data file according to the unique file name.

[0043] Specifically, in S1, the logging data monitoring thread first obtains the thread ID number of the logging data acquisition module, and then uses the enumeration method to monitor the operation window of the logging data acquisition module in real time to monitor the file save instruction.

[0044] The specific steps for obtaining the thread ID number of the logging data acquisition module are as follows:

[0045] Use the enumeration method to monitor all operation windows in real time, and judge whether the window class and title corresponding to the current operation window are the same as those corresponding to the logging data acquisition module. If they are the same, obtain the thread ID number of the logging data acquisition module and end the enumeration; otherwise, continue the enumeration.

[0046] The specific steps for monitoring the operation window of the logging data acquisition module in real time are as follows:

[0047] Judge whether the current window title is "Save As" or "Save as"; if so, obtain the file save instruction and end the enumeration; otherwise, continue the enumeration.

[0048] In S2, the above-mentioned unique file name is generated based on the well number, date, and the serial number of the logging data file on the same day.

[0049] The specific steps for generating the unique file name are as follows:

[0050] First, search for all logging data files with a preset well number and a preset date; then obtain the maximum serial number in the logging data file; use the serial number obtained by adding one to the maximum serial number as the serial number of the current unique file name, and combine the well number and the date to generate a unique file name.

[0051] The logging data monitoring thread inputs the unique file name into the file save dialog box and automatically clicks "Save" or "Save" in the file save dialog box, thereby completing the automatic saving of the current logging data file.

[0052] As Figure 11 shown, the present invention also provides a system for preventing logging data files from being overwritten, including: a thread monitoring module for generating and starting a logging data monitoring thread to monitor the logging operation window in real time; a file saving module for generating a unique file name based on the file saving instruction of the logging operation window and automatically saving the current logging data file according to the unique file name.

[0053] The present invention also provides a device, including: a memory for storing a computer program; a processor for implementing the steps of the method for preventing logging data files from being overwritten when executing the computer program.

[0054] When the processor executes the computer program, it implements the above steps for preventing logging data files from being overwritten, for example: generating and starting a logging data monitoring thread to monitor the logging operation window in real time; generating a unique file name based on the file saving instruction of the logging operation window and automatically saving the current logging data file according to the unique file name.

[0055] Alternatively, when the processor executes the computer program, it implements the functions of the various modules in the above system, for example: a thread monitoring module for generating and starting a logging data monitoring thread to monitor the logging operation window in real time; a file saving module for generating a unique file name based on the file saving instruction of the logging operation window and automatically saving the current logging data file according to the unique file name.

[0056] Exemplarily, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the device for preventing the logging data file from being overwritten. For example, the computer program can be divided into a thread monitoring module and a file saving module; the specific functions of each module are as follows: The thread monitoring module is used to generate and start a logging data monitoring thread to monitor the logging operation window in real time; the file saving module is used to generate a unique file name based on the file saving instruction of the logging operation window and automatically save the current logging data file according to the unique file name.

[0057] It should be noted that the above logging data acquisition module is a kind of logging software for realizing the function of logging surface data acquisition, and this method is designed and implemented with the logging software as the application object.

[0058] The device for preventing the logging data file from being overwritten can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The device for preventing the logging data file from being overwritten may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above are examples of the device for preventing the logging data file from being overwritten, and do not constitute a limitation on the device for preventing the logging data file from being overwritten. It may include more components than the above, or combine some components, or different components. For example, the device for preventing the logging data file from being overwritten may also include input / output devices, network access devices, buses, etc.

[0059] The so-called processor may be a central processing unit (CPU), or may also be 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. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc. The processor is the control center of the device for preventing the logging data file from being overwritten, and connects various parts of the entire device for preventing the logging data file from being overwritten through various interfaces and lines.

[0060] The memory can be used to store the computer program and / or module. By running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory, the processor realizes various functions of the device for preventing logging data files from being overwritten.

[0061] The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.

[0062] The present invention also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the method for preventing a logging data file from being overwritten are realized.

[0063] If the modules / units integrated in the system for preventing logging data files from being overwritten are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0064] Based on such an understanding, all or part of the processes in the method for preventing logging data files from being overwritten according to the present invention can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the method for preventing logging data files from being overwritten can be realized. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or a preset intermediate form, etc.

[0065] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0066] It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0067] Embodiment

[0068] As mentioned in the background art: During well logging field operations, it may be necessary to raise and lower the instrument string multiple times for each well logging. Each time the instrument string is raised and lowered, the well logging data file needs to be saved. When saving the well logging data file, there are often files with the same name. When dealing with files with the same name, if the operator makes a wrong operation or an occasional mistake, the well logging data file may be overwritten, resulting in the loss of well logging data in the file. The lost data may include relatively important data. Once this data is lost, it may lead to the failure of well logging and the need to re-perform well logging, causing major quality accidents and serious economic losses.

[0069] To solve the above problems, this embodiment provides a method for preventing the well logging data file from being overwritten. This method can prevent the well logging data file from being overwritten due to the operator's wrong operation, thus avoiding quality accidents and economic losses caused by the overwriting of the well logging data file.

[0070] The principle on which this method is based is: Develop a set of auxiliary well logging methods (auxiliary well logging programs). In this method, a thread (well logging data monitoring thread) is generated. In this thread, all windows of the well logging software (well logging data acquisition module) are cyclically and real-time monitored. When a window with the title "Save As" or "Save as" appears, it means that a file name needs to be input. At this time, the auxiliary well logging program generates a unique file name and inputs it, and automatically clicks the "Save" or "Save" button, replacing the operator's operation, preventing the operator's wrong operation, automatically generating a unique file name and replacing the operator's operation. This is one of the inventive points of the present invention.

[0071] As Figure 1 shown, this embodiment provides a method for preventing the well logging data file from being overwritten, mainly including: obtaining the well logging software thread; obtaining the file save dialog box; generating a unique file name; automatically inputting the unique file name into the file save dialog box. The specific steps are as follows:

[0072] SS1. Obtain the well logging software thread:

[0073] This step is the basis for subsequent work. The EnumWindows function is used to enumerate windows. In the callback function C of window enumeration, the window class or title is obtained through GetWinClass and GetWindowText for comparison to determine whether it is the window of the logging software required. If so, the enumeration ends and the window handle hWnd is saved; otherwise, the enumeration continues. The GetWindowThreadProcessId function is used with hWnd as the parameter to obtain the logging software thread.

[0074] SS2. Obtain the file save dialog box of the logging software:

[0075] In this step, the EnumThreadWindows function is used to enumerate the windows of the logging software. In the callback function D of window enumeration, the window title is obtained through GetWindowText for comparison. When the window title is "Save As" or "Saveas", the window handle is recorded and the enumeration ends; otherwise, the window enumeration continues.

[0076] SS3. Generate a unique file name:

[0077] In this step, to make the file name unique and for future query convenience, it is specified that the file name consists of 3 parts, including: well number, date, and the serial number of the file on the same day. The 3 parts are separated by '_'.

[0078] In the future, the data file can be queried using the well number and date. The well number is the well number of the operation at that time, the date is the date of the same day, and the serial number on the same day starts from 001. Each time a file name is generated on the same day, the serial number is incremented by 1. The serial number format is 001, 002... up to 999. There can be 999 files, and 999 files generally meet the needs of logging. The file serial number can also be extended to 4 digits to expand the file capacity.

[0079] For example: The first logging data file name of Well Ling 5 measured on February 1, 2023 is: Ling 5_20230201_001, and the subsequent file names are: Ling 5_20230201_002, Ling 5_20230201_003... and so on.

[0080] The program first uses the FindFileFirst and FindFileNext functions to search for all logging data files with the specified well number and specified date. When a file name is found, the file name is separated to obtain the last serial number of the file name. This serial number is compared with the maximum serial number of the files already obtained, and the maximum serial number is always saved until the file search is completed.

[0081] Increment the maximum serial number by 1 to be the serial number of this file name; this step is the specific generation process for generating a unique file name; it is also one of the inventive points of the present invention.

[0082] SS4. Automatically input the file name into the file save dialog box:

[0083] In this step, enumerate the child windows of the file save dialog box. In the callback function E of the enumerated window, obtain the handles of the file name edit box and the "Save" or "Save" button. Use the clipboard function to write the previously generated unique file name to the clipboard, activate the file save dialog box, use the right-click menu to paste the file name into the file name edit box, and finally click the "Save" or "Save" button.

[0084] The present invention will be further described below in conjunction with examples and drawings:

[0085] As Figure 1 shown, Figure 1 is the main process of the method for preventing logging data files from being overwritten. In this method, a thread is generated. In this thread, all windows of the logging software are loop-monitored. When a window with the title "Save As" or "Save as" appears, it means that a file name needs to be input. At this time, a unique file name is generated and input, and the "Save" or "Save" button is automatically clicked to replace the operation of the user (operator).

[0086] It mainly includes the following steps:

[0087] SS1. Obtain the logging software thread.

[0088] SS2. Monitor the execution process of the logging software, enumerate the windows of the same thread as it, and use the callback function D when enumerating the windows to obtain the file save dialog box.

[0089] SS3. Generate a unique logging data file name logfilename.

[0090] SS4. Automatically input the file name logfilename into the file save dialog box.

[0091] As Figure 2 shown, is the flowchart for obtaining the logging software thread. This step is the basis for subsequent work and includes the following steps:

[0092] A001. Execute the EnumWindows function to enumerate the windows to obtain the logging software window hWnd. When enumerating the windows, use the callback function C.

[0093] A002. Use the hWnd as a parameter to execute the GetWindowThreadProcessId function to obtain the logging software thread ID number.

[0094] As Figure 3 shown Figure 3 is the flowchart of the callback function C used when enumerating windows.

[0095] In this step, execute GetWinClass and GetWindowText, and compare the obtained window class and title with the class and title of the main window of the logging software to determine whether the current window is the window of the required logging software. If so, end the enumeration and save the window handle hWnd; otherwise, continue the enumeration.

[0096] As Figure 4 shown Figure 4 is the flowchart of the callback function D used for enumerating windows.

[0097] In this step, in order to obtain the file save dialog box, it is necessary to monitor the execution process of the logging software, use the EnumThreadWindows function to enumerate the windows with the same thread as the logging software. In the callback function D for enumerating windows, execute the GetWindowText function to obtain the window title. When the window title is "Save As" or "Save as", record the window handle and end the enumeration; otherwise, continue to enumerate the windows.

[0098] As Figure 5 shown Figure 5 is the flowchart for generating a unique file name.

[0099] In this step, in order to make the file name unique and facilitate future queries, it is specified that the file name consists of 3 parts, including: well number, date, and the serial number of the day. The 3 parts are separated by '_'.

[0100] In the future, the data file can be queried using the well number and date. The well number is the well number of the operation at that time, the date is the date of that day, and the serial number of the day starts from 001. Each time a file name is generated on the same day, the serial number is incremented by 1. The serial number format is 001, 002... until 999, and 999 files can be included.

[0101] For example: The first logging data file of Well Ling 5 measured on February 1, 2023 is named: Ling 5_20230201_001, and the subsequent file names are: Ling 5_20230201_002, Ling 5_20230201_003... and so on.

[0102] Here, the program first executes the FindFileFirst and FindFileNext functions to search for all files with a specified well number and specified date. When a file name is found, the file name is separated to obtain the last serial number of the file name. This serial number is compared with the maximum serial number of the files that have been obtained, and the maximum serial number is always saved until the file search is completed. Then, the maximum serial number is incremented by 1 and used as the serial number of this file name. Finally, the file name is generated using the construction rule of the three parts of the file name; this step is the specific generation process for generating a unique file name; it is also one of the inventive points of the present invention.

[0103] As Figure 6 shown, Figure 6 the flowchart for automatically inputting the file name into the file save dialog box mainly includes the following steps:

[0104] B001. Call the EnumChildWindows function to enumerate the child windows of the file save dialog box. When enumerating the child windows of the file save dialog box, use the callback function E to obtain the handles of the file name edit box and the "Save" or "Save" button.

[0105] B002. Use the clipboard function to write the file name to the clipboard, as specifically Figure 9 shown.

[0106] B003. Activate the file save dialog box to bring the original logging software to the foreground so that the file save dialog box can obtain mouse and keyboard input; specifically, this step is further divided into the following 2 steps:

[0107] C001. Use the SetWindowPos function with the handle of the window to be activated and HWND_TOP as parameters to place the window to be activated at the top of the Z order.

[0108] C002. Use the SetForegroundWindow function with the handle of the window to be activated as the parameter to activate the window.

[0109] B004. Use the right-click menu to paste the file name into the file name edit box.

[0110] B005. Click the "Save" or "Save" button.

[0111] As Figure 7 shown, Figure 7 the flowchart for the callback function E.

[0112] In this step, in order to obtain the file name edit box and the save button sub-window in the file save dialog box, in the callback function E of the enumerated window, the sub-window class and title are obtained through GetWinClass and GetWindowText for comparison to determine whether the sub-window is the required sub-window. If so, the sub-window handle hWnd is saved, and the number of enumerated sub-windows is incremented; otherwise, the enumeration continues.

[0113] As Figure 8 shown, Figure 8 The flowchart for automatically clicking the button (clicking the "Save" or "Save" button) includes the following steps:

[0114] D001: Using the button handle and GWL_ID as parameters, execute the GetWindowLong function to obtain the button ID as ButtonID.

[0115] D002: Execute MAKEWPARAM(ButtonID, BN_CLICKED) to obtain LPARAM.

[0116] D003: Using the button handle as a parameter, execute the GetParent function to obtain the button's parent window handle hParent.

[0117] D004: Execute the SendMessage function to send the WM_COMMAND message to the hParent window, with the message parameter being LPARAM.

[0118] So far, the current logging data file is automatically saved according to the automatically generated unique file name, preventing the problem of the logging data file being overwritten.

[0119] This embodiment provides a method for preventing the logging data file from being overwritten. The file name automatically generated by the program is a unique file name that has been verified and there will be no problem of the file being overwritten; at the same time, because this method is executed outside the logging software, it will not introduce errors to the logging software, and it exits normally when not in use without affecting the operation of the logging software; the file name is divided into three parts, which also facilitates searching for the required logging data file from both the well number and date aspects in the future; this method has no special requirements for the logging software, has wide adaptability, and can also be extended to other fields.

[0120] In summary, the present invention provides a method and related equipment for preventing logging data files from being overwritten. The method first generates and starts a logging data monitoring thread to monitor the logging operation window in real time; when a file saving instruction is received from the logging operation window, a unique file name is generated and transmitted, and the current logging data file is automatically saved according to the unique file name, solving the problem of file overwriting caused by the same file name; at the same time, since this method is executed outside the logging software, it will not introduce errors to the logging software, and it will exit normally when not in use without affecting the operation of the logging software; this method has no special requirements for the logging software, has wide adaptability, and has good popularization and application value.

[0121] The above embodiments are only one of the implementation manners capable of implementing the technical solution of the present invention. The scope of protection required by the present invention is not limited only by this embodiment, but also includes any changes, substitutions and other implementation manners that are easily conceivable by those skilled in the art within the technical scope disclosed by the present invention.

Claims

1. A method for preventing a logging data file from being overwritten, characterized in that, Including: Generate and start a logging data monitoring thread to monitor the logging operation window in real time; Based on the file saving instruction of the logging operation window, generate a unique file name and automatically save the current logging data file according to the unique file name.

2. A method for preventing a logging data file from being overwritten according to claim 1, characterized in that, Among them, The logging data monitoring thread first obtains the thread ID number of the logging data acquisition module, and then uses the enumeration method to monitor the operation window of the logging data acquisition module in real time to monitor the file saving instruction.

3. A method for preventing a logging data file from being overwritten according to claim 2, characterized in that, The specific steps to obtain the thread ID number of the logging data acquisition module are as follows: Use the enumeration method to monitor all operation windows in real time, judge the window class and title corresponding to the current operation window and the window class and title corresponding to the logging data acquisition module. If the two are the same, obtain the thread ID number of the logging data acquisition module and end the enumeration; otherwise, continue the enumeration.

4. A method for preventing a logging data file from being overwritten according to claim 3, characterized in that, The specific steps to monitor the operation window of the logging data acquisition module in real time are as follows: Judge whether the current window title is "Save As" or "Save as"; if so, obtain the file saving instruction and end the enumeration; otherwise, continue the enumeration.

5. A method for preventing a logging data file from being overwritten according to claim 1, characterized in that, Among them, The unique file name is generated based on the well number, date, and the serial number of the logging data file on the same day.

6. A method for preventing a logging data file from being overwritten, as claimed in claim 5, wherein The generation steps of the unique file name are as follows: First, search for all logging data files of the preset well number and preset date; then obtain the maximum serial number in the logging data file; use the serial number obtained by adding 1 to the maximum serial number as the serial number of the current unique file name, and combine the well number and date to generate a unique file name.

7. A method for preventing a logging data file from being overwritten according to claim 1, characterized in that, The logging data monitoring thread inputs the unique file name into the file saving dialog box, and automatically clicks "Save" or "Save" in the file saving dialog box to complete the automatic saving of the current logging data file.

8. A system for preventing a logging data file from being overwritten, which is used to implement the steps of the method for preventing a logging data file from being overwritten according to any one of claims 1-7, characterized in that, Including: A thread monitoring module, used to generate and start a logging data monitoring thread to monitor the logging operation window in real time; A file saving module, used to generate a unique file name based on the file saving instruction of the logging operation window and automatically save the current logging data file according to the unique file name.

9. A device, characterized in that, Including: A memory, used to store a computer program; A processor, used to implement the steps of the method for preventing the logging data file from being overwritten according to any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor, is used to implement the steps of the method for preventing the logging data file from being overwritten according to any one of claims 1-7.