A gas flow fluctuation monitoring method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202311853670.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-12-29
AI Technical Summary
目前,现有的监测方法往往使用常规传感器进行数据采集,并通过采集的数据计算相应时刻的流量,这样的监测方法要么采用不间断采集的方式,持续不断地采集数据并进行流量的计算,即使监测出气体流量没有产生较大波动时,仍需对采集的庞大数据统一进行运算处理,增加了不必要的功耗,要么采用间隔采样的方式,每间隔一段时间才进行一次数据的采集和流量的计算,无法满足流量监测的高精度和实时性的要求
[0007]本说明书一些实施例提供的技术方案带来的有益效果至少包括:
Smart Images

Figure CN117848432B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of gas metering technology, and in particular to a method, apparatus, electronic device and storage medium for monitoring gas flow fluctuations. Background Technology
[0002] In the gas industry, the operational stability and safety of the entire transportation pipeline system are crucial. Therefore, monitoring gas flow fluctuations within the pipeline is essential to predict gas demand for planning and scheduling, meeting production and supply needs, and providing timely warnings to eliminate potential hazards when abnormal gas flow fluctuations occur. Currently, existing monitoring methods often use conventional sensors to collect data and calculate the flow rate at corresponding moments. Such methods either employ continuous data acquisition and flow calculation, requiring the processing of massive amounts of data even when no significant fluctuations in gas flow are detected, increasing unnecessary power consumption, or use interval sampling, collecting data and calculating flow only at regular intervals, which fails to meet the high accuracy and real-time requirements of flow monitoring. Summary of the Invention
[0003] This specification provides a method, apparatus, electronic device, and storage medium for monitoring gas flow fluctuations, the technical solutions of which are as follows: Firstly, embodiments of this specification provide a method for monitoring gas flow fluctuations, the method comprising: The digital data corresponding to the gas in the pipeline is acquired in real time based on the analog-to-digital converter, and at least one extreme feature point corresponding to the digital data is determined based on the envelope positioning algorithm. The digital data is truncated based on each of the extreme value feature points to obtain each valid data; Determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of gas flow rate; When the first result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. Flow anomaly information is generated based on the gas flow rate value, and the flow anomaly information is used to regulate the gas flow rate.
[0004] Secondly, a gas flow fluctuation monitoring device is provided, the device comprising: The determination module is used to acquire digital data corresponding to the gas in the pipeline in real time based on the analog-to-digital converter, and determine at least one extreme feature point corresponding to the digital data based on the envelope positioning algorithm. The truncation module is used to truncate the digital data based on each of the extreme value feature points to obtain each valid data; The comparison module is used to determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of gas flow rate. The calculation module is used to calculate the gas flow rate in the pipeline based on the cross-correlation algorithm when the first result indicates large flow fluctuations. The information module generates flow anomaly information based on the gas flow rate value, and the flow anomaly information is used to regulate the gas flow rate.
[0005] Thirdly, an electronic device is provided, including a device processor and a memory; The device processor is connected to the memory; The memory is used to store executable program code; The device processor runs a program corresponding to the executable program code stored in the memory to perform the steps of the method provided as in the first aspect or any possible implementation thereof.
[0006] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, the computer-readable storage medium storing instructions that, when executed on a computer or device processor, cause the computer or device processor to perform the method provided as in the first aspect or any possible implementation thereof.
[0007] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following: In one or more embodiments of this specification, digital data corresponding to the gas in the pipeline is first acquired in real time using an analog-to-digital converter, and extreme feature points corresponding to the digital data are determined based on an envelope localization algorithm. Next, the digital data is intercepted based on each extreme feature point to obtain valid data, and the range value corresponding to each valid data is determined. Each range value is then compared with a preset difference threshold to obtain a first result. Further, when the first result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on a cross-correlation algorithm, and flow anomaly information is generated based on the gas flow rate value to regulate the gas flow rate. Through the above monitoring steps, the cross-correlation algorithm is only performed to obtain the gas flow rate value when the calculation result indicates large flow fluctuations, avoiding the processing of a large amount of useless data. This ensures high real-time performance of gas flow monitoring while meeting the low power consumption requirements of the monitoring system. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 A schematic diagram of the system architecture of a gas flow fluctuation monitoring method provided in the embodiments of this specification; Figure 2 A flowchart illustrating a gas flow fluctuation monitoring method provided in the embodiments of this specification; Figure 3 This is a schematic diagram of the structure of a gas flow fluctuation monitoring device provided in the embodiments of this specification; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation
[0010] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0011] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.
[0012] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this specification. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0013] Please see Figure 1 , Figure 1 This specification illustrates a method for monitoring gas flow fluctuations according to an embodiment.
[0014] like Figure 1As shown, the system architecture of this gas flow fluctuation monitoring method may include at least a terminal 10, a server 20, and a network 30.
[0015] Terminal 10 includes, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, and smart wearable devices, and may also be software running on the aforementioned electronic devices, such as applications. Optionally, the operating system running on the electronic device may include, but is not limited to, Android, iOS, Linux, and Windows. Optionally, terminal 10 provides monitoring services to users, and terminal 10 can obtain access instructions from the application programming interface and send monitoring requests to server 20.
[0016] Server 20 can provide background services for terminal 10. Based on the monitoring request sent by terminal 10, server 20 will obtain a series of monitoring instructions and transmit the monitoring instructions to other terminals 10 through network 30. Specifically, server 20 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0017] Network 30 is a medium used to provide a communication link between terminal 10 and server 20. Network 30 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0018] In addition, it should be noted that, Figure 1 The system shown is merely one example of the system provided in this disclosure. In practical applications, other systems may also be included, such as more terminals.
[0019] In the embodiments described in this specification, the terminal 10 and the server 20 can be directly or indirectly connected through wired or wireless communication, and this disclosure does not impose any restrictions.
[0020] Please refer to the following. Figure 2 , Figure 2 A flowchart illustrating an overall process for monitoring gas flow fluctuations according to an embodiment of this specification is shown. This gas flow fluctuation monitoring method can be used in a server.
[0021] like Figure 2 As shown, the gas flow fluctuation monitoring method may include at least the following steps: Step 201: Acquire digital data corresponding to the gas in the pipeline in real time based on the analog-to-digital converter, and determine at least one extreme feature point corresponding to the digital data based on the envelope positioning algorithm.
[0022] In the embodiments of this specification, when monitoring the gas flow rate in a gas pipeline, sensors are often used to monitor the gas in the pipeline in real time, and the data obtained is usually analog signal data. Therefore, it is first necessary to convert the real-time analog data corresponding to the gas in the pipeline into digital data using an analog-to-digital converter (ADC). Further, signal envelope information is generated from the converted digital data and input into an envelope localization algorithm to analyze the signal strength and attenuation characteristics at each location of the envelope information. Then, based on the envelope localization algorithm, at least one of the most representative extreme feature points is selected according to the signal strength and attenuation characteristics for subsequent truncation of the digital data.
[0023] An analog-to-digital converter (ADC) is an electronic device used to convert continuously changing analog signals into digital signals. It is a key component in many modern electronic systems, allowing analog signals to be processed, stored, and analyzed by digital processors, microcontrollers, or computers. The general working principle of an ADC is as follows: First, the ADC samples the analog signal, measuring its value at regular time intervals. Next, the ADC converts each sampled value into a digital representation, a process called quantization, which maps continuous analog signal values to discrete digital values. Finally, the ADC encodes the quantized digital values into binary form for processing by a digital processing system. ADCs typically consist of a sample-and-hold circuit, a quantizer, and an encoder. Their performance is usually described by parameters such as resolution, sampling rate, and input range, where resolution is the smallest signal variation the ADC can distinguish, and the sampling rate is the number of samples the ADC can perform per second.
[0024] In one possible implementation, the real-time acquisition of digital data corresponding to the gas in the pipeline based on the analog-to-digital converter includes: Based on the real-time acquisition of ultrasonic signals of gas inside the pipeline using ultrasonic sensors; The ultrasonic signal is converted into digital data using an analog-to-digital converter.
[0025] In the embodiments described in this specification, an ultrasonic sensor is typically installed inside the gas pipeline to collect real-time signals of the gas inside the pipeline and obtain the ultrasonic signals corresponding to the gas. Next, an analog-to-digital converter is needed to convert the analog data corresponding to the ultrasonic signals into digital data.
[0026] Generally, analog data is converted to digital data using an ADC primarily because digital data is easier to store, transmit, and process, while analog data can be affected by noise, interference, and attenuation. Digital data is typically more accurate and stable than analog data. Furthermore, digital data is easier to integrate with digital systems such as computers, microprocessors, and other digital devices to achieve digital data processing, analysis, and control.
[0027] Step 202: Extract the digital data based on each of the extreme value feature points to obtain each valid data.
[0028] In the embodiments of this specification, the digital data obtained by the analog-to-digital converter is too large. Performing further calculations of traffic fluctuation values on all the digital data would consume excessive resources and cause unnecessary power consumption. Therefore, the digital data is truncated using previously obtained extreme feature points to obtain the truncated valid data. Since each extreme feature point is the most representative of signal strength and attenuation characteristics, only the valid data corresponding to each extreme feature point needs to be analyzed to obtain all the traffic fluctuation information, thereby reducing the power consumption caused by the large amount of invalid data.
[0029] In one possible implementation, the step of truncating the digital data based on each of the extreme value feature points to obtain each effective data includes: Obtain the coordinates of the points corresponding to each of the extreme value feature points; The intercept interval corresponding to the coordinates of each point is determined based on a preset data length value; The digital data is truncated based on each of the aforementioned truncation intervals to obtain each valid data.
[0030] In the embodiments of this specification, when truncating digital data using extreme value feature points, the corresponding point coordinates can first be obtained by determining each extreme value feature point. As an example, assuming the x-coordinate of any point is i, and the preset data length is N (generally a fixed parameter value), then the truncating interval corresponding to the point coordinates determined based on the preset data length value N is [i, i+N]. Next, the digital data is truncated according to the determined truncating intervals [i, i+N] to obtain each valid data point.
[0031] Step 203: Determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result.
[0032] The first result is used to characterize the fluctuation state of gas flow rate.
[0033] In the embodiments of this specification, after obtaining each valid data point, the maximum and minimum values corresponding to each valid data point are first determined. Then, the difference between the maximum and minimum values is calculated to obtain the range value corresponding to the valid data. Next, each range value is compared with a preset difference threshold, that is, the difference between each range value and the preset difference threshold is calculated to obtain a first result. If any one of the calculated range values is not less than the preset difference threshold, the first result indicates that the traffic fluctuation is large; if all the calculated range values are less than the preset difference threshold, the first result indicates that the traffic fluctuation is not large.
[0034] Step 204: When the first result indicates large flow fluctuations, calculate the gas flow rate in the pipeline at this time based on the cross-correlation algorithm.
[0035] In the embodiments of this specification, after obtaining a first result by comparing each range value with a preset difference threshold, the first result is judged. When at least one of the calculated range values is not less than the preset difference threshold, that is, when the first result indicates large flow fluctuation, it reflects that the flow fluctuation in the gas pipeline is abnormal, and it is necessary to measure the gas flow value in the gas pipeline in time. Therefore, the time-of-flight difference corresponding to the sampling point can be obtained by sampling and transforming the effective data based on the cross-correlation algorithm, and finally the gas flow value in the pipeline at this time can be determined by the time-of-flight difference.
[0036] In one possible implementation, after comparing each of the range values with a preset difference threshold to obtain a first result, the method further includes: When the first result indicates that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0037] In the embodiments of this specification, after obtaining a first result by comparing each range value with a preset difference threshold, the first result is judged. When all the calculated range values are less than the preset difference threshold, that is, when the first result indicates that the flow fluctuation is not large, it reflects that the gas flow in the gas pipeline is stable at this time, and it is not necessary to continuously measure the gas flow in the gas pipeline. It is only necessary to keep it in standby mode and continuously monitor the constantly acquired digital data to prevent the gas flow in the pipeline from fluctuating too much.
[0038] In one possible implementation, after determining the range value corresponding to each of the valid data points and comparing each range value with a preset difference threshold to obtain a first result, the method further includes: Determine the variance value corresponding to each of the range values, and compare the variance value with a preset variance threshold to obtain a second result; When the first result indicates large flow fluctuations, the gas flow rate value in the pipeline at this time is calculated based on the cross-correlation algorithm, including: When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When both the first and second results indicate that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0039] In the embodiments of this specification, after comparing each range value with a preset difference threshold to obtain a first result, if the first result indicates that the flow fluctuation is not significant, in order to further improve the accuracy of gas flow fluctuation detection, the variance value corresponding to each range value can be determined. Then, the obtained variance value is compared with a preset variance threshold, that is, the difference between the variance value and the preset variance threshold is calculated to obtain a second result. When the second result indicates that the flow fluctuation is large, that is, the obtained variance value is not less than the preset variance threshold, it reflects that the flow fluctuation in the gas pipeline is abnormal at this time, and it is necessary to measure the gas flow value in the gas pipeline in a timely manner. Therefore, based on the cross-correlation algorithm, the time-of-flight difference corresponding to the sampling point can be obtained after sampling and transformation of the effective data, and finally the gas flow value in the pipeline at this time can be determined by the time-of-flight difference. When the second result indicates that the flow rate fluctuation is not large, that is, the obtained variance value is less than the preset variance value threshold, it reflects that the gas flow rate in the gas pipeline is stable at this time. It is not necessary to continuously measure the gas flow rate in the gas pipeline. It is only necessary to keep it in standby mode and continuously monitor the acquired digital data to prevent the gas flow rate in the pipeline from fluctuating too much.
[0040] In one possible implementation, after determining the variance value corresponding to each of the range values, comparing the variance value with a preset variance value threshold to obtain a second result, the method further includes: Obtain the historical variance value calculated in the previous stage, and compare the historical variance value with the variance value to obtain the third result; When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on a cross-correlation algorithm, including: When at least one of the first, second, and third results indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When the first, second, and third results all indicate that the flow fluctuation is not significant, the system remains in standby mode and continuously monitors the digital data.
[0041] In the embodiments of this specification, after comparing the variance value with a preset variance threshold to obtain a second result, if the second result indicates that the flow fluctuation is not significant, in order to further improve the accuracy of gas flow fluctuation detection, the variance value calculated in this stage can be saved as a historical variance value. Next, the variance value for the next stage is calculated, and the historical variance value is compared with the latest obtained variance value, that is, the difference between the new variance value and the historical variance threshold is calculated to obtain a third result. When the third result indicates that the flow fluctuation is large, that is, when the new variance value is greater than the historical variance value, it reflects that the flow fluctuation in the gas pipeline is abnormal at this time, and it is necessary to measure the gas flow value in the gas pipeline at this time in a timely manner. Therefore, based on the cross-correlation algorithm, the time-of-flight difference corresponding to the sampling point can be obtained after sampling and transformation of the effective data, and finally the gas flow value in the pipeline at this time can be determined by the time-of-flight difference. When the third result indicates that the flow rate fluctuation is not large, that is, when the new variance value is not greater than the historical variance value, it reflects that the gas flow rate in the gas pipeline is stable at this time. It is not necessary to continuously measure the gas flow rate in the gas pipeline. It is only necessary to keep it in standby mode and continuously monitor the acquired digital data to prevent the gas flow rate in the pipeline from fluctuating too much.
[0042] In one possible implementation, calculating the gas flow rate in the pipeline at this time based on the cross-correlation algorithm includes: The data peak value corresponding to the effective data is calculated based on the cross-correlation algorithm; The signal flight time difference is determined based on the data peak value, and the gas flow rate in the pipeline at this time is calculated based on the signal flight time difference.
[0043] In the embodiments of this specification, when calculating the gas flow rate in the pipeline using the cross-correlation algorithm, the acquired valid data can first be aligned uplink and downlink to ensure temporal consistency. Next, the cross-correlation function is used to perform cross-correlation calculations on the uplink and downlink signals, and the calculated cross-correlation function is analyzed to obtain the data peak corresponding to the valid data. Further, the signal time-of-flight difference between the uplink and downlink data signals is determined based on the determined data peak. Finally, the gas flow rate in the gas pipeline is calculated using the determined time-of-flight difference and the cross-sectional area of the gas pipeline.
[0044] Step 205: Generate flow anomaly information based on the gas flow rate value.
[0045] The abnormal flow information is used to regulate the gas flow rate.
[0046] In the embodiments of this specification, after obtaining the gas flow rate value, it indicates that the gas flow rate fluctuation in the gas pipeline is too large, generates flow abnormality information, and sends the flow abnormality information to the terminal to complete the regulation of gas flow rate to ensure the stability of gas flow rate in the pipeline.
[0047] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0048] Please refer to the following. Figure 3 , Figure 3 A schematic diagram of a gas flow fluctuation monitoring device provided in an embodiment of this specification is shown. It should be noted that... Figure 3 The gas flow fluctuation monitoring device shown is used to perform the functions described in this application. Figure 2 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 2 The example shown.
[0049] like Figure 3 As shown, the gas flow fluctuation monitoring device may include at least: The determination module 301 is used to acquire digital data corresponding to the gas in the pipeline in real time based on the analog-to-digital converter, and determine at least one extreme feature point corresponding to the digital data based on the envelope positioning algorithm. The truncation module 302 is used to truncate the digital data based on each of the extreme value feature points to obtain each valid data; The comparison module 303 is used to determine the range value corresponding to each of the valid data, and compare each of the range values with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of the gas flow rate. Calculation module 304 is used to calculate the gas flow rate in the pipeline at this time based on the cross-correlation algorithm when the first result indicates that the flow rate fluctuates greatly. Information module 305 generates flow abnormality information based on the gas flow rate value, and the flow abnormality information is used to regulate the gas flow rate.
[0050] In one possible implementation, the determining module 301 is specifically used for: Based on the real-time acquisition of ultrasonic signals of gas inside the pipeline using ultrasonic sensors; The ultrasonic signal is converted into digital data using an analog-to-digital converter.
[0051] In one possible implementation, the interception module 302 is specifically used for: Obtain the coordinates of the points corresponding to each of the extreme value feature points; The intercept interval corresponding to the coordinates of each point is determined based on a preset data length value; The digital data is truncated based on each of the aforementioned truncation intervals to obtain each valid data.
[0052] In one possible implementation, the comparison module 303 is specifically used for: When the first result indicates that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0053] In one possible implementation, the computing module 304 is specifically used for: Determine the variance value corresponding to each of the range values, and compare the variance value with a preset variance threshold to obtain a second result; When the first result indicates large flow fluctuations, the gas flow rate value in the pipeline at this time is calculated based on the cross-correlation algorithm, including: When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When both the first and second results indicate that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0054] In one possible implementation, the computing module 304 is further configured to: Obtain the historical variance value calculated in the previous stage, and compare the historical variance value with the variance value to obtain the third result; When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on a cross-correlation algorithm, including: When at least one of the first, second, and third results indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When the first, second, and third results all indicate that the flow fluctuation is not significant, the system remains in standby mode and continuously monitors the digital data.
[0055] In one possible implementation, the computing module 304 is further configured to: The data peak value corresponding to the effective data is calculated based on the cross-correlation algorithm; The signal flight time difference is determined based on the data peak value, and the gas flow rate in the pipeline at this time is calculated based on the signal flight time difference.
[0056] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.
[0057] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.
[0058] Please refer to the following. Figure 4 , Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification is shown.
[0059] like Figure 4 As shown, the electronic device 400 may include: at least one device processor 401, at least one network interface 404, user interface 403, memory 405, and at least one communication bus 402.
[0060] The communication bus 402 can be used to realize the connection and communication of the above components.
[0061] The user interface 403 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0062] Among them, network interface 404 may include, but is not limited to, Bluetooth module, NFC module, Wi-Fi module, etc.
[0063] The device processor 401 may include one or more processing cores. The device processor 401 connects to various parts within the electronic device 400 using various interfaces and lines. It executes various functions and processes data of the electronic device 400 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 405, and by calling data stored in the memory 405. Optionally, the device processor 401 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The device processor 401 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the device processor 401 and may be implemented as a separate chip.
[0064] The memory 405 may include RAM or ROM. Optionally, the memory 405 may include a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned device processor 401. Figure 4 As shown, the memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0065] Specifically, the device processor 401 can be used to call the gas flow fluctuation monitoring application stored in the memory 405 and perform the following operations: The digital data corresponding to the gas in the pipeline is acquired in real time based on the analog-to-digital converter, and at least one extreme feature point corresponding to the digital data is determined based on the envelope positioning algorithm. The digital data is truncated based on each of the extreme value feature points to obtain each valid data; Determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of gas flow rate; When the first result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. Flow anomaly information is generated based on the gas flow rate value, and the flow anomaly information is used to regulate the gas flow rate.
[0066] As an optional embodiment of this specification, the step of acquiring digital data corresponding to the gas in the pipeline in real time based on the analog-to-digital converter includes: Based on the real-time acquisition of ultrasonic signals of gas inside the pipeline using ultrasonic sensors; The ultrasonic signal is converted into digital data using an analog-to-digital converter.
[0067] As an optional embodiment of this specification, the step of truncating the digital data based on each of the extreme value feature points to obtain each valid data includes: Obtain the coordinates of the points corresponding to each of the extreme value feature points; The intercept interval corresponding to the coordinates of each point is determined based on a preset data length value; The digital data is truncated based on each of the aforementioned truncation intervals to obtain each valid data.
[0068] As an optional embodiment of this specification, the method further includes, after comparing each of the range values with a preset difference threshold to obtain a first result, the method further includes: When the first result indicates that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0069] As an optional embodiment of this specification, the method further includes, after determining the range value corresponding to each of the valid data and comparing each range value with a preset difference threshold to obtain a first result: Determine the variance value corresponding to each of the range values, and compare the variance value with a preset variance threshold to obtain a second result; When the first result indicates large flow fluctuations, the gas flow rate value in the pipeline at this time is calculated based on the cross-correlation algorithm, including: When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When both the first and second results indicate that the flow rate fluctuation is not significant, the system remains in standby mode and the digital data is continuously monitored.
[0070] As an optional embodiment of this specification, the method further includes, after determining the variance value corresponding to each of the range values and comparing the variance value with a preset variance value threshold to obtain a second result: Obtain the historical variance value calculated in the previous stage, and compare the historical variance value with the variance value to obtain the third result; When the first or second result indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on a cross-correlation algorithm, including: When at least one of the first, second, and third results indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first result indicates that the traffic fluctuation is not significant, maintaining a standby state and continuously monitoring the digital data includes: When the first, second, and third results all indicate that the flow fluctuation is not significant, the system remains in standby mode and continuously monitors the digital data.
[0071] As an optional embodiment of this specification, the step of calculating the gas flow rate value in the pipeline based on the cross-correlation algorithm includes: The data peak value corresponding to the effective data is calculated based on the cross-correlation algorithm; The signal flight time difference is determined based on the data peak value, and the gas flow rate in the pipeline at this time is calculated based on the signal flight time difference.
[0072] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0073] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0074] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0075] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0079] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0080] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
Claims
1. A method for monitoring gas flow fluctuations, characterized in that, The method includes: The digital data corresponding to the gas in the pipeline is acquired in real time based on the analog-to-digital converter, and at least one extreme feature point corresponding to the digital data is determined based on the envelope positioning algorithm. The digital data is truncated based on each of the extreme value feature points to obtain each valid data; Determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of gas flow rate; Determine the variance value corresponding to each of the range values, and compare the variance value with a preset variance threshold to obtain a second result; Obtain the historical variance value calculated in the previous stage, and compare the historical variance value with the variance value to obtain the third result; When at least one of the first, second, and third results indicates large flow fluctuations, the gas flow rate in the pipeline is calculated based on the cross-correlation algorithm. When the first, second, and third results all indicate that the flow rate fluctuation is not significant, the system remains in standby mode and continuously monitors the digital data; flow rate anomaly information is generated based on the gas flow rate value, and the flow rate anomaly information is used to regulate the gas flow rate.
2. The method according to claim 1, characterized in that, The method of acquiring digital data corresponding to the gas in the pipeline in real time based on an analog-to-digital converter includes: Based on the real-time acquisition of ultrasonic signals of gas inside the pipeline using ultrasonic sensors; The ultrasonic signal is converted into digital data using an analog-to-digital converter.
3. The method according to claim 1, characterized in that, The step of truncating the digital data based on each of the extreme value feature points to obtain each valid data includes: Obtain the coordinates of the points corresponding to each of the extreme value feature points; The intercept interval corresponding to the coordinates of each point is determined based on a preset data length value; The digital data is truncated based on each of the aforementioned truncation intervals to obtain each valid data.
4. The method according to claim 1, characterized in that, The calculation of the gas flow rate in the pipeline at this time based on the cross-correlation algorithm includes: The data peak value corresponding to the effective data is calculated based on the cross-correlation algorithm; The signal flight time difference is determined based on the data peak value, and the gas flow rate in the pipeline at this time is calculated based on the signal flight time difference.
5. A gas flow fluctuation monitoring device, characterized in that, The device includes: The determination module is used to acquire digital data corresponding to the gas in the pipeline in real time based on the analog-to-digital converter, and determine at least one extreme feature point corresponding to the digital data based on the envelope positioning algorithm. The truncation module is used to truncate the digital data based on each of the extreme value feature points to obtain each valid data; The comparison module is used to determine the range value corresponding to each of the valid data, and compare each range value with a preset difference threshold to obtain a first result, which is used to characterize the fluctuation state of gas flow rate. The calculation module is used to calculate the gas flow rate in the pipeline based on the cross-correlation algorithm when the first result indicates large flow fluctuations. An information module is used to generate flow anomaly information based on the gas flow rate value, and the flow anomaly information is used to regulate the gas flow rate.
6. An electronic device, comprising a memory, a device processor, and a computer program stored in the memory and executable on the device processor, characterized in that, When the device processor executes the computer program, it implements the steps of the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium storing instructions that, when executed on a computer or device processor, cause the computer or device processor to perform the steps of the method as claimed in any one of claims 1-4.
Citation Information
Patent Citations
Time difference determination method and device based on ultrasonic sensor
CN114812711A