High-speed picture storage method and system for pipeline defect detection

By dividing section space in the storage controller and adjusting the camera acquisition rate, the problems of high disk pressure and data loss during multi-channel camera image storage are solved, and efficient and uncompressed image storage is achieved, ensuring data integrity and system stability.

CN118915968APending Publication Date: 2024-11-08SUZHOU APQI INTERNET OF THINGS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411002337.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the prior art, the pictures collected by multiple cameras are likely to cause large disk storage pressure and increased delay during the storage process, and there is a risk of loss of picture data.

Method used

By dividing the storage space and cache space in the storage controller, setting multiple section spaces correspond to the number of cameras, and adjusting the camera acquisition rate according to the usage status of section spaces, balancing the relative rates of picture acquisition and storage, and using the cache space Save pictures temporarily to ensure data integrity.

Benefits of technology

It effectively avoids image data loss, reduces storage pressure, ensures efficient data processing capabilities when resource constraints are encountered, and maintains the original quality of the picture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915968A_ABST
    Figure CN118915968A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pipeline detection, in particular to a high-speed picture storage method and system for pipeline defect detection, and the method comprises the steps: dividing a memory space of a storage disk in a storage controller into a storage space and a plurality of section spaces which are used for caching and are correspondingly matched with a camera, and setting a threshold value for each section space; and adjusting the acquisition rate of the camera when the section space is detected to reach a preset threshold value within the picture acquisition time of the camera. According to the method, the section space is matched and set for the multiple cameras, the pictures are temporarily stored in a multi-thread mode, the pictures can be efficiently stored, the original quality and integrity of picture data can be guaranteed, the picture collection rate of the cameras is intelligently adjusted according to the use state of the section space corresponding to the cameras and the overall use rate of the disk memory space, the storage pressure is relieved, and the storage efficiency is improved. According to the method and the system, the pictures are guaranteed to be collected and stored, data loss is avoided, and the efficient data processing capability of the system can be kept even under the condition that resources are limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline detection, and in particular to a high-speed image storage method and system for pipeline defect detection. Background Art

[0002] In the modern industrial field, pipeline systems play a core role in energy transmission, water resource management, chemical material transportation and other fields. Their stable operation is crucial to ensuring energy supply, water resource security and environmental protection. However, due to the long-term exposure of pipelines to complex and changing environments, they are affected by factors such as corrosion and wear, which damages the integrity of pipelines and increases safety risks. In order to quickly identify and repair potential pipeline defects, the use of high-speed camera systems to collect and analyze images of the inner and outer surfaces of pipelines has become an effective detection method.

[0003] However, in the prior art, multiple cameras synchronously capture and store images, especially when performing all-round real-time image capture and storage of a large amount of data in a pipeline in an offline scenario, it often involves long-term, high-speed data storage of a large number of images, and therefore places high requirements on high-speed storage of images.

[0004] The images captured by multiple cameras are queued to be written into the system's storage disk. The queue waiting causes delays between capture and storage, which puts a lot of pressure on the disk storage, causing the disk occupancy rate to reach 100% for a long time. During the delay stage, there is a risk of image data being lost.

[0005] Based on the problems in the prior art, the present invention provides a high-speed image storage method and system for pipeline defect detection to solve the problems in the prior art. Summary of the invention

[0006] The purpose of the present invention is to provide a high-speed image storage method and system for pipeline defect detection, so as to solve the technical problems in the prior art that images collected by multiple cameras are queued to wait to be written into the storage disk of the system, the system disk storage pressure is large, and the queue delay easily leads to the loss of image data.

[0007] The technical solution of the present invention is: a high-speed image storage method for pipeline defect detection, comprising:

[0008] Before the camera captures the image, the memory space of the storage disk in the storage controller is divided into storage space and cache space; multiple section spaces are set in the cache space, the multiple section spaces correspond to the number of cameras one by one, and a threshold is set for each section space;

[0009] Multiple cameras collect local images in the pipeline. If the node space reaches the preset threshold within the shooting time, the camera acquisition rate is adjusted to balance the relative rates of image acquisition and storage, thus buffering the image storage pressure.

[0010] The section space keeps temporarily storing pictures, and the storage space keeps reading and saving the temporarily stored pictures in the section space until the section space is fully utilized and the shooting is terminated.

[0011] Preferably, the mechanism to balance the relative rates of image acquisition and storage and buffer the image storage pressure is:

[0012] Assume that the acquisition rate of a camera is A, the cache rate corresponding to the camera is γ, the node space size is C, the current memory usage rate is U, and the cache adjustment step is α. Then, the balance formula between cache storage and image acquisition rate is obtained.

[0013] C=C×(1+α·sgn(A-γ))·sgn(U-0.8)

[0014] Where sgn(x) is the sign function, defined as:

[0015]

[0016] According to the current node space size C, adjust the camera acquisition rate and reduce the image acquisition rate to buy time for image preservation.

[0017] Preferably, the image acquisition rate is adjusted by changing the camera shooting frame rate;

[0018] When the section space usage rate U reaches the threshold, the camera acquisition rate is greater than the storage rate and greater than the cache rate of the corresponding section space, the camera shooting frame rate is reduced to maintain a dynamic balance between the image acquisition and cache rates;

[0019] The camera acquisition rate is greater than the storage rate and less than the cache rate of the corresponding node space, which improves the camera shooting frame rate and maintains a dynamic balance between image acquisition and cache rates.

[0020] Preferably, when it is detected that there is a picture in the section space opened for the camera, the storage mechanism of the picture is triggered, and the picture will be saved in the storage space. After the storage is completed, the stored picture is retrieved and located in the section space, and removed from the section space to free up space for subsequent shooting.

[0021] A pipeline defect detection system, used to implement the high-speed image storage method for pipeline defect detection, comprising a storage controller, a plurality of high-speed cameras, an infrared camera, a gyroscope, and a pulse signal device;

[0022] The camera, the pulse signaler, and the gyroscope are respectively connected to the storage controller, and configuration files for the camera, the pulse signaler, and the gyroscope are configured through the storage controller;

[0023] When the camera starts collecting data, the pulse signal transmitter sends a pulse signal to set the collection frequency of the camera, and then uses the gyroscope to determine the angle of the camera to collect image data, and stores the data at the same time.

[0024] Preferably, the cameras include 10 high-speed cameras and 1 infrared camera.

[0025] Preferably, the storage controller is an AvagoRAID array card; a software watchdog is used in the storage controller to perform real-time monitoring and recovery.

[0026] Preferably, the detection trigger mode of the storage controller includes software triggering and hardware triggering. The software triggering is implemented through a system software watchdog design, and the hardware triggering is implemented through a hardware circuit. Both are triggered by obtaining the pulse value emitted by a pulse signaler.

[0027] Compared with the prior art, the advantages of the present invention are:

[0028] (1) The present invention divides the memory space of the disk into storage space, opens up a cache section space for the images captured by the camera, and temporarily stores images in multiple threads. When the system encounters performance fluctuations or increased disk pressure during operation, the cache space can be used to temporarily store images, thereby ensuring that data integrity is not damaged and avoiding image loss.

[0029] (2) According to the usage status of the camera's corresponding section space and the overall usage rate of the disk memory space, the camera's image acquisition rate is intelligently adjusted to alleviate storage pressure, ensure that images are "captured and stored", avoid data loss, and enable the system to maintain efficient data processing capabilities even when resources are limited.

[0030] (3) By allocating temporary storage space for the camera from the disk and storing images in multiple threads, there is no need to compress the image quality during storage. This can not only store images efficiently, but also ensure the original quality and integrity of the image data, providing high-quality image resources for subsequent pipeline defect analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0032] Figure 1 A flowchart of the high-speed image storage method for pipeline defect detection according to the present invention;

[0033] Figure 2 This is a principle block diagram of the pipeline defect detection system of the present invention. DETAILED DESCRIPTION

[0034] The present invention is further described in detail below in conjunction with specific embodiments:

[0035] In the field of oil pipeline inspection, efficient collection and storage of image data is crucial to ensuring energy security and environmental protection. However, when images are stored at high speed, the disk occupancy rate often reaches 100% for a long time, resulting in the loss of images.

[0036] In order to cope with the problem of long-term and high-speed storage of images in an offline and closed oil pipeline environment, the present invention proposes a high-speed image storage method for offline pipeline defect detection. The method pays special attention to fully meeting the needs of 10-channel high-speed cameras and 1-channel infrared camera for all-round and non-dead-angle image acquisition and uncompressed high-speed storage for a long time in this special environment.

[0037] like Figure 1 As shown, a high-speed image storage method for pipeline defect detection includes:

[0038] Before the camera captures images, the memory space of the storage disk in the storage controller is divided into storage space and cache space; multiple section spaces are set in the cache space, the multiple section spaces correspond to the number of cameras one by one, and a threshold is set for each section space.

[0039] When it is detected that there is a picture in the section space opened for the camera, the picture storage mechanism is triggered and the picture will be saved in the storage space. After the storage is completed, the stored picture is retrieved and located in the section space and removed from the section space to free up space for subsequent shooting. This process not only ensures the preservation of pictures, but also optimizes the cache management of the camera.

[0040] Multiple cameras collect local images in the pipeline. If the node space reaches the preset threshold within the shooting time, the camera acquisition rate is adjusted to balance the relative rates of image acquisition and storage, thus buffering the image storage pressure.

[0041] The section space keeps temporarily storing pictures, and the storage space keeps reading and saving the temporarily stored pictures in the section space until the section space is fully utilized and the shooting is terminated.

[0042] In the prior art, one or more cameras usually collect images, and the collected images are queued in order to wait for storage in the disk, which causes heavy disk storage pressure. In addition, in an offline state, data loss is easily caused during the process of queuing images for storage.

[0043] To this end, this embodiment opens up cache space in the disk and divides the cache area for each camera, namely the section space, and multi-threaded cache between cameras to alleviate the read and write pressure of the disk and avoid the problem of data loss caused by storage delay.

[0044] Since the cache space is opened in the memory space, if too many resources are opened, it will inevitably affect the performance of the device. Therefore, how to balance the cache space and image storage becomes an urgent problem to be solved. To this end, the mechanism provided in this embodiment to balance the relative rates of image acquisition and storage and buffer the image storage pressure is:

[0045] Assume that the acquisition rate of a camera is A, the cache rate corresponding to the camera is γ, the node space size is C, the current memory usage rate is U, and the cache adjustment step is α. Then, the balance formula between cache storage and image acquisition rate is obtained.

[0046] C=C×(1+α·sgn(A-γ))·sgn(U-0.8)

[0047] Where sgn(x) is the sign function, defined as:

[0048]

[0049] According to the current node space size C, adjust the camera acquisition rate and reduce the image acquisition rate to buy time for image preservation.

[0050] Specifically, the image acquisition rate is adjusted by changing the camera shooting frame rate. When the section space usage rate U reaches the threshold, the camera acquisition rate is greater than the storage rate and greater than the cache rate of the corresponding section space, the camera shooting frame rate is reduced to maintain a dynamic balance between the image acquisition and cache rates; when the camera acquisition rate is greater than the storage rate and less than the cache rate of the corresponding section space, the camera shooting frame rate is increased to maintain a dynamic balance between the image acquisition and cache rates.

[0051] That is to say, when the camera cache space reaches the preset peak value, the system will automatically adjust to the preset peak frame rate for shooting, ensuring that the disk has enough time to store the image, avoiding storage delays and data loss. For example, when multiple cameras are queued for storage, storing a picture may be delayed by 1000ms, and there is a risk of picture data loss. However, by opening up a section space and adjusting the frame rate, a picture can be stored within 20ms, thereby ensuring the user experience and data integrity.

[0052] In summary, the high-speed image storage method for pipeline defect detection provided by the present invention aims to solve the problem of high-speed image storage in the field of oil pipeline detection. In order to solve the storage bottleneck problem caused by insufficient disk performance, a frame rate adjustment mechanism is introduced to allow users to flexibly adjust the shooting frame rate according to the actual performance of the disk and optimize storage efficiency.

[0053] But at the same time, in order to solve the problem that the disk occupancy rate may suddenly reach 100% after adjusting the frame, a strategy of opening up a separate cache space for each camera is adopted. This strategy is used to temporarily store pictures. At the same time, the system will continuously query the cache space, and once a new picture is found, it will immediately perform the storage operation.

[0054] By introducing a cache mechanism, the read and write pressure on the disk is effectively alleviated, and the problem of long-term high occupancy rate caused by insufficient disk performance is avoided, thereby improving the stability and efficiency of the entire system.

[0055] This method is particularly suitable for offline, closed oil pipeline environments. It supports up to 10 high-speed cameras and 1 infrared camera for all-round, blind-angle-free image acquisition and uncompressed storage to meet the comprehensive business needs of offline video acquisition, storage, management, and analysis.

[0056] In the process of storing images, multi-threaded storage is used to alleviate storage pressure, and non-compression storage technology ensures the original quality of image data, providing high-quality image resources for subsequent pipeline defect analysis.

[0057] Further, see Attachment Figure 2 In the schematic diagram, the present invention provides a pipeline defect detection system for implementing the above-mentioned high-speed image storage method for pipeline defect detection.

[0058] The system includes a storage controller, several high-speed cameras, an infrared camera, a gyroscope, and a pulse signaler; the camera, the pulse signaler, and the gyroscope are respectively connected to the storage controller, and configuration files are configured for the camera, the pulse signaler, and the gyroscope through the storage controller.

[0059] When the camera starts collecting data, the pulse signal transmitter sends a pulse signal to set the collection frequency of the camera, and then uses the gyroscope to determine the angle of the camera to collect image data, and stores the data at the same time.

[0060] In the offline closed oil pipeline, the principles of modularization and scalability are adopted to support data acquisition from up to 10 high-speed cameras and 1 infrared camera. The cameras specifically include 10 high-speed cameras and 1 infrared camera. The storage format of the collected photos is an uncompressed single-channel grayscale image.

[0061] The modular and scalable design supports customized hardware, achieves IP67 protection, adapts to harsh environments, and provides background services and secondary development capabilities. This design not only improves the flexibility and adaptability of the system, but also lays the foundation for future technology upgrades and functional expansion by providing secondary development capabilities.

[0062] In view of the need for high bandwidth and large capacity storage, this embodiment uses a high-performance storage controller such as an Avago RA ID array card to ensure rapid writing of large amounts of data, and is particularly suitable for processing data streams generated by high-speed cameras.

[0063] In addition, a software watchdog setting is set in the storage controller for real-time monitoring and recovery.

[0064] The detection trigger modes of the storage controller include software triggering and hardware triggering. The software triggering is achieved through the system software watchdog design, and the hardware triggering is achieved through the hardware circuit. Both are triggered by obtaining the pulse value emitted by the pulse signaler.

[0065] Among them, the software watchdog mechanism ensures the stability and reliability of the system by monitoring the software running status in real time. When the software terminates unexpectedly, the watchdog can respond quickly and trigger an automatic restart to ensure the continuity of the image processing process. By introducing the software watchdog mechanism, the system's self-recovery ability in the face of abnormal situations is significantly improved, reducing dependence on external monitoring, and providing a solid guarantee for long-term data collection in an offline environment.

[0066] In addition, in the actual implementation process, the file storage, software trigger mode and data acquisition method can be flexibly configured to meet specific application requirements. The system supports two modes: software trigger and hardware trigger to adapt to different operating environments. During the acquisition process, the image data is first temporarily stored in the cache area, and then intelligently written according to the disk status.

[0067] When disk storage pressure increases, use cache space to protect data and avoid loss. After setting a specific shooting time or pulse mileage threshold, the system will automatically start the shooting process, and when the threshold of the camera's set cache space (the same as the aforementioned "segment space") is reached, the camera frame rate adjustment will be started. If there is still cache space left, the system will continue to temporarily store pictures until the cache space is fully utilized and then terminate the shooting process to ensure that all important pictures can be properly saved to avoid loss.

[0068] The high-speed image storage method and system provided by the present invention not only improves the speed and quality of data processing, but also provides a broad space for the future development of oil pipeline detection systems through modular design and intelligent management. This method is particularly suitable for all-round and blind-angle image data collection of the inner wall of oil pipelines, which is of great significance for improving the efficiency and accuracy of oil pipeline detection.

[0069] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the scope of protection of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is limited by the attached claims rather than the above description, and it is intended to include all changes within the meaning and scope of the equivalent elements of the claims in the present invention.

Claims

1. A high-speed image storage method for pipeline defect detection, characterized in that: The method includes: Before the camera captures the image, the memory space of the storage disk in the storage controller is divided into storage space and cache space; multiple section spaces are set in the cache space, the multiple section spaces correspond to the number of cameras one by one, and a threshold is set for each section space; Multiple cameras collect local images in the pipeline. If the node space reaches the preset threshold within the shooting time, the camera acquisition rate is adjusted to balance the relative rates of image acquisition and storage, thus buffering the image storage pressure. The section space keeps temporarily storing pictures, and the storage space keeps reading and saving the temporarily stored pictures in the section space until the section space is fully utilized and the shooting is terminated.

2. A high-speed image storage method for pipeline defect detection according to claim 1, characterized in that: The mechanism to balance the relative rates of image acquisition and storage and buffer image storage pressure is: Assume that the acquisition rate of a camera is A, the cache rate corresponding to the camera is γ, the node space size is C, the current memory usage rate is U, and the cache adjustment step is α. Then, the balance formula between cache storage and image acquisition rate is obtained. C=C×(1+α·sgn(A-γ))·sgn(U-0.8) Where sgn(x) is the sign function, defined as: According to the current node space size C, adjust the camera acquisition rate and reduce the image acquisition rate to buy time for image preservation.

3. A high-speed image storage method for pipeline defect detection according to claim 2, characterized in that: Adjust the image acquisition rate by changing the camera shooting frame rate; When the section space usage rate U reaches the threshold, the camera acquisition rate is greater than the storage rate and greater than the cache rate of the corresponding section space, the camera shooting frame rate is reduced to maintain a dynamic balance between the image acquisition and cache rates; The camera acquisition rate is greater than the storage rate and less than the cache rate of the corresponding node space, which improves the camera shooting frame rate and maintains a dynamic balance between image acquisition and cache rates.

4. A high-speed image storage method for pipeline defect detection according to claim 3, characterized in that: When it is detected that there is a picture in the section space allocated for the camera, the storage mechanism of the picture is triggered, and the picture will be saved in the storage space. After the storage is completed, the stored picture is retrieved and located in the section space, and it is removed from the section space to free up space for subsequent shooting.

5. A pipeline defect detection system, used to implement the high-speed image storage method for pipeline defect detection according to any one of claims 1 to 4, characterized in that: Including storage controller, several high-speed cameras, infrared camera, gyroscope, pulse signal device; The camera, the pulse signaler, and the gyroscope are respectively connected to the storage controller, and configuration files for the camera, the pulse signaler, and the gyroscope are configured through the storage controller; When the camera starts collecting data, the pulse signal transmitter sends a pulse signal to set the collection frequency of the camera, and then uses the gyroscope to determine the angle of the camera to collect image data, and stores the data at the same time.

6. The pipeline defect detection system according to claim 5, characterized in that: The cameras include 10 high-speed cameras and 1 infrared camera.

7. The pipeline defect detection system according to claim 5, characterized in that: The storage controller is an AvagoRAID array card; a software watchdog is used in the storage controller to perform real-time monitoring and recovery.

8. The pipeline defect detection system according to claim 7, characterized in that: The detection trigger mode of the storage controller includes software triggering and hardware triggering. The software triggering is designed through the system software watchdog, and the hardware triggering is implemented through a hardware circuit. Both are triggered by obtaining the pulse value emitted by the pulse signaler.