Method, device and electronic equipment for detecting gas leakage
By monitoring methane concentration and matching similarity in the gas pipeline network, gas leaks can be automatically identified, solving the problem of distinguishing between natural gas and biogas, and improving the accuracy and safety of gas leak detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING GLOBAL SAFETY TECH
- Filing Date
- 2023-01-03
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, methane concentration sensors cannot effectively distinguish between natural gas and biogas, causing gas leak detection to rely on personal experience and lack accuracy.
By monitoring the methane concentration of the target gas pipeline network, abnormal events are obtained, and similarity is matched with historical concentration anomalies. The gas leak is then automatically determined using the annotation information.
It enables automatic and accurate detection of gas leaks, reduces false alarms, provides gas leak levels and handling strategies, and ensures safety in production and daily life.
Smart Images

Figure CN116045219B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus and electronic device for detecting gas leaks. Background Technology
[0002] With the acceleration of urbanization, the scale of urban gas pipeline construction has grown rapidly. To ensure the safety of residents' production and daily life, methane concentration sensors are installed in manholes to monitor for gas pipeline leaks.
[0003] However, manholes, as underground spaces for the transfer and control of urban underground pipelines, may generate significant amounts of methane. Methane concentration sensors cannot effectively distinguish between natural gas and methane. When assessing gas leaks, personnel often rely on analyzing abnormal methane concentration data and personal experience to determine if a leak has occurred. The accuracy of this assessment is limited by individual experience and carries a risk of misjudgment. Summary of the Invention
[0004] This disclosure aims to at least partially address one of the technical problems in the related art.
[0005] This disclosure proposes a method, apparatus, and electronic device for detecting gas leaks, which can automatically identify target concentration anomalies that match methane concentration anomalies, thereby effectively determining whether a gas leak has occurred in a target gas pipeline network based on the labeling information of the target concentration anomaly events.
[0006] The first aspect of this disclosure provides a method for detecting gas leaks, the method comprising:
[0007] Methane concentration monitoring is performed on the target manholes corresponding to the target gas pipeline network to identify abnormal methane concentration events;
[0008] Based on the methane concentration anomaly event, at least one first concentration anomaly event is obtained from multiple historical concentration anomaly events;
[0009] Determine the similarity between any of the first concentration anomaly events and the methane concentration anomaly events;
[0010] Based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event is determined from the at least one first concentration anomaly event, so as to determine whether the target gas pipeline network has experienced a gas leak based on the labeling information of the target concentration anomaly event.
[0011] Optionally, obtaining at least one first concentration anomaly event from multiple historical concentration anomaly events based on the methane concentration anomaly event includes: dividing the methane concentration anomaly events to obtain a first sequence corresponding to the methane concentration anomaly event, wherein the first sequence includes at least one first sub-event; obtaining a second sequence corresponding to any of the historical concentration anomaly events, wherein the second sequence includes at least one second sub-event; matching the first sub-event with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event; and if the third sub-event exists, using the historical concentration anomaly event as the first concentration anomaly event.
[0012] Optionally, the step of segmenting the methane concentration anomaly event to obtain a first sequence corresponding to the methane concentration anomaly event includes: segmenting the methane concentration anomaly event into fragments to obtain a third sequence, and obtaining a first sequence of the third sequence; obtaining feature vectors of each initial fragment; merging each initial fragment in the third sequence according to a first predetermined order based on the feature vectors of each initial fragment to obtain a fourth sequence; wherein the fourth sequence includes at least one fourth sub-event; merging each initial fragment in the third sequence according to a second predetermined order based on the feature vectors of each initial fragment to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event; the second predetermined order is the opposite of the first predetermined order; and determining the first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence.
[0013] Optionally, determining the first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence includes: if the first number of fourth sub-events in the fourth sequence is the same as the second number of fifth sub-events in the fifth sequence, then the fourth sequence or the fifth sequence is taken as the first sequence; if the first number is different from the second number, then if the first number is less than the second number, then the fourth sequence is taken as the first sequence; if the second number is less than the first number, then the fifth sequence is taken as the first sequence.
[0014] Optionally, the first predetermined order is from left to right. The step of merging the initial segments in the third sequence according to the first predetermined order based on the feature vectors of each initial segment to obtain a fourth sequence includes: for the i-th initial segment in the third sequence, merging the feature vectors of the (i+1)-th initial segments in the third sequence with the feature vector of the i-th initial segment to obtain a merged feature; if the merged feature matches the feature vector of the i-th initial segment, then the i-th initial segment and the (i+1)-th initial segment belong to the same fourth sub-event, and the i-th initial segment and the (i+1)-th initial segment are merged into the same fourth sub-event; if the merged feature does not match the feature vector of the i-th initial segment, then the i-th initial segment and the (i+1)-th initial segment belong to different fourth sub-events; where i is a positive integer not greater than N, and N is the number of initial segments.
[0015] Optionally, the method further includes: determining a first total number of second sub-events in a plurality of second sequences, and determining a second total number of the plurality of historical concentration anomaly events; for any second sub-event, determining a third number of the second sub-events in the plurality of historical concentration anomaly events; determining a first frequency corresponding to the second sub-event based on the first total number and the third number; determining a second concentration anomaly event from the plurality of historical concentration anomaly events, and determining a fourth number of the second concentration anomaly event; wherein the second concentration anomaly event includes the second sub-event; determining a second frequency corresponding to the second sub-event based on the second total number and the fourth number; and determining a weight corresponding to the second sub-event based on the first frequency and the second frequency.
[0016] Optionally, determining the similarity between any first concentration anomaly event and the methane concentration anomaly event includes: determining the maximum common continuous sub-event between the sixth sequence and the first sequence based on the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event; obtaining the weights corresponding to each sixth sub-event in the maximum common continuous sub-event; and determining the similarity between the first concentration anomaly event and the methane concentration anomaly event based on the number of sixth sub-events in the maximum common continuous sub-event and the weights corresponding to each sixth sub-event.
[0017] Optionally, the method further includes: if, based on the annotation information, it is determined that a gas leak has occurred in the target gas pipeline network, determining the target level of the gas leak and the corresponding handling strategy based on the annotation information.
[0018] A second aspect of this disclosure provides a gas leak detection device, comprising:
[0019] The detection module is used to monitor the methane concentration of the target manholes corresponding to the target gas pipeline network in order to obtain abnormal methane concentration events.
[0020] The acquisition module is used to acquire at least one first concentration anomaly event from multiple historical concentration anomaly events based on the methane concentration anomaly event.
[0021] The first determining module is used to determine the similarity between any of the first concentration anomaly events and the methane concentration anomaly events;
[0022] The second determining module is used to determine, based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event from the at least one first concentration anomaly event, so as to determine whether the target gas pipeline network has experienced a gas leak based on the labeling information of the target concentration anomaly event.
[0023] A third aspect of this disclosure provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the gas leak detection method as described in the first aspect.
[0024] The fourth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the gas leak detection method as described in the first aspect.
[0025] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the gas leak detection method described in the first aspect of this disclosure.
[0026] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:
[0027] By monitoring the methane concentration in target manholes corresponding to the target gas pipeline network, abnormal methane concentration events are identified. Based on these events, at least one first concentration anomaly is obtained from multiple historical anomaly events. The similarity between any first concentration anomaly event and the methane concentration anomaly event is determined. Based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event is identified from the at least one first concentration anomaly event. Based on the annotation information of the target concentration anomaly event, it can be determined whether a gas leak has occurred in the target gas pipeline network. Therefore, target concentration anomaly events matching the methane concentration anomaly events can be automatically identified, thus effectively determining whether a gas leak has occurred in the target gas pipeline network based on the annotation information of the target concentration anomaly events.
[0028] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0029] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0030] Figure 1 This is a schematic flowchart of the gas leak detection method provided in Embodiment 1 of this disclosure;
[0031] Figure 2 The monitoring data on methane concentration provided in this disclosure;
[0032] Figure 3 This is a line graph showing the changes in methane concentration provided in this disclosure;
[0033] Figure 4 This is a schematic diagram of anomaly events in methane concentration provided in this disclosure;
[0034] Figure 5 This is a schematic flowchart of the gas leak detection method provided in Embodiment 2 of this disclosure;
[0035] Figure 6 This is a schematic flowchart of the gas leak detection method provided in Embodiment 3 of this disclosure;
[0036] Figure 7 This is a schematic flowchart of the gas leak detection method provided in Embodiment 4 of this disclosure;
[0037] Figure 8 This is a flowchart illustrating the gas leak detection method provided in this disclosure;
[0038] Figure 9 A schematic diagram of the preparation process for historical methane concentration anomalies provided in this disclosure;
[0039] Figure 10 This is a schematic diagram of the structure of a gas leak detection device provided in Embodiment 5 of this disclosure;
[0040] Figure 11 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0041] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0042] The following description, with reference to the accompanying drawings, outlines a method, apparatus, and electronic device for detecting gas leaks according to embodiments of the present disclosure.
[0043] Figure 1 This is a schematic flowchart of the gas leak detection method provided in Embodiment 1 of this disclosure.
[0044] This disclosure illustrates the example of a gas leak detection method configured in a gas leak detection device. This gas leak detection device can be applied to any electronic device so that the electronic device can perform the gas leak detection function.
[0045] Among them, electronic devices can be any device with computing capabilities, such as PCs (Personal Computers), host computers, mobile terminals, servers, etc. Mobile terminals can be, for example, in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, and other hardware devices with various operating systems, touch screens, and / or displays.
[0046] like Figure 1 As shown, the gas leak detection method may include the following steps:
[0047] Step 101: Monitor the methane concentration of the target manholes corresponding to the target gas pipeline network to obtain methane concentration abnormal events.
[0048] In this embodiment of the disclosure, the target manhole can be an underground space for the transfer and control of underground pipelines of the target gas pipeline network.
[0049] In this embodiment of the disclosure, an abnormal methane concentration event can be a process of methane concentration change within a continuous time period from the start time of detecting the abnormal methane concentration to the end time of detecting the abnormal methane concentration. In this case, a situation where the methane concentration is greater than a set concentration (e.g., 1%, 1.5%, etc.) can be regarded as an abnormal methane concentration.
[0050] For example, assuming the concentration is set at 1%, the start time for detecting methane concentration greater than 1% is 05:17:36 on January 11, 2019, and the end time for detecting methane concentration greater than 1% is 01:17:36 on January 24, 2019. The process of methane concentration change during the continuous time period from 05:17:36 on January 11, 2019 to 01:17:36 on January 24, 2019 can be regarded as an abnormal methane concentration event.
[0051] In this embodiment of the disclosure, methane concentration monitoring can be performed on the target manhole corresponding to the target gas pipeline network to obtain methane concentration abnormal events.
[0052] As an example, data sensors (such as methane concentration sensors) can be deployed in the target manholes corresponding to the target gas pipeline network to monitor the methane concentration of the target manholes at a set time interval (such as 1 hour, 2 hours, etc.). Based on the monitored methane concentration, abnormal methane concentration events can be obtained.
[0053] For example, during the continuous time period from 03:17:36 on January 1, 2019 to 23:17:36 on January 31, 2019, a methane concentration sensor was used to monitor the methane concentration in the target manhole at a 2-hour interval. The methane concentration in the target manhole was acquired and recorded. The methane concentration monitoring data is as follows: Figure 2 As shown; simultaneously, a line graph of methane concentration change can be plotted with time on the horizontal axis and methane concentration on the vertical axis, as shown in the figure. Figure 3 As shown, the start time for methane concentration exceeding 1% vol is 05:17:36 on January 11, 2019, and the end time for methane concentration exceeding 1% is 01:17:36 on January 24, 2019. The continuous period of methane concentration change between 05:17:36 on January 11, 2019, and 01:17:36 on January 24, 2019, can be considered a methane concentration anomaly event. This methane concentration anomaly event can be obtained as follows: Figure 4 As shown.
[0054] Step 102: Based on the methane concentration anomaly event, obtain at least one first concentration anomaly event from multiple historical concentration anomaly events.
[0055] In this embodiment of the disclosure, historical concentration anomalies can indicate historical events of abnormal methane concentrations.
[0056] In the embodiments of this disclosure, the first concentration abnormal event may be, but is not limited to, one, and this disclosure does not impose any restrictions on it.
[0057] In this embodiment of the disclosure, at least one first concentration anomaly event can be obtained from multiple historical concentration anomaly events based on the methane concentration anomaly event.
[0058] Step 103: Determine the similarity between any first concentration anomaly event and the methane concentration anomaly event.
[0059] In embodiments of this disclosure, the similarity between any first concentration anomaly event and a methane concentration anomaly event can be determined.
[0060] Step 104: Based on similarity, identify a target concentration anomaly event that matches the methane concentration anomaly event from at least one first concentration anomaly event, so as to determine whether a gas leak has occurred in the target gas pipeline network based on the labeling information of the target concentration anomaly event.
[0061] In this embodiment of the disclosure, the labeling information can be used to indicate whether a gas leak has occurred in the target gas pipeline network.
[0062] In this embodiment of the disclosure, a target concentration anomaly event matching the methane concentration anomaly event can be determined from at least one first concentration anomaly event based on similarity. For example, the maximum similarity can be determined from multiple similarities, and the first concentration anomaly event corresponding to the maximum similarity can be used as the target concentration anomaly event matching the methane concentration anomaly event.
[0063] Therefore, in this disclosure, it is possible to determine whether a gas leak has occurred in the target gas pipeline network based on the labeling information of the target concentration anomaly event.
[0064] In one possible implementation of this disclosure, when it is determined that a gas leak has occurred in the target gas pipeline network based on the labeling information, the target level of the gas leak and the corresponding handling strategy can also be determined based on the labeling information.
[0065] In this embodiment of the disclosure, the target level can be used to indicate the extent of a gas leak.
[0066] In this embodiment of the disclosure, the labeling information can also be used to indicate the level of gas leakage (referred to as the target level in this disclosure).
[0067] In this embodiment of the disclosure, a correspondence between the level of gas leakage and the treatment strategy can be established in advance. Thus, in this disclosure, after determining the target level of gas leakage based on the labeling information, the treatment strategy can be determined based on the target level.
[0068] This allows relevant personnel to promptly obtain the level of gas leaks and corresponding handling strategies, enabling them to inspect and maintain the target gas pipeline network according to the strategies, thereby ensuring production and daily life safety.
[0069] The gas leak detection method of this disclosure involves monitoring the methane concentration in a target manhole corresponding to a target gas pipeline network to obtain methane concentration anomaly events; obtaining at least one first concentration anomaly event from multiple historical concentration anomaly events based on the methane concentration anomaly events; determining the similarity between any first concentration anomaly event and the methane concentration anomaly event; and determining a target concentration anomaly event matching the methane concentration anomaly event from the at least one first concentration anomaly event based on the similarity, so as to determine whether a gas leak has occurred in the target gas pipeline network based on the annotation information of the target concentration anomaly event. Therefore, a target concentration anomaly event matching the methane concentration anomaly event can be automatically determined, thereby effectively determining whether a gas leak has occurred in the target gas pipeline network based on the annotation information of the target concentration anomaly event.
[0070] To clearly illustrate how at least one first concentration anomaly event is obtained from multiple historical concentration anomaly events based on methane concentration anomaly events in the above embodiments of this disclosure, this disclosure also proposes a gas leak detection method.
[0071] Figure 5 This is a schematic flowchart of the gas leak detection method provided in Embodiment 2 of this disclosure.
[0072] like Figure 5 As shown, the gas leak detection method may include the following steps:
[0073] Step 501: Monitor the methane concentration of the target manhole corresponding to the target gas pipeline network to obtain methane concentration abnormal events.
[0074] The execution process of step 501 can be referred to the execution process of any embodiment of this disclosure, and will not be repeated here.
[0075] Step 502: Divide the methane concentration abnormal events to obtain the first sequence corresponding to the methane concentration abnormal events, wherein the first sequence includes at least one first sub-event.
[0076] In this embodiment of the disclosure, the first sub-event may be the process of methane concentration change within a certain time period in a methane concentration anomaly event.
[0077] In the embodiments of this disclosure, the first sequence may be an arrangement of the first sub-events according to their corresponding chronological order, and the first sequence may include one first sub-event or multiple first sub-events, which is not limited in this disclosure.
[0078] It should be noted that the first sequence may include multiple identical (or matching) first sub-events, and the times corresponding to any two of the multiple identical first sub-events are not consecutive.
[0079] It should also be noted that in this disclosure, feature vectors of first sub-events that are not consecutive in any two time periods can be obtained, and similarity algorithms (such as cosine similarity, Euclidean distance, etc.) can be used to determine the similarity between feature vectors corresponding to first sub-events that are not consecutive in any two time periods. When the similarity between feature vectors corresponding to first sub-events that are not consecutive in any two time periods is greater than a first set threshold (such as 95%, 98%, etc.), the first sub-events that are not consecutive in any two time periods are the same (or match).
[0080] In this embodiment of the disclosure, methane concentration abnormal events can be divided to obtain a first sequence corresponding to the methane concentration abnormal events, wherein the first sequence includes at least one first sub-event.
[0081] For example, assuming the start time of the methane concentration anomaly event is t1 and the end time is t2, the methane concentration anomaly event is divided into the first sequence ABCA. In this first sequence, the time period corresponding to the first sub-event A from left to right is [t1, t3), the time period corresponding to the second sub-event B is [t3, t4), the time period corresponding to the third sub-event C is [t4, t5), and the time period corresponding to the fourth sub-event A is [t5, t2].
[0082] Step 503: Obtain the second sequence corresponding to any historical concentration anomaly event, wherein the second sequence includes at least one second sub-event.
[0083] In the embodiments of this disclosure, the second sub-event may be obtained by dividing historical concentration anomaly events, and the second sub-event may be, but is not limited to, one; this disclosure imposes limitations on this.
[0084] In this embodiment of the disclosure, at least one second sub-event corresponding to any historical concentration anomaly event can be obtained.
[0085] As an example, any historical concentration anomaly event can be pre-divided to obtain at least one second sub-event; a correspondence between the any historical concentration anomaly event and at least one second sub-event can be established and the correspondence can be saved. Thus, in this disclosure, the above correspondence can be queried to obtain at least one second sub-event corresponding to any historical concentration anomaly event.
[0086] It should be noted that the method for classifying any historical concentration anomaly event is similar to the method for classifying methane concentration anomaly events, and will not be elaborated here.
[0087] It should also be noted that any two second sub-events in each of the multiple second sequences can be matched in advance to determine whether the two second sub-events are the same (or match). If they are the same, the same identifier can be used to identify the same second sub-event.
[0088] Step 504: Match the first sub-event with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event.
[0089] It should be noted that when determining whether the first sub-event matches (or is the same as) any second sub-event, the method for determining the first sub-event of any two discontinuous time periods in step 502 can be used, which will not be elaborated here.
[0090] In this embodiment of the disclosure, a second sequence can be queried based on a first sub-event to determine whether there is a third sub-event in the second sequence that matches (or is the same as) the first sub-event.
[0091] For example, if the first sub-event is A and the second sequence is BCDB, after querying the second sequence, it is determined that there is a third sub-event C in the second sequence that matches (or is the same as) the first sub-event.
[0092] Step 505: If a third sub-event exists, the historical concentration anomaly event is taken as the first concentration anomaly event.
[0093] In this embodiment of the disclosure, if a third sub-event exists, a historical concentration anomaly event can be used as the first concentration anomaly event.
[0094] Step 506: Determine the similarity between any first concentration anomaly event and the methane concentration anomaly event.
[0095] Step 507: Based on similarity, identify a target concentration anomaly event that matches the methane concentration anomaly event from at least one first concentration anomaly event, so as to determine whether a gas leak has occurred in the target gas pipeline network based on the labeling information of the target concentration anomaly event.
[0096] The execution process of steps 506 to 507 can be referred to the execution process of any embodiment of this disclosure, and will not be described in detail here.
[0097] In one possible implementation of this disclosure, a first total number of second sub-events in a plurality of second sequences can be determined, and a second total number of a plurality of historical concentration anomaly events can be determined; for any second sub-event, a third number of second sub-events in the plurality of historical concentration anomaly events can be determined; based on the first total number and the third number, a first frequency corresponding to the second sub-event can be determined; from the plurality of historical concentration anomaly events, a second concentration anomaly event can be determined, and a fourth number of the second concentration anomaly event can be determined; wherein, the second concentration anomaly event includes a second sub-event; based on the second total number and the fourth number, a second frequency corresponding to the second sub-event can be determined; based on the first frequency and the second frequency, a weight corresponding to the second sub-event can be determined.
[0098] As an example, suppose the first total number of second sub-events in multiple second sequences is m1, and the second total number of historical concentration events is m1; for any second sub-event, the third quantity of that second sub-event among the multiple historical concentration anomaly events is n1; based on the first total number and the third quantity, the first frequency of that second sub-event can be determined as n1 / m1; from the multiple historical concentration anomaly events, a second concentration anomaly event including that second sub-event can be identified, and the fourth quantity of the second concentration anomaly event n2 can be determined; based on the second total number and the fourth quantity, the second frequency corresponding to that second sub-event can be determined as log(m1 / n2); based on the first frequency and the second frequency, the weight Q corresponding to that second sub-event can be determined as:
[0099]
[0100] For example, given multiple second sequences such as ABCAD, EBCADA, CBCAEA, and CDCADA, the total number of second sub-events within these sequences is 23, the total number of historical concentration events is 4, and for the second sub-event B, the third number of B among these historical concentration anomalies is 3. Based on the first and third totals, the first frequency of B is determined to be 3 / 23. From these historical concentration anomalies, second concentration anomalies including B can be identified, and the fourth number of these second concentration anomalies is determined to be 3. Based on the second and fourth totals, the second frequency of B is determined to be log(4 / 3). Based on the first and second frequencies of B, the corresponding weight of B is determined as follows:
[0101] Therefore, the weights corresponding to each second sub-event can be obtained.
[0102] The gas leak detection method of this disclosure involves dividing methane concentration anomaly events to obtain a first sequence corresponding to each methane concentration anomaly event, wherein the first sequence includes at least one first sub-event; obtaining a second sequence corresponding to any historical concentration anomaly event, wherein the second sequence includes at least one second sub-event; matching the first sub-event with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event; and if a third sub-event exists, using the historical concentration anomaly event as the first concentration anomaly event. Therefore, based on the first sub-event in the methane concentration anomaly event and the second sub-event in the historical concentration anomaly event, the first concentration anomaly event can be effectively determined from the methane concentration anomaly events.
[0103] To clearly illustrate how methane concentration anomaly events are classified in the above embodiments of this disclosure to obtain the first sequence corresponding to the methane concentration anomaly events, this disclosure also proposes a gas leak detection method.
[0104] Figure 6 This is a schematic flowchart of the gas leak detection method provided in Embodiment 3 of this disclosure.
[0105] like Figure 6 As shown, based on the above embodiments of this disclosure, the gas leak detection method may further include the following steps:
[0106] Step 601: The methane concentration anomaly event is segmented to obtain a third sequence, wherein the third sequence includes multiple initial segments.
[0107] In this embodiment of the disclosure, methane concentration anomaly events can be segmented to obtain multiple initial segments. For example, segmentation criteria can be pre-defined to segment methane concentration anomaly events from multiple dimensions. The segmentation criteria can be:
[0108] 1.1 Methane concentration: Methane concentration is classified into risk levels based on its hazard coefficient. For example, methane concentrations of [0, 4) are low-risk, [4, 10) are medium-risk, and [10, +∞) are high-risk. The unit of methane concentration is %vol, which represents the methane concentration per unit volume.
[0109] 1.2 Methane Concentration Increase Value: The methane concentration increase value in two adjacent methane concentration monitoring data is classified into levels. For example, the methane concentration increase value in adjacent methane concentration monitoring data is classified into [0,2), [2,5), and [5,+∞). The unit of methane concentration is %vol, which represents the methane concentration per unit volume.
[0110] 1.3 Rainfall Environment: The rainfall environment is divided into rainfall and no rainfall.
[0111] 1.4 Ambient temperature: When monitoring methane concentration, the ambient temperature in the manhole is monitored at the same time.
[0112] This allows for the segmentation of time periods of abnormal methane concentration. It is understandable that segmenting abnormal methane concentration events into segments yields short, clearly defined initial segments, facilitating better identification of sub-event characteristics in subsequent events.
[0113] In this embodiment of the disclosure, multiple initial segments can be sorted according to the chronological order of their corresponding times to obtain a third sequence.
[0114] As an example, the initial segments can be sorted according to the chronological order of their corresponding times to obtain the third sequence. For example, if the initial segments are a, b, c, d, e, f, g, and k, sorting them according to the chronological order of their corresponding times will result in the third sequence abcdefgk.
[0115] Step 602: Obtain the feature vectors of each initial segment.
[0116] In the embodiments of this disclosure, for any initial segment among the initial segments, feature extraction can be performed on any initial segment. For example, the features may include the average concentration of methane, the highest concentration of methane, the maximum concentration change of methane, the average temperature of the target manhole, the type of the target manhole, the number of historical gas leaks corresponding to the target manhole, the number of historical biogas generation corresponding to the target manhole, rainfall environment, etc. This disclosure does not limit these features.
[0117] Thus, in this disclosure, the feature vectors of each initial segment can be obtained.
[0118] Step 603: Based on the feature vectors of each initial segment, merge the initial segments in the third sequence according to the first set order to obtain the fourth sequence; wherein the fourth sequence includes at least one fourth sub-event.
[0119] In the embodiments of this disclosure, the first set order may be from left to right or from right to left, and this disclosure does not limit it.
[0120] In the embodiments of this disclosure, the fourth sub-event can be the methane concentration change process within a certain period of time in the methane concentration anomaly event, and the fourth sub-event can be, but is not limited to, one; this disclosure does not limit this.
[0121] It should be noted that the fourth sub-event can be formed by merging multiple adjacent initial segments in the third sequence, or the fourth sub-event can be an initial segment in the third sequence.
[0122] In this embodiment of the disclosure, the initial segments in the third sequence can be merged according to a first predetermined order based on the feature vectors of each initial segment to obtain a fourth sequence, wherein the fourth sequence may include at least one fourth sub-event.
[0123] As one possible implementation, if the first set order is from left to right, for the i-th initial segment in the third sequence, the feature vector of the (i+1)-th initial segment in the third sequence can be merged with the feature vector of the i-th initial segment to obtain a merged feature. If the merged feature matches the feature vector of the i-th initial segment, it can be determined that the i-th initial segment and the (i+1)-th initial segment belong to the same fourth sub-event, and the i-th initial segment and the (i+1)-th initial segment can be merged into the same fourth sub-event. If the merged feature does not match the feature vector of the i-th initial segment, it can be determined that the i-th initial segment and the (i+1)-th initial segment belong to different fourth sub-events. Here, i can be a positive integer not greater than N, and N is the number of initial segments.
[0124] In this embodiment of the disclosure, the feature vector of the (i+1)th initial segment in the third sequence can be merged with the feature vector of the ith initial segment to obtain merged features.
[0125] As an example, suppose in the third sequence, the duration of the time segment corresponding to the i-th initial segment is h1, and the duration of the time segment corresponding to the (i+1)-th initial segment is h2; the feature vector of the i-th initial segment is V1, and the feature vector of the (i+1)-th initial segment is V2. Then, the feature vector of the (i+1)-th initial segment in the first sequence is merged with the feature vector of the i-th initial segment to obtain the merged feature V:
[0126]
[0127] In this embodiment of the disclosure, after obtaining the merged features, it can be determined whether the merged features match the feature vector of the i-th initial segment.
[0128] As an example, algorithms such as cosine similarity and Euclidean distance can be used to determine the similarity between the merged feature and the feature vector of the i-th initial segment. If the similarity between the merged feature and the feature vector of the i-th initial segment is greater than a second set threshold (such as 95%, 90%, etc.), it can be determined that the merged feature matches the feature vector of the i-th initial segment. If the similarity between the merged feature and the feature vector of the i-th initial segment is not greater than the set threshold, it can be determined that the merged feature does not match the feature vector of the i-th initial segment.
[0129] If it is determined that the i-th initial segment and the (i+1)-th initial segment belong to the same fourth sub-event, as a possible implementation, the i-th initial segment and the (i+1)-th initial segment can be merged to obtain a merged segment. It can then be determined whether the merged segment and the (i+2)-th initial segment belong to the same fourth sub-event. When the merged segment and the (i+2)-th initial segment belong to the same fourth sub-event, it can be determined that the i-th initial segment, the (i+1)-th initial segment, and the (i+2)-th initial segment belong to the same fourth sub-event. The merged segment and the (i+2)-th initial segment are then merged to the same fourth sub-event, and so on. This will not be elaborated further here.
[0130] In the case where the merged features do not match the feature vector of the i-th initial fragment, as a possible implementation, it is possible to confirm that the i-th initial fragment is a fourth sub-event of the methane concentration anomaly event, and to continue to determine whether the (i+1)-th initial fragment and the (i+2)-th initial fragment belong to the same fourth sub-event, and so on, which will not be elaborated here.
[0131] Therefore, in this disclosure, after obtaining each fourth sub-event, the fourth sequence can be obtained by sorting them according to the chronological order of the corresponding times.
[0132] As an example, suppose the initial segments are a, b, c, d, e, and the third sequence is abcde. Let the feature vector V of a be... a The eigenvector V of b b The merge is performed to obtain the merged feature V. ab In determining the merging feature V ab The eigenvector V of b b In the case of matching, it can be determined that a and b belong to the same fourth sub-event, denoted as fourth sub-event A, and a and b are merged into A; the merged fragment after merging a and b is denoted as l. a+b And the above method can be used to determine l a+b Does l belong to the same fourth sub-event as c? a+b When c does not belong to the same fourth sub-event, the fourth sub-event A is the merged fragment l of a and b. a+b; Continue to use the eigenvector V of c c With the eigenvector V of d d The merge is performed to obtain the merged feature V. cd When the merging feature V is determined c If the eigenvectors of c and d do not match, it is determined that c and d do not belong to the same fourth sub-event, and the fourth sub-event to which c belongs is the fourth sub-event B; finally, the eigenvector V of d is... d With the eigenvector V of e e The merge is performed to obtain the merged feature V. de When the merging feature V is determined de If the feature vectors of d and e are matched, it is determined that d and e belong to the same first and fourth sub-events, i.e., the fourth sub-event C. Then, d and e are merged into C, and the fourth sub-event C is determined to be the merged fragment l of d and e. d+e Therefore, we can obtain the fourth sub-events as A, B, and C.
[0133] It is understandable that after obtaining each fourth sub-event, there may be cases where any two discontinuous fourth sub-events in each fourth sub-event are the same. As a possible implementation, it can be determined whether there are any two discontinuous fourth sub-events in each fourth sub-event that are the same. If there are any two discontinuous fourth sub-events that are the same, these two discontinuous fourth sub-events are recorded as the same fourth sub-event in different time periods, and can be sorted according to the chronological order of the corresponding times to obtain the fourth sequence.
[0134] Using the example above, the obtained fourth sub-events are A, B, and C. Since the fourth sub-events A and C are not consecutive, we can determine whether A and C are the same. If A and C are the same, we can record A and C as the same fourth sub-event in different event segments, which can be represented by A. We can also sort them according to the time sequence of the corresponding fourth sub-events, and the resulting fourth sequence is ABA.
[0135] It should be noted that the method for determining whether the fourth sub-events of any two discontinuous time periods are the same is similar to the method for determining whether the first sub-events of any two discontinuous time periods are the same in step 202, and will not be elaborated here.
[0136] Therefore, the fourth sequence can be obtained effectively.
[0137] Step 604: Based on the feature vectors of each initial segment, merge the initial segments of the third sequence according to the second set order to obtain the fifth sequence; wherein the fifth sequence includes at least one fifth sub-event.
[0138] The second setting order can be the opposite of the first setting order. For example, when the first setting order is from left to right, the second setting order is from right to left, or when the first setting order is from right to left, the second setting order is from left to right.
[0139] In this embodiment of the disclosure, based on the feature vectors of each initial segment, the initial segments in the third sequence can be merged in a second predetermined order to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event.
[0140] It should be noted that the method of merging the initial segments in the third sequence according to the second set order is similar to the method of merging the initial segments in the third sequence according to the first set order, and will not be described in detail here.
[0141] It should also be noted that the fourth and fifth sequences may be the same or different, and this disclosure does not impose any restrictions on this.
[0142] Step 605: Determine the first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence.
[0143] As one possible implementation, if the first number of the fourth sub-events in the fourth sequence is the same as the second number of the fifth sub-events in the fifth sequence, the fourth sequence or the fifth sequence can be used as the first sequence; if the first number and the second number are different, if the first number is less than the second number, the fourth sequence can be used as the first sequence; if the second number is less than the first number, the fifth sequence can be used as the first sequence.
[0144] For example, if the fourth sequence is ABCAD and the fifth sequence is AFCB, we can determine that the first quantity of the fourth sub-event in the fourth sequence is 5 and the first quantity of the fifth sub-event in the fifth sequence is 4. In this case, the fifth sequence AFCB can be used as the first sequence.
[0145] Therefore, the first sequence corresponding to the methane concentration anomaly event can be effectively obtained.
[0146] The gas leak detection method of this disclosure involves segmenting an abnormal methane concentration event into segments to obtain a third sequence, wherein the third sequence includes multiple initial segments; obtaining feature vectors for each initial segment; merging the initial segments in the third sequence according to a first predetermined order based on the feature vectors of each initial segment to obtain a fourth sequence; wherein the fourth sequence includes at least one fourth sub-event; merging the initial segments in the third sequence according to a second predetermined order based on the feature vectors of each initial segment to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event; wherein the second predetermined order is the reverse of the first predetermined order; and determining the first sequence corresponding to the abnormal methane concentration event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence. Therefore, by employing a bidirectional merging method to merge the initial segments in the third sequence to obtain the fourth and fifth sequences, the first sequence corresponding to the abnormal methane concentration event can be effectively determined based on the fourth and fifth sequences.
[0147] To clearly illustrate how the similarity between any first concentration anomaly event and a methane concentration anomaly event is determined in any of the above embodiments of this disclosure, this disclosure also proposes a method for detecting gas leaks.
[0148] Figure 7 This is a schematic flowchart of the gas leak detection method provided in Embodiment 4 of this disclosure.
[0149] like Figure 7 As shown, the gas leak detection method may include the following steps:
[0150] Step 701: Monitor the methane concentration of the target gas pipeline network to obtain methane concentration abnormal events.
[0151] Step 702: Divide the methane concentration abnormal events to obtain the first sequence corresponding to the methane concentration abnormal events, wherein the first sequence includes at least one first sub-event.
[0152] Step 703: Obtain the second sequence corresponding to any historical concentration anomaly event, wherein the second sequence includes at least one second sub-event.
[0153] Step 704: Match the first sub-event with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event.
[0154] Step 705: If a third sub-event exists, the historical concentration anomaly event is taken as the first concentration anomaly event.
[0155] The execution process of steps 701 to 705 can be found in the execution process of any embodiment of this disclosure, and will not be described in detail here.
[0156] Step 706: Based on the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event, determine the largest common continuous sub-event between the sixth sequence and the first sequence.
[0157] In this embodiment of the disclosure, the maximum common contiguous sub-event between the sixth sequence and the first sequence is determined based on the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event.
[0158] For example, the sixth sequence corresponding to any first concentration anomaly event is ABCAEF, the first sequence corresponding to the methane concentration anomaly event is DACAED, and the largest common continuous sub-event between the above sixth sequence and first sequence is CAE.
[0159] Step 707: Obtain the weights corresponding to the sixth sub-events in the largest common continuous sub-events.
[0160] In this embodiment of the disclosure, the weights corresponding to the sixth sub-events in the maximum common continuous sub-events can be obtained.
[0161] Step 708: Determine the similarity between the first concentration anomaly event and the methane concentration anomaly event based on the number of sixth sub-events in the largest common continuous sub-events and the weights corresponding to each sixth sub-event.
[0162] In this embodiment of the disclosure, the similarity between the first concentration anomaly event and the methane concentration anomaly event is determined based on the number of sixth sub-events in the largest common continuous sub-events and the weight corresponding to each sixth sub-event.
[0163] As an example, in the maximum common contiguous sub-events, there are k sixth sub-events, and the weights corresponding to each sixth sub-event are Q1, ..., Q1. i Q k Where i is a positive number between 1 and k, the similarity S between the first concentration anomaly event and the methane concentration anomaly event can be:
[0164]
[0165] Step 709: Based on similarity, identify a target concentration anomaly event that matches the methane concentration anomaly event from at least one first concentration anomaly event, so as to determine whether a gas leak has occurred in the target gas pipeline network based on the labeling information of the target concentration anomaly event.
[0166] The execution process of step 709 can be found in any embodiment of this disclosure, and will not be described in detail here.
[0167] The gas leak detection method of this disclosure determines the maximum common continuous sub-event between the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event by: determining the maximum common continuous sub-event between the sixth sequence and the first sequence; obtaining the weight of each sixth sub-event in the maximum common continuous sub-event; and determining the similarity between the first concentration anomaly event and the methane concentration anomaly event based on the number of sixth sub-events in the maximum common continuous sub-event and the weight of each sixth sub-event. Therefore, based on the maximum common continuous sub-event between the sixth sequence corresponding to the first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event, the similarity between the first concentration anomaly event and the methane concentration anomaly event is effectively determined.
[0168] To more clearly illustrate the gas leak detection method disclosed herein, the following explanation is provided with examples.
[0169] As an example, Figure 8 This is a flowchart illustrating the gas leak detection method provided in this disclosure. The gas leak detection method of this disclosure may include the following steps:
[0170] 1. Obtain abnormal methane concentration events.
[0171] Based on the time-series data characteristics of methane concentration sensors, the times when methane concentration is abnormal within a continuous time period monitored by the methane concentration sensors deployed in the target manhole can be marked, and the events corresponding to this continuous time period can be recorded as methane concentration abnormal events.
[0172] It should be noted that during gas operation monitoring, changes in methane concentration in manholes are monitored in real time using IoT devices. Under normal circumstances, the methane concentration is less than 1%. Under abnormal circumstances, the methane concentration exhibits irregular changes greater than 1% over a continuous period, which is referred to as a methane concentration anomaly event. A flow-based dynamic windowing method is used to merge data with continuous methane concentrations greater than 1% to extract the anomaly event.
[0173] Figure 2 The data from the same methane concentration sensor is used to monitor methane concentration. The first column represents time, and the second column represents methane concentration. Plotting the monitored data with time on the horizontal axis and methane concentration on the vertical axis yields a line graph showing the change in methane concentration. Figure 3 As shown; segments requiring further analysis and research are defined based on methane concentrations greater than 1%, termed methane concentration anomaly events. Examples of methane concentration anomaly events include... Figure 4 As shown.
[0174] 2. Classification of abnormal methane concentration events.
[0175] Through the inventors' research, it was found that directly describing the complete abnormal event results in too much loss of features. Therefore, the methane concentration abnormal event is first divided into initial segments with fine granularity, and the initial segments can be merged based on the bidirectional maximum matching principle to obtain the first sequence of the methane concentration abnormal event. In this process, data preprocessing operations such as feature extraction can be performed on the initial segments.
[0176] Understandably, the entire process of methane concentration anomaly events is quite complex. It is difficult to obtain effective analytical results by performing event analysis on the complete methane concentration anomaly event. Therefore, it is necessary to divide the methane concentration anomaly event to obtain a first sequence, wherein the first sequence includes at least one first sub-event.
[0177] The process of segmenting methane concentration anomaly events may include: segmenting the methane concentration anomaly events into fragments to obtain a third sequence, wherein the third sequence includes multiple initial fragments; obtaining feature vectors for each initial fragment; merging the initial fragments in the third sequence according to a first predetermined order based on the feature vectors of each initial fragment to obtain a fourth sequence; wherein the fourth sequence includes at least one fourth sub-event; merging the initial fragments in the third sequence according to a second predetermined order based on the feature vectors of each initial fragment to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event; the second predetermined order is the reverse of the first predetermined order; and determining a first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence.
[0178] 3. Matching of abnormal methane concentration events.
[0179] Based on the characteristic information of each first sub-event in the first sequence, similar event matching is performed to obtain the target concentration anomaly event with the highest similarity to the methane concentration anomaly event from historical methane concentration anomaly events (referred to as historical concentration anomaly events in this disclosure), as well as the expert analysis results.
[0180] Figure 9 A schematic diagram of the preparation process for historical methane concentration anomalies.
[0181] The preparation process for historical methane concentration anomalies may include:
[0182] S1, acquire multiple historical methane concentration anomaly events.
[0183] S2, divide any historical methane concentration anomaly event into segments to obtain a second sequence, wherein the second sequence includes at least one second sub-event.
[0184] For any historical methane concentration anomaly event, the event can be divided to obtain a second sequence, wherein the second sequence includes at least one second sub-event.
[0185] S3, Calculate the weight TF-IDF (Term Frequency – Inverse Document Frequency) corresponding to any second sub-event.
[0186] Using the TF-IDF method, the frequency and reverse document frequency of any second sub-event in multiple historical methane concentration anomaly events were calculated:
[0187] Second sub-event frequency (TF) = Number of times the second sub-event occurs / Total number of second sub-events; (4)
[0188] Among them, the frequency of the second sub-event is referred to as the first frequency in this disclosure; the number of times the second sub-event occurs is referred to as the third quantity in this disclosure; and the total number of all second sub-events is referred to as the first total quantity in this disclosure.
[0189] Second sub-event anti-document frequency (IDF) = log(total number of historical methane concentration anomalies / number of historical methane concentration anomalies containing this second sub-event); (5)
[0190] Among them, the frequency of the second sub-event anti-documentation is referred to as the second frequency in this disclosure; the total number of historical methane concentration anomaly events is referred to as the second total number in this disclosure; and the number of historical methane concentration anomaly events containing the second sub-event is referred to as the fourth number in this disclosure.
[0191] The TF-IDF weight corresponding to the second sub-event can be determined based on the frequency of the second sub-event and the inverse document frequency of the second sub-event:
[0192] TF-IDF = Second sub-event frequency * Second sub-event anti-document frequency; (6)
[0193] S4, establish a mapping set between the second sub-event, historical methane concentration anomalies, and weights.
[0194] Establish a mapping relationship between the second sub-event and historical methane concentration anomaly events, and establish a mapping relationship between the second sub-event and its weights. The above mapping relationship can be saved.
[0195] It should be noted that when determining the similarity between any historical methane concentration anomaly event and other methane concentration anomaly events, it is necessary to consider not only the similarity between sub-events, but also the interrelationship between sub-events.
[0196] Therefore, in the event matching process, for any first sub-event of a methane concentration anomaly event, the first sub-event is matched with any second sub-event in at least one second sub-event to determine whether there is a third sub-event matching the first sub-event in the second sequence corresponding to the historical methane concentration anomaly event; if there is a third sub-event, the historical concentration anomaly event is taken as the first concentration anomaly event; according to the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event, the maximum common continuous sub-event between the sixth sequence and the first sequence is determined; the weights corresponding to each sixth sub-event in the maximum common continuous sub-event are obtained; according to the number of sixth sub-events in the maximum common continuous sub-event and the weights corresponding to each sixth sub-event, the similarity between the first concentration anomaly event and the methane concentration anomaly event can be determined by formula (3); according to the similarity, the target concentration anomaly event matching the methane concentration anomaly event is determined from at least one first concentration anomaly event, so as to determine whether the target gas pipeline network has experienced gas leakage based on the labeling information of the target concentration anomaly event.
[0197] As one possible approach, if a gas leak is identified in the target gas pipeline network based on the labeling information, the target level of the gas leak and the corresponding handling strategy can be determined based on the labeling information.
[0198] It should be noted that, in this disclosure, when matching the first sub-event with the second sub-event, the similarity between the feature vectors of the first sub-event and the feature vectors of the second sub-event can be determined. When the similarity between the feature vectors of the first sub-event and the feature vectors of the second sub-event is greater than 95%, the first sub-event and the second sub-event are the same (or matched).
[0199] In summary, the gas leak detection method disclosed herein merges events related to abnormal methane concentration fragments in manholes and performs data analysis to match similar historical methane concentration events and provide historical judgment results. This effectively provides data support for manual judgment and is of great significance for ensuring the safety of gas pipeline networks.
[0200] With the above Figures 1 to 10 Corresponding to the gas leak detection method provided in the embodiments, this disclosure also provides a gas leak detection device. Since the gas leak detection device provided in the embodiments of this disclosure is similar to the one described above... Figures 1 to 10 The gas leak detection method provided in the embodiments corresponds to the gas leak detection method provided in the embodiments of this disclosure. Therefore, the implementation method of the gas leak detection method is also applicable to the gas leak detection device provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.
[0201] Figure 10 This is a schematic diagram of the structure of a gas leak detection device provided in Embodiment 5 of this disclosure.
[0202] like Figure 10 As shown, the gas leak detection device 1000 may include: a sensing module 1001, a detection module 1002, a first processing module 1003, and a first push module 1004.
[0203] The detection module 1001 is used to monitor the methane concentration of the target manhole corresponding to the target gas pipeline network in order to obtain abnormal methane concentration events.
[0204] The acquisition module 1002 is used to acquire at least one first concentration anomaly event from multiple historical concentration anomaly events based on the methane concentration anomaly event.
[0205] The first determining module 1003 is used to determine the similarity between any first concentration anomaly event and a methane concentration anomaly event.
[0206] The second determining module 1004 is used to determine, based on similarity, a target concentration anomaly event matching the methane concentration anomaly event from at least one first concentration anomaly event, so as to determine whether a gas leak has occurred in the target gas pipeline network based on the labeling information of the target concentration anomaly event.
[0207] In one possible implementation of this disclosure, the acquisition module 1002 is configured to: divide methane concentration anomaly events to obtain a first sequence corresponding to the methane concentration anomaly events, wherein the first sequence includes at least one first sub-event; acquire a second sequence corresponding to any historical concentration anomaly event, wherein the second sequence includes at least one second sub-event; match the first sub-event with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event; and if there is a third sub-event, use the historical concentration anomaly event as the first concentration anomaly event.
[0208] In one possible implementation of this disclosure, the acquisition module 1002 may further be used to: segment the methane concentration anomaly event to obtain a third sequence, wherein the third sequence includes multiple initial segments; acquire feature vectors of each initial segment; merge the initial segments in the third sequence according to a first predetermined order based on the feature vectors of each initial segment to obtain a fourth sequence; wherein the fourth sequence includes at least one fourth sub-event; merge the initial segments in the third sequence according to a second predetermined order based on the feature vectors of each initial segment to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event; wherein the second predetermined order is the opposite of the first predetermined order; and determine the first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence.
[0209] In one possible implementation of this disclosure, the acquisition module 1002 may also be used to: if the first number of the fourth sub-events in the fourth sequence is the same as the second number of the fifth sub-events in the fifth sequence, take the fourth sequence or the fifth sequence as the first sequence; if the first number is different from the second number, take the fourth sequence as the first sequence if the first number is less than the second number; and take the fifth sequence as the first sequence if the second number is less than the first number.
[0210] In one possible implementation of this disclosure, the first set order is from left to right. The acquisition module 1002 can also be used to: for the i-th initial segment in the third sequence, merge the feature vectors of the (i+1)-th initial segments in the third sequence with the feature vector of the i-th initial segment to obtain a merged feature; if the merged feature matches the feature vector of the i-th initial segment, then determine that the i-th initial segment and the (i+1)-th initial segment belong to the same fourth sub-event, and merge the i-th initial segment and the (i+1)-th initial segment into the same fourth sub-event; if the merged feature does not match the feature vector of the i-th initial segment, then determine that the i-th initial segment and the (i+1)-th initial segment belong to different fourth sub-events; where i is a positive integer not greater than N, and N is the number of initial segments.
[0211] In one possible implementation of this disclosure, the gas leak detection device 1000 may further include:
[0212] The third determining module is used to determine the first total number of second sub-events in multiple second sequences and to determine the second total number of multiple historical concentration anomaly events.
[0213] The fourth determination module is used to determine the third number of second sub-events among multiple historical concentration anomaly events for any given second sub-event.
[0214] The fifth determining module is used to determine the first frequency corresponding to the second sub-event based on the first total and the third quantity.
[0215] The sixth determination module is used to determine a second concentration anomaly event from multiple historical concentration anomaly events, and to determine a fourth number of the second concentration anomaly events; wherein the second concentration anomaly event includes a second sub-event.
[0216] The seventh determining module is used to determine the second frequency corresponding to the second sub-event based on the second total and the fourth quantity.
[0217] The eighth determining module is used to determine the weight corresponding to the second sub-event based on the first frequency and the second frequency.
[0218] In one possible implementation of this disclosure, the first determining module 1003 is configured to: determine the maximum common continuous sub-event between the sixth sequence and the first sequence based on the sixth sequence corresponding to any first concentration anomaly event and the first sequence corresponding to the methane concentration anomaly event; obtain the weights corresponding to each sixth sub-event in the maximum common continuous sub-event; and determine the similarity between the first concentration anomaly event and the methane concentration anomaly event based on the number of sixth sub-events in the maximum common continuous sub-event and the weights corresponding to each sixth sub-event.
[0219] In one possible implementation of this disclosure, the gas leak detection device 1000 may further include:
[0220] The ninth determination module is used to determine the target level of the gas leak and the corresponding handling strategy based on the labeling information when a gas leak is determined to have occurred in the target gas pipeline network.
[0221] The gas leak detection device of this disclosure monitors the methane concentration of a target manhole corresponding to a target gas pipeline network to obtain methane concentration anomaly events. Based on the methane concentration anomaly events, at least one first concentration anomaly event is obtained from multiple historical concentration anomaly events. The similarity between any first concentration anomaly event and the methane concentration anomaly event is determined. Based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event is determined from the at least one first concentration anomaly event. Based on the annotation information of the target concentration anomaly event, it is determined whether a gas leak has occurred in the target gas pipeline network. Therefore, a target concentration anomaly event matching the methane concentration anomaly event can be automatically determined, thereby effectively determining whether a gas leak has occurred in the target gas pipeline network based on the annotation information of the target concentration anomaly event.
[0222] To implement the above embodiments, the present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the gas leak detection method as proposed in any of the foregoing embodiments of the present invention.
[0223] To implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium storing a computer program thereon, characterized in that the program, when executed by a processor, implements the gas leak detection method as proposed in any of the foregoing embodiments of the present invention.
[0224] To implement the above embodiments, the present invention also proposes a computer program product, which, when the instructions in the computer program product are executed by a processor, performs the gas leak detection method as proposed in any of the foregoing embodiments of the present invention.
[0225] According to embodiments of the present invention, the present invention also provides an electronic device, a non-transitory computer-readable storage medium, and a computer program product.
[0226] like Figure 11 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0227] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0228] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0229] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 11 Not shown; usually referred to as a "hard drive"). Although Figure 11Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0230] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0231] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0232] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.
[0233] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0234] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0235] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0236] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0237] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0238] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0239] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0240] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for detecting gas leaks, characterized in that, The method includes: Methane concentration monitoring is performed on the target manholes corresponding to the target gas pipeline network to identify abnormal methane concentration events; Based on the methane concentration anomaly event, at least one first concentration anomaly event is obtained from multiple historical concentration anomaly events, including: The methane concentration anomaly events are divided to obtain a first sequence corresponding to the methane concentration anomaly events. The first sequence includes at least one first sub-event, which is the methane concentration change process within a certain time period of the methane concentration anomaly events. The at least one first sub-event in the first sequence is arranged in the corresponding chronological order. Obtain a second sequence corresponding to any of the aforementioned historical concentration anomaly events, wherein the second sequence includes at least one second sub-event; The first sub-event is matched with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event; In the presence of the third sub-event, the historical concentration anomaly event is regarded as the first concentration anomaly event; Determine the similarity between any of the first concentration anomaly events and the methane concentration anomaly events; Based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event is determined from the at least one first concentration anomaly event, so as to determine whether the target gas pipeline network has experienced a gas leak based on the labeling information of the target concentration anomaly event; The step of classifying the methane concentration anomaly events to obtain the first sequence corresponding to the methane concentration anomaly events includes: The methane concentration anomaly event is segmented to obtain a third sequence, wherein the third sequence includes multiple initial segments; Obtain the feature vectors of each of the initial segments; Based on the feature vectors of each initial segment, the initial segments in the third sequence are merged in a first predetermined order to obtain a fourth sequence; wherein the fourth sequence includes at least one fourth sub-event. Based on the feature vectors of each initial segment, the initial segments in the third sequence are merged according to a second predetermined order to obtain a fifth sequence, wherein the fifth sequence includes at least one fifth sub-event; the second predetermined order is the reverse of the first predetermined order. The first sequence corresponding to the methane concentration anomaly event is determined based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence; Determining the similarity between any of the first concentration anomaly events and the methane concentration anomaly events includes: Based on the sixth sequence corresponding to any of the first concentration anomaly events and the first sequence corresponding to the methane concentration anomaly events, determine the largest common continuous sub-event between the sixth sequence and the first sequence; Obtain the weights corresponding to the sixth sub-events in the maximum common contiguous sub-events; The similarity between the first concentration anomaly event and the methane concentration anomaly event is determined based on the number of sixth sub-events in the maximum common continuous sub-events and the weights corresponding to each sixth sub-event.
2. The method according to claim 1, characterized in that, The step of determining the first sequence corresponding to the methane concentration anomaly event based on at least one fourth sub-event in the fourth sequence and at least one fifth sub-event in the fifth sequence includes: If the first number of fourth sub-events in the fourth sequence is the same as the second number of fifth sub-events in the fifth sequence, then the fourth sequence or the fifth sequence shall be used as the first sequence. If the first quantity is different from the second quantity, and the first quantity is less than the second quantity, then the fourth sequence is taken as the first sequence. If the second quantity is less than the first quantity, then the fifth sequence is used as the first sequence.
3. The method according to claim 1, characterized in that, The first set order is from left to right. The step of merging the initial segments in the third sequence according to a first predetermined order based on the feature vectors of each initial segment to obtain a fourth sequence includes: For the i-th initial segment in the third sequence, the feature vectors of the (i+1)-th initial segments in the third sequence are merged with the feature vector of the i-th initial segment to obtain merged features; If the merged feature matches the feature vector of the i-th initial segment, then the i-th initial segment and the (i+1)-th initial segment belong to the same fourth sub-event, and the i-th initial segment and the (i+1)-th initial segment are merged into the same fourth sub-event; If the merged feature does not match the feature vector of the i-th initial segment, then the i-th initial segment and the (i+1)-th initial segment are determined to belong to different fourth sub-events. Where i is a positive integer not greater than N, and N is the number of the initial segments.
4. The method according to claim 1, characterized in that, The method further includes: Determine a first total number of the second sub-events in the plurality of second sequences, and determine a second total number of the plurality of historical concentration anomaly events; For any one of the second sub-events, determine a third number of the second sub-events among the plurality of historical concentration anomaly events; Based on the first total and the third quantity, determine the first frequency corresponding to the second sub-event; From the plurality of historical concentration anomaly events, a second concentration anomaly event is determined, and a fourth number of the second concentration anomaly events is determined; wherein, the second concentration anomaly event includes the second sub-event; Based on the second total and the fourth quantity, determine the second frequency corresponding to the second sub-event; The weight corresponding to the second sub-event is determined based on the first frequency and the second frequency.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: If a gas leak is determined to have occurred in the target gas pipeline network based on the labeling information, the target level of the gas leak and the corresponding handling strategy are determined based on the labeling information.
6. A gas leak detection device, characterized in that, The apparatus implements the method as described in claim 1, the apparatus comprising: The detection module is used to monitor the methane concentration of the target manholes corresponding to the target gas pipeline network in order to obtain abnormal methane concentration events. The acquisition module is configured to acquire at least one first concentration anomaly event from multiple historical concentration anomaly events based on the methane concentration anomaly event, including: The methane concentration anomaly events are divided to obtain a first sequence corresponding to the methane concentration anomaly events. The first sequence includes at least one first sub-event, which is the methane concentration change process within a certain time period of the methane concentration anomaly events. The at least one first sub-event in the first sequence is arranged in the corresponding chronological order. Obtain a second sequence corresponding to any of the aforementioned historical concentration anomaly events, wherein the second sequence includes at least one second sub-event; The first sub-event is matched with any of the at least one second sub-event to determine whether there is a third sub-event in the second sequence that matches the first sub-event; In the presence of the third sub-event, the historical concentration anomaly event is regarded as the first concentration anomaly event; The first determining module is used to determine the similarity between any of the first concentration anomaly events and the methane concentration anomaly events; The second determining module is used to determine, based on the similarity, a target concentration anomaly event matching the methane concentration anomaly event from the at least one first concentration anomaly event, so as to determine whether the target gas pipeline network has experienced a gas leak based on the labeling information of the target concentration anomaly event.
7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the gas leak detection method as described in any one of claims 1-5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the gas leak detection method as described in any one of claims 1-5.