Method and system for detecting leaks in fire sprinkler piping
By using the minimum support vector machine model in fire pipes and utilizing the whale algorithm to optimize the kernel function and penalty factor, combined with liquid pressure and flow data, the problem of low accuracy in fire pipe leakage detection is solved and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202311174386.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-09-12
AI Technical Summary
The existing fire pipe leakage detection method has low prediction accuracy of machine learning models due to the complexity of the environment, which affects the detection accuracy.
A leakage prediction model based on minimum support vector machine is adopted. The kernel function and penalty factor are optimized by whale algorithm. The leakage location is predicted by combining liquid pressure and flow data. Liquid pressure sensor and flow sensor are used to collect data to build a fire protection pipeline leakage detection system.
The prediction capability and accuracy of the leakage prediction model are improved, and the accuracy of fire protection pipeline leakage detection is enhanced.
Smart Images

Figure CN117028874B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline detection, and in particular to a method and system for detecting leakage of a fire protection pipeline. Background Art
[0002] Fire protection pipes are an important carrier for ensuring fire safety. Timely and accurate judgment of whether fire protection pipes are leaking is of great significance to the safe and stable operation of fire protection pipe systems. Improving the recognition efficiency of algorithms has become a major research issue in the field of pipeline leakage detection.
[0003] Currently, existing fire protection pipe leakage detection methods usually use machine learning algorithms to predict leakage data. However, due to the complexity of the environment, there are distortions in the collection and identification of leakage data in fire protection pipes, which greatly affects the accuracy of predictions based on machine learning models, thereby reducing the detection accuracy of fire protection pipe leakage. Summary of the Invention
[0004] In view of this, the present invention provides a method and system for detecting fire pipe leakage, the main purpose of which is to solve the problem of low accuracy in existing fire pipe leakage detection.
[0005] According to one aspect of the present invention, a method for detecting a fire protection pipe leakage is provided, comprising:
[0006] Obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline respectively;
[0007] The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm;
[0008] Leak point status information corresponding to the input end, the output end, and the middle section is determined based on the leakage location data.
[0009] Furthermore, before performing prediction processing on the liquid pressure data and liquid flow data based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, the method further includes:
[0010] Obtain a labeled pressure and flow training sample set;
[0011] An initial leakage prediction model is constructed based on a minimum support vector machine, and a kernel function and a penalty factor of the minimum support vector machine are solved and optimized based on a whale algorithm to obtain the kernel function and the penalty factor after the solution and optimization;
[0012] The initial leakage prediction model is trained based on the kernel function, the penalty factor, and the pressure and flow training sample set after solving the optimization, to obtain a leakage prediction model that completes model training.
[0013] Furthermore, the kernel function and penalty factor of the minimum support vector machine are solved and optimized based on the whale algorithm, and the kernel function and penalty factor after the solution and optimization are obtained, including:
[0014] In the process of solving the kernel function and the penalty factor based on the whale algorithm, the initial population range in the whale algorithm is expanded based on the adversarial learning strategy to obtain an optimized algorithm population;
[0015] Determining an updated convergence factor based on the convergence factor function, and determining a whale position update function based on the updated convergence factor;
[0016] The kernel function and the penalty factor are iteratively solved based on the whale position update function.
[0017] Furthermore, determining the whale position update function based on the update convergence factor includes:
[0018] Determining an initial whale position update function based on an update convergence factor, and updating the initial whale position update function based on a salp algorithm to obtain an updated whale position update function, so as to iteratively solve the whale position update function;
[0019] The update convergence factor is expressed as t is the number of iterations, T max is the maximum number of iterations, μ is the convergence parameter, π is the circumference, and the updated whale position update function is expressed as X rand (t) is the random whale position, A is the optimization parameter, A=2a·r1-a, r1∈[0,1], ub is the upper limit of the solution, lb is the lower limit of the solution, c2,c3∈[0,1],D=|C·X p (t)-X(t)|,X p (t) is the current optimal solution,
[0020] Furthermore, the iteratively solving the kernel function and the penalty factor based on the whale position update function includes:
[0021] When the absolute value of the optimization parameter is greater than 1, the kernel function and the penalty factor are optimally solved based on the updated whale position update function;
[0022] The method further comprises:
[0023] When the absolute value of the optimization parameter is less than or equal to 1 and the preset variable is less than the variable threshold, the kernel function and the penalty factor are optimally solved based on the initial whale position update function, and the initial whale position update function is X(t+1)=X p (t)-A·D;
[0024] When the absolute value of the optimization parameter is less than or equal to 1 and the preset variable is greater than or equal to the variable threshold, the kernel function and the penalty factor are optimally solved based on the spiral whale position update function, and the spiral whale position update function is X(t+1)=D·e mh ·cos(2πh)+x p (t), m=1, h∈[-1,1];
[0025] The preset variables are used to constrain the whale's position update under different predation forms.
[0026] Furthermore, obtaining a labeled pressure and flow training sample set includes:
[0027] Constructing a flow simulation model of a target fluid in a target fire-fighting pipe, and determining the input end position, output end position, and middle section position of the target fire-fighting pipe;
[0028] At the input end position, the output end position, and the middle section position, pressure sample data and flow sample data corresponding to the input end, the output end, and the middle section of the target fire protection pipeline are collected respectively;
[0029] Determine a mark to be labeled, wherein the mark includes at least five position labels selected between the input end position, the output end position, and the middle section position;
[0030] After completing the labeling operation on the pressure sample data and the flow sample data based on the labeling, a preset proportion of sample data is extracted from the pressure sample data and the flow sample data with the labeling to obtain the pressure and flow training sample set.
[0031] Furthermore, the determining of leakage point status information corresponding to the input end, the output end, and the middle section based on the leakage position data includes:
[0032] Determine leakage location distribution information in the marked pressure sample data and flow sample data;
[0033] Calculating the importance of the leakage location distribution information to obtain a leakage location importance coefficient;
[0034] Based on a preset importance leakage state mapping relationship, the leakage point state information that matches the leakage position importance coefficient is determined. The preset importance leakage state mapping relationship includes a correspondence between different leakage position importance coefficient ranges and different leakage point state information. The leakage point state information includes low-level leakage state, medium-level leakage state, and high-level leakage state.
[0035] According to another aspect of the present invention, there is provided a fire protection pipeline leakage detection system, comprising a liquid pressure sensor, a liquid flow sensor, and a service end;
[0036] The liquid pressure sensor is used to collect liquid pressure data of the fire protection pipeline;
[0037] The liquid flow sensor is used to collect liquid flow data of the fire protection pipeline;
[0038] The service end is used to obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline from the liquid pressure sensor and the liquid flow sensor respectively;
[0039] The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm;
[0040] Leak point status information corresponding to the input end, the output end, and the middle section is determined based on the leakage location data.
[0041] According to another aspect of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the above-mentioned method for detecting fire pipe leakage.
[0042] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0043] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned fire protection pipe leakage detection method.
[0044] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0045] The present invention provides a method and system for detecting fire pipe leaks. The method first obtains liquid pressure data and liquid flow data corresponding to the input end, output end, and middle section of the fire pipe, respectively. The method then predicts and processes the liquid pressure data and liquid flow data based on a trained leakage prediction model to obtain leakage location data for the fire pipe. The leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving the problem based on a whale algorithm. The method then determines the leakage point status information corresponding to the input end, output end, and middle section based on the leakage location data. Compared to the prior art, the embodiments of the present invention significantly improve the prediction capability and accuracy of the leakage prediction model by optimizing the kernel function, i.e., the penalty factor, of the leakage prediction model based on the whale algorithm, thereby improving the accuracy of leak detection.
[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0048] Figure 1 A flow chart of a method for detecting fire protection pipe leakage provided by an embodiment of the present invention is shown;
[0049] Figure 2 A flow chart of another fire protection pipe leakage detection method provided by an embodiment of the present invention is shown;
[0050] Figure 3 A block diagram of a fire protection pipe leakage detection system provided by an embodiment of the present invention is shown;
[0051] Figure 4 A schematic structural diagram of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0052] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0053] In order to solve the problem that the existing fire protection pipe leakage detection method usually adopts the method of predicting leakage data between machine learning algorithms, however, due to the complexity of the environment, there are distortions in the collection and identification of leakage data in fire protection pipes, which greatly affects the accuracy of prediction based on machine learning models, thereby reducing the detection accuracy of fire protection pipe leakage. The embodiment of the present invention provides a method for detecting fire protection pipe leakage, such as Figure 1 As shown, the method includes:
[0054] 101. Obtain liquid pressure data and liquid flow data corresponding to the input end, output end, and middle section of the fire protection pipeline, respectively.
[0055] In an embodiment of the present invention, a fire protection pipe is a pipe in a piping system used to connect firefighting equipment and devices and transport firefighting water or other liquid media. To detect leaks in a fire protection pipe, the current execution entity needs to obtain liquid pressure and liquid flow data at the fire protection pipe's input, output, and intermediate sections. The fire protection pipe is divided into three sections: the input, output, and intermediate sections. The input section is the section of pipe connected to the medium injection port, the output section is the section of pipe connected to the medium output port, and the intermediate section is the section between the input and output ends. The liquid pressure and liquid flow data are collected by pressure sensors installed in each section of the pipe for collecting liquid pressure data and flow sensors for collecting liquid flow data, respectively. The length of each section of the pipe, as well as the number and location of sensors installed in the pipe, can be customized based on the actual application scenario and are not specifically limited by the present embodiment. The current execution entity is the backend server or processor of a fire protection pipe leak detection application or service platform and is not specifically limited by the present embodiment.
[0056] It should be noted that pipeline liquid pressure and flow data are key indicators of the liquid medium's transport status. Leaks at any one or more points in the pipeline will directly impact the liquid pressure and flow. Using these data as leak detection data provides a reliable basis for subsequent testing.
[0057] 102. Perform prediction processing on the liquid pressure data and liquid flow data based on the leakage prediction model for which model training has been completed to obtain leakage location data of the fire protection pipeline.
[0058] In an embodiment of the present invention, after obtaining the liquid pressure data and the liquid flow data, the leakage location in the fire protection pipe is predicted based on the liquid pressure data and the liquid flow data through a leakage prediction model. The leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm (Improved Whale Optimization Algorithm, IWOA). Among them, the minimum support vector machine can be a least squares support vector machine (LS-SVM), or it can be other support vector machines containing kernel functions and penalty factors, which are not specifically limited in the embodiment of the present invention. In the analysis process of the minimum support vector machine for classification and regression estimation of training samples, the solution of the kernel function and penalty factor is an important guarantee for the model learning ability and training quality. Solving the kernel function and penalty factor based on the whale algorithm can improve the accuracy of the kernel function and penalty factor solution, thereby improving the prediction accuracy of the leakage prediction model.
[0059] 103. Determine leakage point status information corresponding to the input end, the output end, and the middle section based on the leakage location data.
[0060] In the embodiment of the present invention, the leakage location data is used to characterize the location of the point where the leakage occurs in the fire protection pipeline. It can be coordinate data in the fire protection pipeline system, distance data from the middle point or starting and ending points of the fire protection pipeline, etc. The embodiment of the present invention does not limit the specific form of the leakage location data. Since the different locations and numbers of leakage points have different impacts on the transmission of the fire protection pipeline medium, it is necessary to determine the leakage point status information of the input end, output end and each section of the pipeline in the middle section according to the leakage location data. Among them, the leakage point status information is used to characterize the degree of influence of the leakage point on the transmission of the fire protection pipeline medium. For example, the number of leakage points appearing in a certain section of the pipeline, the degree of influence of the location of the leakage points appearing in a certain section of the pipeline, etc., are not specifically limited in the embodiment of the present invention.
[0061] In one embodiment of the present invention, for further explanation and limitation, as Figure 2 As shown, before the step of predicting and processing the liquid pressure data and the liquid flow data based on the leakage prediction model for which model training has been completed to obtain the leakage location data of the fire protection pipeline, the method further includes:
[0062] 201. Obtain a labeled pressure and flow training sample set.
[0063] 202. Construct an initial leakage prediction model based on a minimum support vector machine, and optimize the kernel function and penalty factor of the minimum support vector machine based on a whale algorithm to obtain the optimized kernel function and penalty factor.
[0064] 203. Train the initial leakage prediction model based on the optimized kernel function, the penalty factor, and the pressure and flow training sample set to obtain a leakage prediction model that has completed model training.
[0065] In an embodiment of the present invention, the pressure and flow training sample set includes pressure training samples and flow training samples. The pressure training samples and flow training samples can be based on the historical liquid pressure data and historical liquid flow data of the current fire protection pipeline, or can be the historical liquid pressure data and historical liquid flow data of other fire protection pipelines, which are not specifically limited in the embodiment of the present invention. The pressure training samples and flow training samples contain both data with leakage points and data without leakage points, and the data under different circumstances have different labels. The learning and generalization capabilities of the minimum support vector machine depend to a large extent on the kernel function and the penalty factor. The kernel function is used to map data to a high-dimensional space to increase the computing power of the linear learner. The quality of the kernel function directly affects the distribution complexity of the sample in the feature space. If the value of the penalty factor is too large, the generalization ability will be weakened, and if it is too small, the fitting error will be too large. Training the initial leakage prediction model based on the optimized kernel function and penalty factor can effectively improve the linear classification ability of the model in the feature space and the robustness of the model.
[0066] In one embodiment of the present invention, for further explanation and limitation, the step of solving and optimizing the kernel function and penalty factor of the minimum support vector machine based on the whale algorithm to obtain the kernel function and penalty factor after solving and optimizing includes:
[0067] In the process of solving the kernel function and the penalty factor based on the whale algorithm, the initial population range in the whale algorithm is expanded based on the adversarial learning strategy to obtain an optimized algorithm population;
[0068] Determining an updated convergence factor based on the convergence factor function, and determining a whale position update function based on the updated convergence factor;
[0069] The kernel function and the penalty factor are iteratively solved based on the whale position update function.
[0070] In this embodiment of the present invention, the whale algorithm has randomness in the prey search phase and is prone to falling into local optimization. To avoid local optimization, an opposition-based learning strategy (OBL) is introduced. Specifically, assuming that the initial population range of whales is [l,u], and there is a population number x in this range, then the opposite point of x is x′=l+ux. The position of the randomly generated i-th whale in the j-dimensional space is:
[0071]
[0072] Where j = 1, 2, ... d, d is the maximum spatial dimension. According to the definition of the opposite point, the opposite position of the i-th whale can be determined as:
[0073]
[0074] By comparing the fitness functions, the population with the largest population diversity is selected as the initial population, which is expressed as:
[0075]
[0076] Here, fit() is the fitness function. By introducing the adversarial learning strategy, the initial population range of whales is greatly expanded, reducing the probability of random prey search results hitting a specific local area, thereby greatly reducing the probability of local optimization, thereby effectively suppressing its local optimization.
[0077] In one embodiment of the present invention, for further illustration and limitation, the step of determining a whale position update function based on the update convergence factor includes:
[0078] Determining an initial whale position update function based on an update convergence factor, and updating the initial whale position update function based on a salp algorithm to obtain an updated whale position update function, so as to iteratively solve the whale position update function;
[0079] In the embodiment of the present invention, since the convergence factor decreases linearly from 2 to 0, the local search capability development space is large. In order to fully develop the search capability of the convergence factor, the formula of the convergence factor a is changed from Updated to:
[0080] Where t is the number of iterations, T max is the maximum number of iterations, μ is the convergence parameter, which can be set to 0.25, and π is the circumference of the circle. In order to improve the global search capability of the whale algorithm, the Salp Swarm Algorithm (SSA) is introduced in the prey search phase. The original whale position update function X(t+1) = X rand(t)-A·D(6); After introducing the salp algorithm, the updated whale position update function is expressed as:
[0081]
[0082] Among them, X rand (t) is the random whale position, A is the optimization parameter, A=2a·r1-a(8); where r1∈[0,1], ub is the upper limit of the solution, lb is the lower limit of the solution, c2,c3∈[0,1],D=|C·X p (t)-X(t)|(10); where X p (t) is the current optimal solution, By introducing a new convergence factor, the local search capability of the whale algorithm is improved. At the same time, by introducing SSA, the global search capability of the whale algorithm is improved, which greatly improves the search capability of the whale algorithm, thereby improving the optimization ability and efficiency of the kernel function solution, thereby effectively improving the prediction accuracy of the leakage prediction model that has completed model training.
[0083] In one embodiment of the present invention, for further explanation and limitation, the step of iteratively solving the kernel function and the penalty factor based on the whale position update function includes:
[0084] When the absolute value of the optimization parameter is greater than 1, the kernel function and the penalty factor are optimally solved based on the updated whale position update function;
[0085] When the absolute value of the optimization parameter is less than or equal to 1 and the preset variable is less than the variable threshold, the kernel function and the penalty factor are optimally solved based on the initial whale position update function;
[0086] When the absolute value of the optimization parameter is less than or equal to 1, and the preset variable is greater than or equal to the variable threshold, the kernel function and the penalty factor are optimally solved based on the spiral whale position update function.
[0087] In this embodiment of the present invention, a preset variable is introduced to determine the form of whale predation. The predation form is determined by comparing the preset variable with the variable threshold, thereby constraining the whale's position update under different predation forms based on the preset variable. The variable threshold p can be 0.5 or customized within the range of [0, 1] based on the specific application scenario. This is not specifically limited in this embodiment of the present invention. The initial whale position update function is:
[0088] X(t+1)=X p (t)-A·D (12);
[0089] Among them, Xp (t) is the current optimal solution, A is the optimization parameter, and t is the number of iterations. The spiral whale position update function is:
[0090] X(t+1)=D·e mh ·cos(2πh)+x p (t) (13);
[0091] Where m=1, h∈[-1,1], e is the base of natural logarithm, X p (t) is the current optimal solution. By introducing preset variables and using corresponding function pairs to determine the whale's position in different situations, we can achieve a subdivision of fishing patterns and improve the accuracy of the whale algorithm, thereby effectively improving the optimization ability of the kernel function.
[0092] In one embodiment of the present invention, for further explanation and limitation, the step of obtaining a labeled pressure and flow training sample set includes:
[0093] Constructing a flow simulation model of a target fluid in a target fire-fighting pipe, and determining the input end position, output end position, and middle section position of the target fire-fighting pipe;
[0094] At the input end position, the output end position, and the middle section position, pressure sample data and flow sample data corresponding to the input end, the output end, and the middle section of the target fire protection pipeline are collected respectively;
[0095] Determine the mark to be labeled;
[0096] After completing the labeling operation on the pressure sample data and the flow sample data based on the labeling, a preset proportion of sample data is extracted from the pressure sample data and the flow sample data with the labeling to obtain the pressure and flow training sample set.
[0097] In an embodiment of the present invention, before training the leakage prediction model, in order to ensure the pertinence of the training, a fluid simulation model of the target fire protection pipeline that is expected to be predicted is constructed, and the input end position, output end position, and intermediate section position are divided according to this fluid simulation model, and then pressure sample data and flow sample data are collected from each section. Among them, the fluid simulation model can be constructed based on the fluid simulation software Flowmaster, or other fluid software, and the embodiment of the present invention does not make specific limitations. In this fluid simulation model, a leaking valve is used to simulate the time change of leakage, the different sizes of the leak aperture, and the change of the single-point leak position. For example, the Flowmaster simulation parameter settings are as follows: the fire protection pipelines are all incompressible rigid pipes with a diameter of 10 cm, a wall thickness of 5 mm, a friction coefficient of 0.025, and a pipeline length of 300 m except for the marked pipeline; the leak aperture is set to be circular, the negative pressure wave is set to 1200 m / s, the fluid medium is water, the external environment is 1 atmosphere, and the temperature is 20°C. The leakage valve closing time is 0.5s, 1s, 1.5s, and 2s; the leakage valve opening is 0-1, with an opening variation of 0.1 ratio; there are five leakage locations, and 200 data sets are obtained, each divided into the first segment, the middle segment, and the last segment; the sampling frequency is 1000 Hz, and the sampling time is 5s, thereby obtaining a fluid simulation model. After obtaining the sample data, it is labeled. The label includes at least five position labels selected between the input end position, the output end position, and the middle segment position. The label content may include whether there is a leak and may also include information such as the leak aperture, but this embodiment is not limited to this. After labeling, a portion of the labeled sample data is randomly extracted according to a preset ratio to form a pressure and flow training sample set. The preset ratio can be 3 / 4 or a custom ratio, but this embodiment is not limited to this. The remaining sample data after the training sample extraction can be imported into the fluid simulation model to verify the recognition rate of the leakage signal.
[0098] In one embodiment of the present invention, for further explanation and limitation, the step of determining the leakage point status information corresponding to the input end, the output end, and the intermediate section based on the leakage location data includes:
[0099] Determine leakage location distribution information in the marked pressure sample data and flow sample data;
[0100] Calculating the importance of the leakage location distribution information to obtain a leakage location importance coefficient;
[0101] Leakage point status information that matches the leakage position importance coefficient is determined based on a preset importance leakage status mapping relationship.
[0102] In an embodiment of the present invention, in order to achieve fine-grained classification of leakage states, the leakage location distribution information of the sample data is determined, and the importance coefficient of the leakage location is calculated based on the location of the leakage. For example, the importance is calculated based on the distance of the leakage location from the input port in the axial direction of the pipeline, and the importance coefficient is calculated based on the distribution of the leakage location around the pipe wall. The importance coefficient is used to characterize the extent of the impact of the leakage location on the fluid transmission in the pipeline. The preset importance leakage state mapping relationship includes the correspondence between the importance coefficient ranges of different leakage locations and different leakage point status information. The leakage point status information includes low-level leakage state, medium-level leakage state, and high-level leakage state. Among them, the importance coefficient corresponding to the low-level leakage state is the leakage location, the importance coefficient corresponding to the medium-level leakage state is higher than the importance coefficient corresponding to the low-level leakage state, and the importance coefficient corresponding to the high-level leakage state is the highest. The range division of the importance coefficients corresponding to different levels of leakage states can be customized according to specific application requirements and is not specifically limited by the embodiment of the present invention. By classifying the leakage status into different levels, a reference can be provided for subsequent pipeline maintenance such as the leakage point treatment method and treatment sequence. For example, when there are multiple leakage points, the repair sequence of the leakage points can be determined according to the degree of impact of the leakage points, or the shutdown maintenance or maintenance during the transmission process can be determined according to the number of leakage points, thereby improving the accuracy and efficiency of the treatment of fire protection pipeline leakage.
[0103] According to another aspect of the present invention, Figure 3 As shown, a fire protection pipe leakage detection system is provided, including a liquid pressure sensor 31, a liquid flow sensor 32, and a service end 33;
[0104] The liquid pressure sensor 31 is used to collect liquid pressure data of the fire protection pipeline;
[0105] The liquid flow sensor 32 is used to collect liquid flow data of the fire protection pipeline;
[0106] The server 33 is used to obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline from the liquid pressure sensor and the liquid flow sensor respectively;
[0107] The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm;
[0108] Leak point status information corresponding to the input end, the output end, and the middle section is determined based on the leakage location data.
[0109] The application provides a fire-fighting pipeline leakage detection system. Liquid pressure data and liquid flow data corresponding to an input end, an output end and an intermediate section of a fire-fighting pipeline are acquired first. The liquid pressure data and the liquid flow data are processed by a leakage prediction model which has completed model training, so as to obtain leakage position data of the fire-fighting pipeline. The leakage prediction model is constructed based on a least support vector machine, and the kernel function and the penalty factor of the least support vector machine are obtained by solving based on a whale optimization algorithm. Leakage point state information corresponding to the input end, the output end and the intermediate section is determined based on the leakage position data. Compared with the prior art, the kernel function and the penalty factor of the leakage prediction model are optimized and solved based on the whale optimization algorithm, so that the prediction ability and the prediction accuracy of the leakage prediction model are greatly improved, and the leakage detection accuracy is improved.
[0110] According to an embodiment of the application, a storage medium is provided, and the storage medium stores at least one executable instruction. The computer executable instruction can execute the leakage detection method of the fire-fighting pipeline in any method embodiment.
[0111] Figure 4 A structural schematic diagram of a terminal according to an embodiment of the application is shown, and specific implementation of the terminal is not limited by the embodiments of the application.
[0112] As shown in Figure 4 the terminal can include a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0113] The processor 402, the communications interface 404, and the memory 406 can communicate with each other through the communications bus 408.
[0114] The communications interface 404 is configured to communicate with network elements such as clients or other servers.
[0115] The processor 402 is configured to execute the program 410, and specifically can execute related steps in the leakage detection method of the fire-fighting pipeline.
[0116] Specifically, the program 410 can include program code, and the program code includes computer operation instructions.
[0117] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0118] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0119] The program 410 may be specifically configured to cause the processor 402 to perform the following operations:
[0120] Obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline respectively;
[0121] The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm;
[0122] Leak point status information corresponding to the input end, the output end, and the middle section is determined based on the leakage location data.
[0123] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0124] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for detecting leakage of a fire protection pipe, characterized in that: include: Obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline respectively; The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm; determining leakage point status information corresponding to the input end, the output end, and the middle section based on the leakage location data; Before performing prediction processing on the liquid pressure data and the liquid flow data by the leakage prediction model based on the completed model training to obtain the leakage location data of the fire protection pipeline, the method further includes: Obtain a labeled pressure and flow training sample set; An initial leakage prediction model is constructed based on a minimum support vector machine, and a kernel function and a penalty factor of the minimum support vector machine are solved and optimized based on a whale algorithm to obtain the kernel function and the penalty factor after the solution and optimization; The initial leakage prediction model is trained based on the optimized kernel function, the penalty factor, and the pressure and flow training sample set to obtain a leakage prediction model that completes model training; The kernel function and penalty factor of the minimum support vector machine are solved and optimized based on the whale algorithm to obtain the kernel function and penalty factor after the solution and optimization, including: In the process of solving the kernel function and the penalty factor based on the whale algorithm, the initial population range in the whale algorithm is expanded based on the adversarial learning strategy to obtain an optimized algorithm population; Determining an updated convergence factor based on the convergence factor function, and determining a whale position update function based on the updated convergence factor; Iteratively solving the kernel function and the penalty factor based on the whale position update function; Determining the whale position update function based on the update convergence factor includes: Determining an initial whale position update function based on an update convergence factor, and updating the initial whale position update function based on a salp algorithm to obtain an updated whale position update function, so as to iteratively solve the whale position update function; The update convergence factor is expressed as t is the number of iterations, T max is the maximum number of iterations, μ is the convergence parameter, π is the circumference, and the updated whale position update function is expressed as X rand (t) is the random whale position, A is the optimization parameter, A=2a·r1-a, r1∈[0,1], ub is the upper limit of the solution, lb is the lower limit of the solution, c2,c3∈[0,1],D=|C·X p (t)-X(t)|,X p (t) is the current optimal solution, 2. The method according to claim 1, characterized in that The iteratively solving the kernel function and the penalty factor based on the whale position update function includes: When the absolute value of the optimization parameter is greater than 1, the kernel function and the penalty factor are optimally solved based on the updated whale position update function; The method further comprises: When the absolute value of the optimization parameter is less than or equal to 1 and the preset variable is less than the variable threshold, the kernel function and the penalty factor are optimally solved based on the initial whale position update function, and the initial whale position update function is X(t+1)=X p (t)-A·D; When the absolute value of the optimization parameter is less than or equal to 1 and the preset variable is greater than or equal to the variable threshold, the kernel function and the penalty factor are optimally solved based on the spiral whale position update function, and the spiral whale position update function is X(t+1)=D·e mh ·cos(2πh)+x p (t), m=1, h∈[-1,1]; The preset variables are used to constrain the whale's position update under different predation forms.
3. The method according to claim 1, characterized in that The step of obtaining a labeled pressure and flow training sample set includes: Constructing a flow simulation model of a target fluid in a target fire-fighting pipe, and determining the input end position, output end position, and middle section position of the target fire-fighting pipe; At the input end position, the output end position, and the middle section position, pressure sample data and flow sample data corresponding to the input end, the output end, and the middle section of the target fire protection pipeline are collected respectively; Determine a mark to be labeled, wherein the mark includes at least five position labels selected between the input end position, the output end position, and the middle section position; After completing the labeling operation on the pressure sample data and the flow sample data based on the labeling, a preset proportion of sample data is extracted from the pressure sample data and the flow sample data with the labeling to obtain the pressure and flow training sample set.
4. The method according to claim 1, wherein The determining of leakage point status information corresponding to the input end, the output end, and the middle section based on the leakage location data includes: Determine leakage location distribution information in the marked pressure sample data and flow sample data; Calculating the importance of the leakage location distribution information to obtain a leakage location importance coefficient; Based on a preset importance leakage state mapping relationship, the leakage point state information that matches the leakage position importance coefficient is determined. The preset importance leakage state mapping relationship includes a correspondence between different leakage position importance coefficient ranges and different leakage point state information. The leakage point state information includes low-level leakage state, medium-level leakage state, and high-level leakage state.
5. A fire protection pipe leakage detection system, characterized in that: Including liquid pressure sensor, liquid flow sensor, and server; The liquid pressure sensor is used to collect liquid pressure data of the fire protection pipeline; The liquid flow sensor is used to collect liquid flow data of the fire protection pipeline; The service end is used to obtain the liquid pressure data and liquid flow data corresponding to the input end, output end and middle section of the fire protection pipeline from the liquid pressure sensor and the liquid flow sensor respectively; The liquid pressure data and liquid flow data are predicted and processed based on the leakage prediction model that has completed model training to obtain the leakage location data of the fire protection pipeline, wherein the leakage prediction model is constructed based on a minimum support vector machine, and the kernel function and penalty factor of the minimum support vector machine are obtained by solving based on the whale algorithm; determining leakage point status information corresponding to the input end, the output end, and the middle section based on the leakage location data; The server is further configured to obtain a labeled pressure flow training sample set; construct an initial leakage prediction model based on a minimum support vector machine, and perform a solution and optimization process on the kernel function and penalty factor of the minimum support vector machine based on a whale algorithm to obtain the kernel function and penalty factor after solution and optimization; train the initial leakage prediction model based on the kernel function, penalty factor, and the pressure flow training sample set after solution and optimization to obtain a leakage prediction model that has completed model training; The server is further configured to, in the process of solving the kernel function and the penalty factor based on the whale algorithm, expand the initial population range in the whale algorithm based on an adversarial learning strategy to obtain an optimized algorithm population; determine an updated convergence factor based on a convergence factor function, and determine a whale position update function based on the updated convergence factor; and iteratively solve the kernel function and the penalty factor based on the whale position update function; The server is further configured to determine an initial whale position update function based on an update convergence factor, and update the initial whale position update function based on a salp algorithm to obtain an updated whale position update function, so as to perform an iterative solution based on the whale position update function; wherein the update convergence factor is expressed as t is the number of iterations, T max is the maximum number of iterations, μ is the convergence parameter, π is the circumference, and the updated whale position update function is expressed as X rand (t) is the random whale position, A is the optimization parameter, A=2a·r1-a, r1∈[0,1], ub is the upper limit of the solution, lb is the lower limit of the solution, c2,c3∈[0,1],D=|C·X p (t)-X(t)|,X p (t) is the current optimal solution, 6. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute an operation corresponding to the method for detecting fire pipe leakage according to any one of claims 1 to 4.
7. A terminal comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the fire protection pipe leakage detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Natural gas pipeline leakage detection method
CN111734961A
Optimization method based on improved whale
CN116468181A