Method and device for synchronizing metering data of intelligent gas meter
By obtaining smart gas meter photos and analyzing data using artificial neural network models, the automated synchronization of smart gas meter data is achieved, solving the problem of low synchronization efficiency of mechanical and electronic metering data, and improving accuracy and efficiency.
Patent Information
- Application Number
- CN202411402142.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
In the initial production stage of smart gas meter, it is difficult to synchronize timely and effectively in a timely manner, resulting in low efficiency and poor accuracy of manual inspection and setting.
By obtaining the frontal photos of the smart gas meter, generating the target image and analyzing the table number data and mechanical cumulative data using artificial neural network models, setting the electronic cumulative data as mechanical cumulative data using close-range communication to achieve automated synchronization.
It reduces manpower consumption, improves the efficiency and accuracy of successful setup, and realizes timely and effective synchronization of mechanical measurement data and electronic measurement data.
Smart Images

Figure CN119295734A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a method and device for synchronizing metering data of a smart gas meter. Background Art
[0002] With the rapid development of IoT communication technology, the application scenarios of smart gas meters are becoming more and more extensive. In home applications, smart gas meters are seamlessly connected to smart home systems. Users can remotely view household gas usage through mobile phone APPs, realize smart payment and early warning prompts, and effectively avoid safety hazards such as gas leaks. In the commercial field, such as hotels and restaurants, smart gas meters not only help managers monitor gas consumption in real time and optimize energy use, but also provide a scientific basis for energy conservation and emission reduction through data analysis. In the industrial field, smart gas meters have become an important monitoring tool on the production line, ensuring a stable and reliable gas supply during the production process, while reducing operating costs and improving production efficiency.
[0003] In the above scenarios of smart gas meters, the metering of smart gas meters plays a vital role. In related technologies, the metering device of smart gas meters consists of mechanical metering components and electronic metering components. In the initial production stage of smart gas meters, the mechanical metering part and the electronic metering part of smart gas meters are often inconsistent. How to synchronize mechanical metering data and electronic metering data in a timely and effective manner has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, the present disclosure provides a method and device for synchronizing metering data of a smart gas meter to solve the problem of how to timely and effectively achieve synchronization of mechanical metering data and electronic metering data.
[0005] In a first aspect, the present disclosure provides a method for synchronizing metering data of a smart gas meter, the method comprising: obtaining a front photo of the smart gas meter; generating a target image based on the front photo, the target image being a monochrome image obtained after preprocessing a target area of a meter number and a target area of a mechanical cumulative amount in the front photo; processing the target image using an artificial neural network model to parse the meter number data and the mechanical cumulative amount data in the target image; and using a short-range communication connection with the smart gas meter to set the electronic cumulative amount data of the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data.
[0006] In a second aspect, the present disclosure provides a device for synchronizing metering data of a smart gas meter, the device comprising: a photo acquisition module for acquiring a front photo of the smart gas meter; an image generation module for generating a target image based on the front photo, the target image being a monochrome image obtained after preprocessing a target area of a meter number and a target area of a mechanical cumulative amount in the front photo; a data parsing module for processing the target image using an artificial neural network model to parse the meter number data and the mechanical cumulative amount data in the target image; a data setting module for setting the electronic cumulative amount data of the smart gas meter corresponding to the meter number data to the mechanical cumulative amount data by adopting a short-range communication connection with the smart gas meter.
[0007] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for synchronizing metering data of a smart gas meter according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0008] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for synchronizing metering data of a smart gas meter according to the first aspect or any corresponding embodiment thereof.
[0009] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for synchronizing metering data of a smart gas meter according to the first aspect or any corresponding embodiment thereof.
[0010] The method for synchronizing metering data of a smart gas meter provided in the present invention first obtains a front photo of the smart gas meter; then, based on the front photo, generates a target image, the target image being a monochrome image obtained after preprocessing a target area of a meter number and a target area of a mechanical cumulative amount in the front photo; then, an artificial neural network model is used to process the target image to parse the meter number data and the mechanical cumulative amount data in the target image; then, a short-range communication connection with the smart gas meter is adopted to set the electronic cumulative amount data of the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data, so that the mechanical cumulative amount data of the smart gas meter can be automatically set to the electronic cumulative amount data in the smart gas meter, thereby reducing manpower consumption, improving the efficiency and accuracy of successful setting, and timely and effectively realizing the synchronization of mechanical metering data and electronic metering data. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0012] Figure 1a is a flow chart of a method for synchronizing metering data of a smart gas meter according to an embodiment of the present disclosure;
[0013] Figure 1b is an exemplary schematic diagram of a front view of a smart gas meter according to an embodiment of the present disclosure;
[0014] Figure 1c is an exemplary structural diagram of a device in which an execution subject includes a camera, a server, and a storage according to an embodiment of the present disclosure;
[0015] Figure 2 is a flow chart of a method for generating a target image based on a frontal photo according to an embodiment of the present disclosure;
[0016] Figure 3 is a flow chart of a method for setting electronic cumulative amount data of a smart gas meter as mechanical cumulative amount data according to an embodiment of the present disclosure;
[0017] Figure 4 is a structural block diagram of an apparatus for synchronizing metering data of a smart gas meter according to an embodiment of the present disclosure;
[0018] Figure 5 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0020] In the related art, in order to timely and effectively synchronize mechanical metering data with electronic metering data, manual inspection and setting are usually required. The steps of manual inspection and setting are as follows:
[0021] 1. Manually check whether the mechanical metering data and electronic metering data in the smart gas meter are consistent;
[0022] 2. If there is any inconsistency, set the mechanical metering data (ie mechanical cumulative data) to the gas meter through the network.
[0023] However, this manual inspection and setting step requires a lot of manpower, has low efficiency, and sometimes mistakes or wrong settings occur, and the accuracy rate of successful inspection and setting is low.
[0024] According to an embodiment of the present disclosure, a method embodiment for synchronizing metering data of a smart gas meter is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0025] In this embodiment, a method for synchronizing metering data of a smart gas meter is provided, which can be used in a cloud server or a terminal device (a desktop computer, an industrial computer, a laptop computer or a tablet computer), etc., and can also be used in a device including a camera, a server (or a terminal device), and a memory. Figure 1a is a flow chart of a method for synchronizing metering data of a smart gas meter according to an embodiment of the present disclosure, such as Figure 1a As shown, the process includes the following steps:
[0026] Step S101, obtaining a front photo of the smart gas meter.
[0027] In this embodiment, the front photo of the smart gas meter refers to a photo of the surface of the smart gas meter including the meter number, mechanical cumulative amount, and electronic cumulative amount. Figure 1b As shown, Figure 1b is an exemplary schematic diagram of a front view of a smart gas meter according to an embodiment of the present disclosure.
[0028] When obtaining the front photo of the smart gas meter, the execution subject may obtain the front photo of the smart gas meter through its own or a third-party image acquisition device. In a specific example, Figure 1c As shown, Figure 1c is an exemplary structural diagram of a device in which an execution subject includes a camera, a server, and a storage according to an embodiment of the present disclosure.
[0029] Step S102, generating a target image based on the frontal photo, wherein the target image is a monochrome image obtained by preprocessing a target area of the table number and a target area of the mechanical accumulation in the frontal photo.
[0030] In this embodiment, after acquiring the front photo of the smart gas meter, the execution subject may preprocess the front photo to obtain a monochrome image after preprocessing both the target area of the meter number and the target area of the mechanical cumulative amount.
[0031] Specifically, the preprocessing may be to first identify the detection frame of the meter number from the front photo as the target area of the meter number, and to identify the detection frame of the mechanical accumulation as the target area of the mechanical accumulation. Then, the two target areas may be further preprocessed, such as grayscale processing, saturation processing, color adjustment, etc.
[0032] Step S103, using an artificial neural network model to process the target image to parse the table number data and the mechanical accumulation data in the target image.
[0033] In this embodiment, the artificial neural network model is a pre-trained machine learning model for parsing table number data and mechanical accumulation data. The artificial neural network model can be implemented using a model that can recognize image data, such as a convolutional neural network (CNN, LeNet, etc.), a deep convolutional neural network (AlexNet, VGG), or a residual network (ResNet).
[0034] Specifically, a deep learning framework (TensorFlow, PyTorch, etc.) can be used to define the model, and then the loss function and optimizer of the model can be defined.
[0035] During training, a sample image set with attached labels (such as images with table number data and mechanical accumulation data) can be loaded, and the model is trained using steps such as forward propagation, loss calculation, back propagation, and weight update during the training process, and iterates until the model loss meets the convergence condition or the number of iterations reaches the preset number. After that, the trained model is evaluated using the validation set. After the evaluation is qualified, the trained artificial neural network model can be obtained and deployed.
[0036] When the artificial neural network model is used to process the target image, the model can be loaded, and the loaded model can be used to parse the table number data and the mechanical accumulation data in the target image according to the target image.
[0037] Step S104, using a short-distance communication connection with the smart gas meter, the electronic cumulative amount data of the smart gas meter corresponding to the meter number data is set as the mechanical cumulative amount data.
[0038] In this embodiment, the short-range communication connection refers to the use of wireless communication technology to achieve data transmission and communication between devices within a relatively short communication distance (such as a few centimeters to tens of meters). For example, Bluetooth technology, ZigBee technology, Wireless Fidelity (Wi-Fi) technology, Near Field Communication (NFC) technology, infrared communication technology, Radio Frequency Identification (RFID) technology, and NearLink or SparkLink technology.
[0039] After establishing a wireless communication connection with the smart gas meter using short-range communication, the connection can be used to transmit the mechanical cumulative data identified above to the smart gas meter corresponding to the meter number data, so that the smart gas meter can use the mechanical cumulative data to update the original electronic cumulative data and obtain the electronic cumulative data after synchronizing the mechanical cumulative data.
[0040] The method for synchronizing metering data of a smart gas meter provided in the present embodiment obtains a front photo of the smart gas meter, and then generates a target image based on the front photo, wherein the target image is a monochrome image obtained by preprocessing a target area of the meter number and a target area of the mechanical cumulative quantity in the front photo, and then processes the target image using an artificial neural network model to parse the meter number data and the mechanical cumulative quantity data in the target image, and then uses a short-range communication connection with the smart gas meter to set the electronic cumulative quantity data of the smart gas meter corresponding to the meter number data as the mechanical cumulative quantity data, so that the above-mentioned execution subject can be used to automatically set the mechanical cumulative quantity data of the smart gas meter to the electronic cumulative quantity data in the smart gas meter, thereby reducing manpower consumption, improving the efficiency and accuracy of successful setting, and timely and effectively realizing the synchronization of mechanical metering data and electronic metering data.
[0041] In some optional implementations of the above embodiments, the above-mentioned obtaining of photos of the smart gas meter may include: using an image acquisition device arranged above the smart gas meter production line to collect background photos of the production line that do not include the smart gas meter and main photos that include the smart gas meter; extracting the difference area between the background photo that does not include the smart gas meter and the main photo that includes the smart gas meter to obtain the photo of the smart gas meter.
[0042] In this implementation, in order to collect background photos of the production line without smart gas meters, the background of the production line without smart gas meters can be photographed once to obtain background photos of the production line without smart gas meters. Afterwards, another photo is taken after smart gas meters are placed on the production line to obtain the main body photos of the production line including smart gas meters.
[0043] Afterwards, the background photo excluding the smart gas meter may be compared with the subject photo including the smart gas meter, and a difference region between the subject photo and the background photo may be extracted, and the difference region is the photo of the smart gas meter.
[0044] In some specific examples, the collected images can be preprocessed by existing image processing tools (such as OpenCV, scikit-image, etc.) or graphics processing tools developed by TensorFlow, Python, etc., and then the difference between the background photo excluding the smart gas meter and the subject photo including the smart gas meter can be compared through the cutout function of the existing image processing tools or the self-developed graphics processing tools, and the difference area between the subject photo and the background photo can be extracted to obtain a photo of the smart gas meter.
[0045] Among them, the preprocessing performed on the two images before comparison may include one or more of the following: image grayscale, image resizing, image binarization, image denoising, image registration, image enhancement, etc. In a specific example, when calculating the difference area between the two images, the acquisition position and direction of the two images have not changed. If the content of the image used as the background before the smart gas meter is placed has not changed after the smart gas meter is placed, the two images can be compared directly. If the content of the image used as the background before the smart gas meter is placed has changed after the smart gas meter is placed, the two images need to be registered (through feature point extraction, matching and transformation, etc.) before comparison.
[0046] In some specific examples, when extracting the difference area, the background photo that does not include the smart gas meter and the main photo that includes the smart gas meter can be converted into grayscale images respectively, and the grayscale difference between the target pixel pairs of the grayscale image of the background photo and the grayscale image of the main photo is calculated. For the target pixel in the grayscale image of the main photo, if the ratio of the grayscale difference of the target pixel pair to the grayscale of the target pixel is greater than a threshold, the target pixel is taken as the pixel in the difference area. The target pixel pair is a pixel pair formed by the target pixel of the grayscale image of the registered background photo and the target pixel of the grayscale image of the main photo.
[0047] The method for obtaining the front photo of the smart gas meter in this implementation uses an image acquisition device arranged above the production line of the smart gas meter to acquire a background photo of the production line excluding the smart gas meter and a main photo including the smart gas meter. Then, the difference area between the background photo excluding the smart gas meter and the main photo including the smart gas meter can be extracted to obtain the photo of the smart gas meter, thereby realizing the above-mentioned smart gas meter can be promoted on the production line without leaving the production line. Figure 1aThe method for synchronizing metering data of a smart gas meter in the illustrated embodiment eliminates the need for human intervention, thereby improving the efficiency and accuracy of synchronizing metering data.
[0048] In some specific examples, the above-mentioned extraction of the difference area between the background photo excluding the smart gas meter and the main photo including the smart gas meter to obtain the photo of the smart gas meter may include: converting the background photo excluding the smart gas meter and the main photo including the smart gas meter into grayscale images respectively to obtain the background grayscale image excluding the smart gas meter and the main grayscale image including the smart gas meter; calculating the grayscale difference between each pair of pixels in the background grayscale image excluding the smart gas meter and the main grayscale image including the smart gas meter; for the target pixel point in the main grayscale image including the smart gas meter, if the grayscale difference corresponding to the target pixel point is greater than a threshold value, then taking the target pixel point as the pixel point in the difference area to obtain the photo of the smart gas meter.
[0049] In this example, the execution entity may first convert the background photo excluding the smart gas meter and the subject photo including the smart gas meter into grayscale images respectively, so as to simplify the image data, reduce the amount of calculation, and retain the main structural information of the image.
[0050] It can be understood that when calculating the grayscale difference between each pair of pixels, the acquisition position and direction of the two images have not changed. If the content of the image used as the background before the smart gas meter is placed has not changed after the smart gas meter is placed, each pair of pixels in the two images can be directly compared. If the content of the image used as the background before the smart gas meter is placed has changed after the smart gas meter is placed, it is necessary to perform image registration on the two images (through feature point extraction, matching and transformation, etc.), and then compare each pair of pixels in the two images to obtain the grayscale difference between each pair of pixels. Furthermore, it can be determined whether the pixel corresponding to the grayscale difference in the main photo is a pixel in the difference area based on whether the grayscale difference is greater than a threshold value, so that all the pixels in the difference area of the main photo are taken as photos of the smart gas meter.
[0051] The method for extracting the difference area to obtain the photo of the smart gas meter in this example can first convert the grayscale image during extraction, and then determine whether the pixel points corresponding to the grayscale difference in the main photo are the pixels in the difference area according to whether the grayscale difference is greater than a threshold, so as to use all the pixels in the difference area of the main photo as the photo of the smart gas meter, thereby improving the accuracy and efficiency of obtaining the photo of the smart gas meter.
[0052] In this embodiment, an exemplary implementation of step S102 of the method for synchronizing metering data of a smart gas meter is provided, which can be used for the above-mentioned execution subject, etc. Figure 2is a flow chart of a method for generating a target image based on a frontal photo according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:
[0053] Step S201, determine the target area of the watch number and the target area of the mechanical cumulative amount from the front photo. In this embodiment, the detection frame of the watch number can be identified as the target area of the watch number and the detection frame of the mechanical cumulative amount can be identified as the target area of the mechanical cumulative amount from the front photo.
[0054] Step S202 , grayscale processing is performed on both the target area of the table number and the target area of the mechanical accumulation amount to obtain a single-channel once-processed image.
[0055] In this embodiment, the grayscale processing can be completed by using grayscale mode adjustment, saturation adjustment and color adjustment tools to grayscale both the target area of the table number and the target area of the mechanical accumulation. It is also possible to develop a program by itself to obtain a grayscale processing tool for calculating the grayscale (for example, the grayscale value can be obtained by weighted averaging the values of the three channels of red, green and blue), thereby obtaining a single-channel image after one processing, that is, the grayscale image at this time has only one brightness value.
[0056] Step S203, performing Gaussian filtering on the image after the single-channel processing to obtain an image after Gaussian filtering.
[0057] In this embodiment, a Gaussian function (ie, a normal distribution function) can be used as a weight to perform weighted averaging on each pixel in a single-channel image and pixels in its neighborhood after a single-channel processing, thereby removing noise or details in the image and obtaining an image processed by Gaussian filtering.
[0058] Step S204, based on a preset threshold, binarization is performed on the image after Gaussian filtering, and binarization results of both the target area of the table number and the target area of the mechanical accumulation are obtained.
[0059] In this embodiment, for each pixel in the image after Gaussian filtering, if the pixel value of the pixel is greater than or equal to the threshold, it is set to the maximum value (usually 255, representing white); if the pixel value of the pixel is less than the threshold, it is set to the minimum value (usually 0, representing black).
[0060] In step S205, the binarization results of both the target area of the table number and the target area of the mechanical accumulation are taken as the target image.
[0061] In this embodiment, the execution subject may use the binarization results of both the target area of the table number and the target area of the mechanical accumulation, that is, the target area of the table number and the target area of the mechanical accumulation represented in black and white, as the target image.
[0062] The method for generating a target image based on a front photo provided in the present embodiment determines the target area of the meter number and the target area of the mechanical accumulation from the front photo; then, grayscales both the target area of the meter number and the target area of the mechanical accumulation to obtain a single-channel image after one-time processing; then, Gaussian filters the single-channel image after one-time processing to obtain a Gaussian filtered image; then, based on a preset threshold, binarizes the Gaussian filtered image to obtain binarization results of both the target area of the meter number and the target area of the mechanical accumulation; then, uses the binarization results of both the target area of the meter number and the target area of the mechanical accumulation as the target image, which reduces the amount of data processing while retaining important image features, thereby generating a target image more efficiently and accurately, thereby improving the method of synchronizing metering data of smart gas meters.
[0063] In this embodiment, an exemplary implementation of step S104 of the method for synchronizing metering data of a smart gas meter is provided, which can be used for the above-mentioned execution subject, etc. Figure 3 is a flow chart of a method for setting the electronic cumulative amount data of a smart gas meter to mechanical cumulative amount data according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:
[0064] Step S301, using the target communication connection technology, to establish a target communication connection between smart gas meters corresponding to the meter number data.
[0065] In this embodiment, the target communication connection technology refers to the communication connection technology used by the smart gas meter, which can be one of the short-distance communication technologies in the existing technology or the technology to be developed in the future. The target communication connection technology is any one of Bluetooth, ZigBee technology, Wireless Fidelity (Wi-Fi) technology, Near Field Communication (NFC) technology, infrared communication technology, Radio Frequency Identification (RFID) technology and NearLink or SparkLink wireless communication technology.
[0066] The above-mentioned execution entity can first determine the address of the smart gas meter corresponding to the meter number data, and then use the target communication connection technology according to the address of the smart gas meter to build a communication connection with the address, that is, use the corresponding communication protocol and interface, configure communication parameters (such as baud rate, address), etc., establish a session or connection, and thus build a target communication connection.
[0067] In some optional implementations of step S301, step S301 may include:
[0068] Step S3011, searching for candidate devices that support the target communication connection technology.
[0069] Step S3012: When the address of the candidate device matches the pre-assigned address of the target communication connection technology of the smart gas meter corresponding to the meter number data, the candidate device is used as the target device.
[0070] Step S3013, establishing a target communication connection with the target device.
[0071] Step S302: using the target communication connection, the mechanical cumulative amount data is transmitted to the smart gas meter corresponding to the meter number data, so as to set the electronic cumulative amount data in the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data.
[0072] In this embodiment, the execution subject can format the mechanical cumulative data to be transmitted into a transmittable data packet according to the communication protocol and data format requirements of the smart gas meter, and then send the formatted transmittable data packet to the smart gas meter through the established target communication connection.
[0073] When the communication module built into the smart gas meter receives a data packet, it can parse the received data packet according to the communication protocol it supports, including: identifying the format of the data packet, extracting the payload, and verifying the integrity and correctness of the data packet. If the data packet is verified to be correct, the smart gas meter can store it in an internal register or memory in preparation for the microcontroller or processor of the smart gas meter to read the verified mechanical cumulative data and send it to the electronic cumulative display, thereby updating the electronic cumulative data in the smart gas meter.
[0074] The method for setting the electronic cumulative data of the smart gas meter as mechanical cumulative data provided in this embodiment clarifies how to set the electronic cumulative data of the smart gas meter as mechanical cumulative data, so that the smart gas meter can safely and accurately update the electronic cumulative data on its electronic cumulative display screen according to the received mechanical cumulative data, thereby improving the efficiency and accuracy of the metering data of the synchronized smart gas meter.
[0075] In this embodiment, a device for synchronizing metering data of a smart gas meter is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0076] This embodiment also provides a device for synchronizing metering data of a smart gas meter, such as Figure 4 As shown, including:
[0077] The photo acquisition module 401 is used to acquire a front photo of the smart gas meter;
[0078] An image generation module 402 is used to generate a target image based on the front photo, where the target image is a monochrome image obtained by preprocessing a target area of the table number and a target area of the mechanical accumulation in the front photo;
[0079] The data analysis module 403 is used to process the target image using an artificial neural network model to analyze the table number data and the mechanical accumulation data in the target image;
[0080] The data setting module 404 is used to set the electronic cumulative amount data of the smart gas meter corresponding to the meter number data as mechanical cumulative amount data by using a short-range communication connection with the smart gas meter.
[0081] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0082] The device for synchronizing the metering data of the smart gas meter in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0083] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present disclosure, and the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0084] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0085] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0086] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0088] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means.
[0089] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0090] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0091] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0092] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for synchronizing metering data of a smart gas meter, characterized in that: The method comprises: Get a front-facing photo of the smart gas meter; Based on the frontal photo, a target image is generated, wherein the target image is a monochrome image obtained by preprocessing a target area of a table number and a target area of a mechanical accumulation in the frontal photo; Processing the target image using an artificial neural network model to parse the table number data and mechanical accumulation data in the target image; By adopting a short-distance communication connection with the smart gas meter, the electronic cumulative amount data of the smart gas meter corresponding to the meter number data is set as the mechanical cumulative amount data.
2. The method according to claim 1, characterized in that The step of generating a target image based on the frontal photo comprises: Determining a target area for table number and a target area for mechanical cumulative amount from the frontal photograph; Performing grayscale processing on both the target area of the table number and the target area of the mechanical accumulation to obtain a single-channel once-processed image; Performing Gaussian filtering on the image after the single-channel processing to obtain an image after Gaussian filtering; Based on a preset threshold, binarization is performed on the image after the Gaussian filtering process to obtain binarization results of both the target area of the table number and the target area of the mechanical accumulation; The binarization results of both the target area of the table number and the target area of the mechanical accumulation amount are used as the target image.
3. The method according to claim 1 or 2, characterized in that: The artificial neural network model is a pre-trained machine learning model for parsing the table number data and the mechanical accumulation data.
4. The method according to claim 1, characterized in that: The method of using a short-range communication connection with the smart gas meter to set the electronic cumulative amount data of the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data includes: A target communication connection technology is used to establish a target communication connection between smart gas meters corresponding to the meter number data; the target communication connection technology is any one of Bluetooth, ZigBee technology, Wireless Fidelity (Wi-Fi) technology, Near Field Communication (NFC) technology, infrared communication technology, Radio Frequency Identification (RFID) technology and NearLink or SparkLink wireless communication technology; The target communication connection is used to transmit the mechanical cumulative amount data to the smart gas meter corresponding to the meter number data, so as to set the electronic cumulative amount data in the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data.
5. The method according to claim 4, characterized in that Adopting the target communication connection technology, constructing the target communication connection between the smart gas meters corresponding to the meter number data, including: Searching for candidate devices that support the target communication connection technology; When the address of the candidate device matches the address of the target communication connection technology of the smart gas meter corresponding to the meter number data, the candidate device is used as the target device; A target communication connection is established with the target device.
6. The method according to claim 1, characterized in that The step of obtaining the photo of the smart gas meter includes: Using an image acquisition device disposed above a smart gas meter production line, capturing a background photo of the production line excluding the smart gas meter and a main photo including the smart gas meter; A difference area between the background photo excluding the smart gas meter and the main photo including the smart gas meter is extracted to obtain a photo of the smart gas meter.
7. The method according to claim 6, characterized in that The extracting the difference area between the background photo excluding the smart gas meter and the main photo including the smart gas meter to obtain the photo of the smart gas meter includes: Converting the background photo excluding the smart gas meter and the main body photo including the smart gas meter into grayscale images respectively, to obtain a background grayscale image excluding the smart gas meter and a main body grayscale image including the smart gas meter; Calculating the grayscale difference between each pair of pixels in the background grayscale image not including the smart gas meter and the main grayscale image including the smart gas meter; For a target pixel point in the main grayscale image including the smart gas meter, if the grayscale difference corresponding to the target pixel point is greater than a threshold, the target pixel point is used as a pixel point in the difference area to obtain a photo of the smart gas meter.
8. A device for synchronizing metering data of a smart gas meter, characterized in that: The device comprises: A photo acquisition module, used to acquire a front photo of the smart gas meter; An image generation module, used to generate a target image based on the front photo, wherein the target image is a monochrome image obtained by preprocessing a target area of a table number and a target area of a mechanical accumulation in the front photo; A data analysis module, used for processing the target image using an artificial neural network model to analyze the table number data and mechanical accumulation data in the target image; The data setting module is used to set the electronic cumulative amount data of the smart gas meter corresponding to the meter number data as the mechanical cumulative amount data by adopting a short-range communication connection with the smart gas meter.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for measuring data of a synchronized smart gas meter according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for synchronizing metering data of a smart gas meter according to any one of claims 1 to 7.