Processing method and device for application program of ultrasonic heat meter

The application of ultrasonic heat meter is detected and repaired through non-disassembled automation steps, which solves the problem of heat meter being easily disturbed in high temperature, strong magnetic field and strong electric field environments, and achieves the safety of stable operation and maintenance of the heat meter.

CN119917326APending Publication Date: 2025-05-02BEIJING JOYO SMART WATER METER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411870426.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Ultrasonic heat meters are susceptible to external interference in high temperature, strong magnetic field and strong electric field environments, resulting in application errors or data loss stored in FLASH memory, and traditional disassembly and maintenance methods are difficult to operate, which may damage the protective measures of the heat meter.

Method used

Through non-disassembled automation steps, the identification and verification values ​​of the program to be detected are obtained, and compared with the preset identification table and verification values ​​to realize application detection and verification. If the check value is found to be inconsistent, the correct data will be automatically obtained from the pre-equipment data and replaced to ensure the stable operation of the calorimeter.

Benefits of technology

It realizes rapid detection and repair of internal applications without disassembling the calories, reduces operation difficulty, avoids potential damage to the calories by manual intervention, and ensures the subsequent normal operation of the calories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917326A_ABST
    Figure CN119917326A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device for an ultrasonic heat meter application program, and relates to the technical field of ultrasonic heat meters. In the method, a first identifier and a first verification value of a to-be-detected program are obtained, and the to-be-detected program is an application program in the ultrasonic heat meter; judging whether the first identifier exists in a preset identifier table or not, wherein the preset identifier table is a table composed of identifiers corresponding to the preset backup data; when the first identifier exists in the preset identifier table, whether the first verification value is consistent with a preset verification value is judged, and the preset verification value is a verification value corresponding to the first identifier; if it is determined that the first verification value is inconsistent with the preset verification value, obtaining first data corresponding to the preset verification value from preset backup data; and replacing second data according to the first data, wherein the second data is data corresponding to the to-be-detected program. By implementing the technical scheme provided by the invention, potential damage to internal protection measures and performance parameters of the heat meter caused by manual disassembly is avoided, and subsequent normal operation of the heat meter is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of ultrasonic heat meters, and in particular to a method and device for processing an ultrasonic heat meter application. Background Art

[0002] As ultrasonic heat meters are often deployed in harsh environments such as high temperature, strong magnetic field and strong electric field, their RS485 communication lines are susceptible to external interference such as high pulses. In addition, the heat meter itself may have insufficient anti-electromagnetic interference capabilities, which may cause errors in the application stored in the FLASH memory and even data loss. Such problems may cause abnormal operation of specific functional modules, or even cause the entire system to crash, freeze and restart ineffectively, and other serious consequences.

[0003] At present, the traditional response to such failures is to dismantle the shell of the ultrasonic heat meter and use a professional firmware burning tool to rewrite the firmware into the heat meter's memory. However, in actual operation, since ultrasonic heat meters are usually installed at high altitudes or in narrow pipe wells, this undoubtedly greatly increases the difficulty and danger of on-site disassembly and operation. In addition, manual intervention during the disassembly process often destroys the original sealing and protection measures inside the heat meter, which will reduce the protection level of the heat meter and may also have an adverse effect on its performance parameters, thereby seriously affecting the subsequent stable operation of the heat meter.

[0004] Therefore, there is an urgent need for a processing method and device for an ultrasonic heat meter application that can solve the above technical problems. Summary of the invention

[0005] The present application provides a method and device for processing an ultrasonic heat meter application. The method effectively solves the problem that the ultrasonic heat meter is difficult to disassemble and maintain due to the special installation location during actual operation through non-disassembly automated steps. At the same time, it also avoids the potential damage to the internal protection measures and performance parameters of the heat meter by manual disassembly, thereby ensuring the subsequent normal operation of the heat meter.

[0006] In the first aspect, the present application provides a method for processing an ultrasonic heat meter application, which is applied to a server, and the method includes: obtaining a first identifier and a first verification value of a program to be detected, where the program to be detected is an application in an ultrasonic heat meter; determining whether the first identifier exists in a preset identifier table, where the preset identifier table is a table composed of identifiers corresponding to preset backup data; when the first identifier exists in the preset identifier table, determining whether the first verification value is consistent with the preset verification value, where the preset verification value is a verification value corresponding to the first identifier; if it is determined that the first verification value is inconsistent with the preset verification value, obtaining first data corresponding to the preset verification value from the preset backup data; replacing the second data according to the first data, where the second data is data corresponding to the program to be detected.

[0007] By adopting the above technical solution, the first identification and the first check value of the program to be detected are obtained, and compared with the preset identification table and the preset check value, so that the internal application program can be detected and verified without disassembling the heat meter, which greatly reduces the difficulty of operation and realizes rapid verification through comparison. The automated detection process, once the first check value is found to be inconsistent with the preset check value, the correct first data is immediately obtained from the preset backup data, and the first data is replaced with the second data, which improves the efficiency of detection and repair, reduces manual intervention, and helps to ensure the stable operation of the heat meter after detection.

[0008] Optionally, before determining whether the first identifier exists in the preset identifier table, the method also includes: receiving a backup request sent by the host computer, determining the starting address, byte length and second check value according to the backup request; determining the third data according to the starting address and byte length, and obtaining a third check value corresponding to the third data; determining whether the second check value is consistent with the third check value; when the second check value is consistent with the third check value, obtaining the operating status of the external storage chip; if it is determined that the operating status is normal, obtaining the second identifier corresponding to the third data; writing the third data, the second identifier and the second check value into the external storage chip, the external storage chip including a first corresponding relationship and a second corresponding relationship, the first corresponding relationship being the corresponding relationship between the third data and the second identifier, the second corresponding relationship being the corresponding relationship between the second check value and the third data, and writing the third data into the preset backup data.

[0009] By adopting the above technical solution, a backup request sent by a host computer is received, and the starting address, byte length and second check value are parsed, thereby ensuring that the source of the data backup is clear and verifiable. After obtaining the third data to be backed up, the third check value corresponding to the third data is calculated, and compared with the second check value provided by the host computer, which can effectively verify the integrity and accuracy of the data. After determining that the second check value is consistent with the third check value, the operating status of the external storage chip is obtained to ensure that the external storage chip is in a normal state before performing a data write operation, thereby avoiding data loss or write failure caused by a storage chip failure; adding a second representation to the third data makes the third data more traceable, and writing the third data, the second identifier and the second check value into the external storage chip to facilitate subsequent query of backup data.

[0010] Optionally, after writing the third data, the second identifier and the second verification value into the external storage chip, the method also includes: obtaining the target backup data from the external storage chip, calculating the target backup data to obtain a fourth verification value; determining whether the fourth verification value is consistent with the second verification value; when the fourth verification value is consistent with the second verification value, confirming that a prompt indicating the third data backup is successful is sent to the host computer.

[0011] By adopting the above technical solution, the target backup data is obtained from the external storage chip, and its fourth check value is calculated, which can be compared with the second check value provided by the host computer during the backup, ensuring that the data recovered from the storage chip is consistent with the original backup data in content and has not been damaged or tampered with; when the fourth check value is consistent with the second check value, the backup data is confirmed to be successful, and a prompt is sent to the host computer; this confirmation mechanism increases the accuracy of the backup data when the backup data is subsequently retrieved, reduces the need for manual intervention, and improves the accuracy of data management.

[0012] Optionally, after determining whether the second verification value is consistent with the third verification value, the method further includes: when the second verification value is inconsistent with the third verification value, confirming to send a backup failure prompt to the upper computer.

[0013] By adopting the above technical solution, during the data backup process, if the second verification value does not match the third verification value, it can be immediately identified and a prompt of backup failure can be sent to the host computer. This instant feedback mechanism helps users quickly realize the existence of the problem and take corresponding solutions.

[0014] Optionally, before obtaining the first identifier and the first verification value of the program to be detected, the method also includes: determining whether the first verification value of the program to be detected can be obtained; if it is determined that the first verification value of the program to be detected cannot be obtained, using a watchdog to timeout reset the server and run the boot program.

[0015] By adopting the above technical solution, when the first check value of the program to be tested cannot be obtained, it may mean that the program is in a dead state. At this time, the server is reset through the watchdog mechanism to quickly restore to normal operation, avoid continuous operation in an unsafe state, and reduce the risk of downtime and data loss due to failures.

[0016] Optionally, after determining that the first verification value is inconsistent with the preset verification value, the method also includes: using a reset program to reset and start the server, and running the boot program, and again obtaining the fifth verification value from the external storage chip; again obtaining the sixth verification value of the program to be tested; determining whether the fifth verification value is consistent with the sixth verification value; when the fifth verification value is inconsistent with the sixth verification value, confirming that the fourth data corresponding to the fifth verification value is obtained from the preset backup data, and outputting the fourth data as the first data.

[0017] By adopting the above technical solution, after the server is reset and started, by obtaining the fifth verification value from the external storage chip again and comparing it with the sixth verification value of the program to be detected, it is possible to detect whether the data is consistent. If it is inconsistent, it means that there may be a problem with the currently running data. At this time, the corresponding fourth data can be obtained from the preset backup data and output as the first data, thereby enhancing the data recovery capability.

[0018] Optionally, after determining whether the fifth verification value is consistent with the sixth verification value, the method further includes: when the fifth verification value is consistent with the sixth verification value, confirming to continue running the program to be tested.

[0019] By adopting the above technical solution, by comparing the fifth check value with the sixth check value, it can be confirmed that the data recovered from the external storage chip is consistent with the data currently used by the program to be detected, which ensures that the data has not changed after the reset startup and maintains the consistency of the data. When the fifth check value is consistent with the sixth check value, the program to be detected is selected to continue running, which avoids unnecessary data recovery operations, reduces resource consumption, and improves the reliability and stability of the system.

[0020] In a second aspect of the present application, a processing device for an ultrasonic heat meter application is provided, the device is a server, and the server includes an acquisition unit, a processing unit, and a replacement unit; the acquisition unit acquires a first identifier and a first check value of a program to be detected, and the program to be detected is an application in an ultrasonic heat meter; the processing unit determines whether the first identifier exists in a preset identifier table, and the preset identifier table is a table composed of identifiers corresponding to preset backup data; when the first identifier exists in the preset identifier table, it is determined whether the first check value is consistent with the preset check value, and the preset check value is a check value corresponding to the first identifier; if it is determined that the first check value is inconsistent with the preset check value, the first data corresponding to the preset check value is obtained from the preset backup data; the replacement unit replaces the second data according to the first data, and the second data is the data corresponding to the program to be detected.

[0021] Optionally, the acquisition unit is used to receive a backup request sent by a host computer, determine the starting address, byte length and second check value according to the backup request; determine the third data according to the starting address and byte length, and obtain the third check value corresponding to the third data; the processing unit is used to determine whether the second check value is consistent with the third check value; when the second check value is consistent with the third check value, obtain the operating status of the external storage chip; if it is determined that the operating status is normal, obtain the second identifier corresponding to the third data; write the third data, the second identifier and the second check value into the external storage chip, the external storage chip includes a first corresponding relationship and a second corresponding relationship, the first corresponding relationship is the corresponding relationship between the third data and the second identifier, the second corresponding relationship is the corresponding relationship between the second check value and the third data, and write the third data into the preset backup data.

[0022] Optionally, the acquisition unit is used to obtain the target backup data from an external storage chip, calculate the target backup data, and obtain a fourth verification value; the processing unit is used to determine whether the fourth verification value is consistent with the second verification value; when the fourth verification value is consistent with the second verification value, confirm that a third data backup success prompt is sent to the host computer.

[0023] Optionally, the processing unit is used to confirm and send a backup failure prompt to the upper computer when the second verification value is inconsistent with the third verification value.

[0024] Optionally, the processing unit is used to determine whether the first verification value of the program to be detected can be obtained; if it is determined that the first verification value of the program to be detected cannot be obtained, a watchdog is used to timeout and reset the server to run the boot program.

[0025] Optionally, the processing unit is used to reset and start the server using a reset program, and run the boot program to obtain the fifth verification value from the external storage chip again; the acquisition unit is used to obtain the sixth verification value of the program to be tested again; the processing unit is used to determine whether the fifth verification value is consistent with the sixth verification value; when the fifth verification value is inconsistent with the sixth verification value, confirm that the fourth data corresponding to the fifth verification value is obtained from the preset backup data, and output the fourth data as the first data.

[0026] Optionally, the processing unit is used to confirm to continue running the program to be tested when the fifth verification value is consistent with the sixth verification value.

[0027] In a third aspect of the present application, an electronic device is provided, which includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory, so that an electronic device executes any one of the methods described above in the present application.

[0028] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any one of the above methods of the present application is executed.

[0029] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Obtain the first identification and first check value of the program to be tested, and compare them with the preset identification table and preset check value, so as to realize the detection and verification of the internal application program without disassembling the heat meter, greatly reducing the difficulty of operation, and realizing rapid verification through comparison. The automated detection process, once the first check value is found to be inconsistent with the preset check value, immediately obtains the correct first data from the preset backup data, and replaces the second data with the first data, improves the efficiency of detection and repair, reduces manual intervention, and helps to ensure the stable operation of the heat meter after detection.

[0030] 2. Receive the backup request sent by the host computer, and parse out the starting address, byte length and second check value, to ensure that the source of the data backup is clear and verifiable. After obtaining the third data to be backed up, calculate the third check value corresponding to the third data, and compare it with the second check value provided by the host computer, which can effectively verify the integrity and accuracy of the data. After determining that the second check value is consistent with the third check value, obtain the operating status of the external storage chip to ensure that the external storage chip is in a normal state before performing the data writing operation, thereby avoiding data loss or writing failure caused by storage chip failure; add a second representation to the third data to make the third data more traceable, write the third data, the second identifier and the second check value into the external storage chip, and facilitate subsequent query of backup data. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a first flow chart of a processing method of an ultrasonic heat meter application provided in an embodiment of the present application; Figure 2 It is a second flow chart of a processing method of an ultrasonic heat meter application provided in an embodiment of the present application; Figure 3 It is a third flow chart of a processing method of an ultrasonic heat meter application provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of a processing device for an ultrasonic heat meter application provided in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0032] Explanation of reference numerals: 401, acquisition unit; 402, processing unit; 403, replacement unit; 500, electronic device; 501, processor; 502, memory; 503, user interface; 504, network interface; 505, communication bus. DETAILED DESCRIPTION

[0033] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0034] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0035] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0036] As ultrasonic heat meters are often deployed in harsh environments such as high temperature, strong magnetic field and strong electric field, their RS485 communication lines are susceptible to external interference such as high pulses. In addition, the heat meter itself may have insufficient anti-electromagnetic interference capabilities, which may cause errors in the application stored in the FLASH memory and even data loss. Such problems may cause abnormal operation of specific functional modules, or even cause the entire system to crash, freeze and restart ineffectively, and other serious consequences.

[0037] At present, the traditional response to such failures is to dismantle the shell of the ultrasonic heat meter and use a professional firmware burning tool to rewrite the firmware into the heat meter's memory. However, in actual operation, since ultrasonic heat meters are usually installed at high altitudes or in narrow pipe wells, this undoubtedly greatly increases the difficulty and danger of on-site disassembly and operation. In addition, manual intervention during the disassembly process often destroys the original sealing and protection measures inside the heat meter, which will reduce the protection level of the heat meter and may also have an adverse effect on its performance parameters, thereby seriously affecting the subsequent stable operation of the heat meter.

[0038] Therefore, how to solve the problem of manual disassembly of ultrasonic heat meters in actual operation. A processing method of an ultrasonic heat meter application provided in an embodiment of the present application is applied to a server. The server of the present application is a platform that provides repair services for ultrasonic heat meters. Figure 1 This is a first flow chart of a method for processing an ultrasonic heat meter application provided in an embodiment of the present application, with reference to Figure 1 The method includes the following steps S101-S105.

[0039] S101: Obtain a first identifier and a first check value of a program to be detected, where the program to be detected is an application program in an ultrasonic heat meter.

[0040] In the above S101, first, when the ultrasonic heat meter leaves the factory, the host computer detection software and RS485 communication tooling are provided to back up the application of the heat meter, so that when the heat meter automatically detects an error in the application during normal operation, the backup data can be used to repair the application. Specifically, it includes: receiving a backup request sent by the host computer, determining the starting address, byte length and second check value according to the backup request; determining the third data according to the starting address and byte length, and obtaining the third check value corresponding to the third data; judging whether the second check value is consistent with the third check value; when the second check value is consistent with the third check value, obtaining the operating status of the external storage chip; if it is determined that the operating status is in a normal state, obtaining the second identifier corresponding to the third data; writing the third data, the second identifier and the second check value into the external storage chip, the external storage chip includes a first corresponding relationship and a second corresponding relationship, the first corresponding relationship is the corresponding relationship between the third data and the second identifier, the second corresponding relationship is the corresponding relationship between the second check value and the third data, and writing the third data into the preset backup data.

[0041] Specifically, the host computer (such as a computer or other control device) sends a backup request to the server through a communication interface (such as USB, network, etc.). The server receives the request and parses out the information such as the starting address, byte length, and second check value. This information is used to specify the data range to be backed up and to verify the integrity of the data. The second check value is obtained by performing a CRC32 check on the program to be backed up, and the program to be backed up is a program determined based on the starting address and byte length. According to the received starting address and byte length, the corresponding data block, i.e., the third data, is located and read in the ultrasonic heat meter application area. Then, a predetermined check value algorithm (such as CRC32, MD5, etc.) is used to calculate the third data to obtain a third check value. This value is used to compare with the second check value later to verify the integrity of the data. The calculated third check value is compared with the received second check value. If the two are consistent, it means that the selected third data meets the backup request, and there is no change during the transmission process, and subsequent operations can be performed. When the second check value is consistent with the third check value, a status query request is sent to the external storage chip, which is a chip specifically used to store backup data in the ultrasonic heat meter, and its English name is EEPROM. The external storage chip responds to the command and returns its current operating status information. This information may include whether it is readable and writable, remaining capacity, error rate, etc. After confirming that the external storage chip is in a normal state, a unique second identifier is assigned to the third data. This identifier may be a byte or other form of unique identifier. For example, the second identifier can be set to 0xAA, the second identifier can be associated with the third data, and the third data, the second identifier and the second check value can be packaged into a data packet. The data packet is written to the specified location in the external storage chip through the communication interface. During the writing process, additional check and error handling operations may be required to ensure the integrity and reliability of the data. In order to facilitate subsequent inquiries about the backup data stored in the external storage chip, a first corresponding relationship and a second corresponding relationship can be established in the external storage chip. The first corresponding relationship is the corresponding relationship between the third data and the second identifier, which is used for subsequent data retrieval and recovery; the second corresponding relationship is the corresponding relationship between the second check value and the third data, which is used for data integrity verification. The third data is added to the preset backup data, which is a storage structure for storing and managing backup data.

[0042] In addition, when the second check value is inconsistent with the third check value, it is confirmed that a backup failure prompt is sent to the upper computer. The backup failure prompt indicates that the selected third data is inconsistent with the backup request. The starting address and byte length of the third data and the third check value must be sent to the upper computer at the same time, so that the corresponding management personnel can understand the cause of the backup failure in time, and take corresponding measures to solve the problem according to the suggestions or reasons in the information.

[0043] Further, after confirming that the corresponding data has been written into the external storage chip according to the backup request, it is also necessary to verify whether the backup data in the external storage chip is correct, which specifically includes: obtaining the target backup data from the external storage chip, calculating the target backup data, and obtaining a fourth check value; judging whether the fourth check value is consistent with the second check value; when the fourth check value is consistent with the second check value, confirming that the third data backup success prompt is sent to the upper computer. Specifically, the target backup data corresponding to the historical backup request is obtained from the external storage chip. The historical backup request refers to the data written to the external storage chip most recently. Taking the above content as an example, the data written to the external storage chip most recently is the third data. At this time, the target backup data is the third data written into the external storage chip. Send a read command to the external storage chip so that it is determined as the target backup data according to the command. Then verify the target backup data to obtain a fourth check value. A suitable check algorithm (such as CRC32) can be selected, which should be the same as the algorithm used to generate the second check value. Use the selected check algorithm to calculate the target backup data to obtain a fourth check value. This value is used for subsequent comparison with the second check value to verify the integrity of the data. Compare the calculated fourth check value with the second check value received previously. If the two are consistent, it means that the target backup data has not changed during the storage and reading process, and the integrity of the data has been verified; when the fourth check value is consistent with the second check value, a prompt message of successful backup is generated. This information usually contains information such as the identification of the backup data, the backup time, the check value, etc., so that the user or the host computer can confirm and record it. Send the prompt message of successful backup to the host computer through the communication interface (such as the network, USB, etc.). The host computer receives and parses this information to confirm the successful completion of the backup operation. When the fourth check value is inconsistent with the fifth check value, a backup failure prompt is generated to prompt that errors and damage occur during the storage and transmission process of the data. If there are multiple backup requests, the data corresponding to each backup request shall be located and compared in turn according to the above content. When the comparison result is correct, the backup data can be written to the external storage chip. Figure 2 shown.

[0044] Furthermore, after completing the backup operation of the application program of the heat meter, the heat meter can be packaged and shipped. After the heat meter is installed in the corresponding position, the heat meter can start working. During the working process, due to the interference of strong magnetism in the installation environment and the communication line, errors or loss of the application program in the heat meter may occur, which may cause the heat meter to be in a dead state or failure. Therefore, it is necessary to judge the operation of the heat meter regularly, and then determine different treatment measures based on the judgment results. Determine whether the first check value of the program to be detected can be obtained; if it is determined that the first check value of the program to be detected cannot be obtained, the watchdog is used to timeout reset the server and run the boot program. Specifically, judging whether the first check value of the program to be detected can be obtained, whether the check value of the running program can be obtained at this time, is a way to judge whether the application is in a running state or a dead state. If the server cannot obtain the first check value of the program to be repaired, it can be assumed that the application program of the heat meter is in a dead state, and then the watchdog is used to timeout reset the server (the application program of the ultrasonic heat meter). Watchdog is a hardware or software function used to monitor the running status of the program. If the system or program does not perform a specific operation (such as feeding the dog) within a predetermined time, the watchdog will trigger a reset or restart operation. Configure the watchdog function in the server, including setting parameters such as the clock source, pre-scaling coefficient, reload value, and enable bit. These parameters determine the conditions and time for the watchdog to trigger the reset operation. When it is determined that the valid first check value of the program to be detected cannot be obtained, it can be considered that the program may be dead. At this time, the watchdog mechanism can be triggered by software or hardware. After the watchdog detects a timeout (that is, no feeding signal is received within the predetermined time), it will perform a reset operation to restart the server and run the boot program. The bootloader is the first program that runs when the server starts. It is responsible for initializing the system hardware, loading the operating system or other necessary programs, and handing over control to the operating system. After the server is reset, the bootloader will start executing to ensure that the application of the ultrasonic heat meter can start and run normally.

[0045] In addition, when it is determined that the first check value of the program to be detected can be obtained, it can be confirmed that the application of the heat meter is currently in operation, but the operation state needs to be judged to determine whether a repair operation is required. The program to be detected is the application running in the ultrasonic heat meter, and then a unique identifier, that is, the first identifier, is extracted from the program to be detected. This identifier is used to distinguish the current program module or data block. At the same time, the program to be detected is calculated to obtain the first check value. At this time, the first check value is obtained by calculating the program to be detected using the CRC32 algorithm.

[0046] S102: Determine whether a first identifier exists in a preset identifier table, where the preset identifier table is a table composed of identifiers corresponding to preset backup data.

[0047] In the above S102, after obtaining the first identifier of the program to be detected, a preset identifier table needs to be obtained from the external storage chip. The preset identifier table is a data table storing preset backup data and its corresponding identifiers. The preset backup data refers to a set of backup data stored in the external storage chip. The first identifier is searched in the preset identifier table. The purpose of searching the first identifier is to determine whether the program to be detected has a backup in the external storage chip.

[0048] S103: When the first identifier exists in the preset identifier table, determine whether the first check value is consistent with the preset check value.

[0049] In the above S103, when the first identifier exists in the preset identifier table, it is confirmed that there is a backup of the program to be detected in the external storage chip, so the backup data corresponding to the first identifier is obtained from the external storage chip, and the preset check value corresponding to the backup data is obtained. At this time, the preset check value refers to the check value corresponding to the identifier in the external storage chip that is the same as the first identifier. The first check value corresponding to the program to be detected is compared with the preset check value, and the comparison is to determine whether the current program to be detected is in a normal working state or an abnormal working state.

[0050] When the first identifier does not exist in the preset identifier table, it is confirmed that there is no backup of the program to be detected in the external storage chip, and then the identifier of the program to be detected is continuously obtained, and the re-obtained identifier is compared with the preset identifier table.

[0051] S104: If it is determined that the first verification value is inconsistent with the preset verification value, obtaining first data corresponding to the preset verification value from the preset backup data.

[0052] In the above S104, when the first check value is inconsistent with the preset check value, it is confirmed that the program to be detected has changed and repair measures need to be taken for the program to be detected. The server can be restarted through the reset program, and the boot program is run to start the repair operation, which specifically includes: using the reset program to reset and start the server, and run the boot program, and obtain the fifth check value from the external storage chip again; obtain the sixth check value of the program to be detected again; determine whether the fifth check value is consistent with the sixth check value; when the fifth check value is inconsistent with the sixth check value, confirm to obtain the fourth data corresponding to the fifth check value from the preset backup data, and output the fourth data as the first data.

[0053] Specifically, ensure that the reset program has been correctly installed and configured on the server. The reset program may be a specific software tool used to restart the server when it is determined that the program to be detected has changed. The execution of the reset program is triggered by means of a server management interface, a command line tool, or a physical button. The reset program will shut down all running services and applications on the server and save necessary data (if possible). The server will shut down and restart, and run the boot program at the same time. The boot program is responsible for initializing the system hardware, loading the operating system or other necessary programs, and handing control to the operating system. After restarting again, it will identify and connect to the external storage chip, which stores the previously backed up data and corresponding check values. Before obtaining the fifth check value from the external storage chip, it is also necessary to determine whether the external storage chip is in normal operation and the data corresponding to the first identifier has been backed up in the external storage chip. If the external storage chip is in normal operation and the data corresponding to the first identifier has been backed up in the external storage chip, the backup data corresponding to the first identifier is read from the external storage chip, and the fifth check value corresponding to the backup data is obtained. Reload the program to be detected, and use the same check value algorithm to calculate the loaded program to be detected to obtain a sixth check value. Compare the fifth check value with the sixth check value. If the two check values ​​are consistent, it means that the backup data has not changed during the storage and reading process, and the program to be tested is consistent with the version at the time of backup. If the two check values ​​are inconsistent, it means that the program to be tested may be damaged. After determining that the fifth check value is inconsistent with the sixth check value, the data block corresponding to the fifth check value in the preset backup data, that is, the fourth data, will be located. The fourth data will be restored from the backup data and output as the current first data.

[0054] In addition, when the fifth check value is consistent with the sixth check value, it is confirmed to continue running the program to be tested. Then the program to be tested is complete and not damaged, and the program to be tested can be directly jumped to and run.

[0055] S105: Replace the second data according to the first data, the second data being data corresponding to the program to be detected.

[0056] In the above S105, when it is determined that the first check value is inconsistent with the preset check value, and after the software is reset, the fifth check value obtained again is inconsistent with the sixth check value, it can be confirmed that the program to be detected is abnormal and the abnormality needs to be repaired. The data block associated with the preset check value, that is, the first data, can be obtained from the preset backup data of the external storage chip. The first data is extracted from the backup data to replace the damaged data. First determine the second data corresponding to the program to be detected, and the second data can also be understood as the current data. Replace the first data to the second data position in the program to be detected. This usually involves operations such as modifying the data structure in the memory, writing files, or updating the database. After the replacement is completed, the replaced data is recalculated to obtain the check value, and the check value is compared with the check value in the backup data. According to the comparison result, it is verified whether the replacement is successful to ensure the integrity and consistency of the data. After the subsequent verification that the replacement is successful, if the check value is consistent with the backup check value, you can jump and run the program to be detected. If Figure 3 shown.

[0057] The present application also provides a processing device for an ultrasonic heat meter application program. Figure 4 is a schematic diagram of a processing device for an ultrasonic heat meter application provided in an embodiment of the present application, with reference to Figure 4 The device is a server, and the server includes an acquisition unit 401, a processing unit 402 and a replacement unit 403.

[0058] The acquisition unit 401 acquires a first identifier and a first check value of a program to be detected, where the program to be detected is an application program in an ultrasonic heat meter.

[0059] Processing unit 402 determines whether the first identifier exists in a preset identifier table, where the preset identifier table is a table composed of identifiers corresponding to preset backup data; when the first identifier exists in the preset identifier table, determines whether the first verification value is consistent with the preset verification value, where the preset verification value is the verification value corresponding to the first identifier; if it is determined that the first verification value is inconsistent with the preset verification value, the first data corresponding to the preset verification value is obtained from the preset backup data.

[0060] The replacing unit 403 replaces the second data according to the first data, where the second data is data corresponding to the program to be detected.

[0061] In a possible implementation, the acquisition unit 401 is used to receive a backup request sent by a host computer, determine the starting address, byte length and second check value according to the backup request; determine the third data according to the starting address and byte length, and obtain the third check value corresponding to the third data; the processing unit 402 is used to determine whether the second check value is consistent with the third check value; when the second check value is consistent with the third check value, obtain the operating status of the external storage chip; if it is determined that the operating status is in a normal state, obtain the second identifier corresponding to the third data; write the third data, the second identifier and the second check value into the external storage chip, the external storage chip includes a first corresponding relationship and a second corresponding relationship, the first corresponding relationship is the corresponding relationship between the third data and the second identifier, the second corresponding relationship is the corresponding relationship between the second check value and the third data, and write the third data into the preset backup data.

[0062] In one possible implementation, the acquisition unit 401 is used to acquire the target backup data from an external storage chip, calculate the target backup data, and obtain a fourth verification value; the processing unit 402 is used to determine whether the fourth verification value is consistent with the second verification value; when the fourth verification value is consistent with the second verification value, it is confirmed that a third data backup success prompt is sent to the upper computer.

[0063] In a possible implementation, the processing unit 402 is configured to confirm that a backup failure prompt is sent to the upper computer when the second verification value is inconsistent with the third verification value.

[0064] In a possible implementation, the processing unit 402 is used to determine whether the first verification value of the program to be detected can be obtained; if it is determined that the first verification value of the program to be detected cannot be obtained, a watchdog is used to timeout and reset the server to run the boot program.

[0065] In one possible implementation, the processing unit 402 is used to use the reset program to reset and start the server, and run the boot program to obtain the fifth verification value from the external storage chip again; the acquisition unit 401 is used to obtain the sixth verification value of the program to be detected again; the processing unit 402 is used to determine whether the fifth verification value is consistent with the sixth verification value; when the fifth verification value is inconsistent with the sixth verification value, confirm that the fourth data corresponding to the fifth verification value is obtained from the preset backup data, and output the fourth data as the first data.

[0066] In a possible implementation, the processing unit 402 is configured to confirm to continue running the program to be detected when the fifth verification value is consistent with the sixth verification value.

[0067] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0068] The present application also discloses an electronic device. Figure 5 , Figure 5 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 502 , and at least one communication bus 505 .

[0069] The communication bus 505 is used to realize the connection and communication between these components.

[0070] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0071] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0072] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 502, and calling data stored in the memory 502. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application requests; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.

[0073] Among them, the memory 502 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 502 includes a non-transitory computer-readable storage medium. The memory 502 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 502 may include a program storage area and a data storage area, wherein the program storage area. Instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. can be stored; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 502 can also be optionally at least one storage device located away from the aforementioned processor 501.

[0074] like Figure 5 As shown, the memory 502 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for processing an ultrasonic heat meter application program.

[0075] exist Figure 5In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call the application for processing the ultrasonic heat meter application stored in the memory 502. When executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments.

[0076] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0078] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0082] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any variation, use or adaptive change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure.

Claims

1. A method for processing an ultrasonic heat meter application, characterized in that: Applied in a server, the method comprises: Obtain a first identifier and a first check value of a program to be detected, wherein the program to be detected is an application program in an ultrasonic heat meter; Determine whether the first identifier exists in a preset identifier table, where the preset identifier table is a table consisting of identifiers corresponding to preset backup data; When the first identifier exists in the preset identifier table, determining whether the first check value is consistent with a preset check value, the preset check value being a check value corresponding to the first identifier; If it is determined that the first verification value is inconsistent with the preset verification value, obtaining first data corresponding to the preset verification value from the preset backup data; The second data is replaced according to the first data, and the second data is data corresponding to the program to be detected.

2. The method according to claim 1, characterized in that Before determining whether the first identifier exists in the preset identifier table, the method further includes: Receive a backup request sent by the host computer, and determine a starting address, a byte length, and a second check value according to the backup request; Determine third data according to the starting address and the byte length, and obtain a third check value corresponding to the third data; Determining whether the second verification value is consistent with the third verification value; When the second verification value is consistent with the third verification value, obtaining the operating state of the external storage chip; If it is determined that the operating state is in a normal state, obtaining a second identifier corresponding to the third data; The third data, the second identifier and the second verification value are written into the external storage chip, the external storage chip includes a first correspondence relationship and a second correspondence relationship, the first correspondence relationship is the correspondence relationship between the third data and the second identifier, the second correspondence relationship is the correspondence relationship between the second verification value and the third data, and the third data is written into the preset backup data.

3. The method according to claim 2, characterized in that After writing the third data, the second identifier and the second check value into the external storage chip, the method further includes: Acquire target backup data from the external storage chip, and calculate the target backup data to obtain a fourth check value; Determining whether the fourth verification value is consistent with the second verification value; When the fourth verification value is consistent with the second verification value, it is confirmed that the third data backup success prompt is sent to the host computer.

4. The method according to claim 2, characterized in that: After determining whether the second verification value is consistent with the third verification value, the method further includes: When the second check value is inconsistent with the third check value, confirm to send a backup failure prompt to the host computer.

5. The method according to claim 2, characterized in that: Before obtaining the first identifier and the first check value of the program to be detected, the method further includes: Determining whether the first verification value of the program to be detected can be obtained; If it is determined that the first verification value of the program to be detected cannot be obtained, a watchdog is used to timeout and reset the server, and a boot program is run.

6. The method according to claim 5, characterized in that After determining that the first verification value is inconsistent with the preset verification value, the method further includes: Resetting and starting the server using a reset program, and running the boot program, and obtaining a fifth check value from the external storage chip again; Obtaining again the sixth verification value of the program to be detected; Determining whether the fifth check value is consistent with the sixth check value; When the fifth verification value is inconsistent with the sixth verification value, confirm to obtain fourth data corresponding to the fifth verification value from the preset backup data, and output the fourth data as the first data.

7. The method according to claim 6, characterized in that After determining whether the fifth verification value is consistent with the sixth verification value, the method further includes: When the fifth verification value is consistent with the sixth verification value, it is confirmed to continue running the program to be detected.

8. A processing device for an ultrasonic heat meter application, characterized in that: The device is a server, and the server comprises an acquisition unit (401), a processing unit (402) and a replacement unit (403); The acquisition unit (401) acquires a first identifier and a first check value of a program to be detected, wherein the program to be detected is an application program in an ultrasonic heat meter; The processing unit (402) determines whether the first identifier exists in a preset identifier table, wherein the preset identifier table is a table composed of identifiers corresponding to preset backup data; When the first identifier exists in the preset identifier table, determining whether the first check value is consistent with a preset check value, the preset check value being a check value corresponding to the first identifier; If it is determined that the first verification value is inconsistent with the preset verification value, obtaining first data corresponding to the preset verification value from the preset backup data; The replacement unit (403) replaces second data according to the first data, wherein the second data is data corresponding to the program to be detected.

9. An electronic device, characterized in that: The electronic device (500) comprises a processor (501), a memory (502), a user interface (503) and a network interface (504), wherein the memory (502) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (502) so that the electronic device (500) executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.