Program updating method, terminal equipment program updating method and refrigerant detector

By setting the preset time length and key between the terminal device and the main control device, the program update conditions of the refrigerant detector are limited, which solves the problems of low efficiency and misoperation of the traditional update method, achieves efficient and accurate program update, and ensures The equipment operates safely.

CN118627074APending Publication Date: 2024-09-10ZHEJIANG SANHUA INTELLIGENT CONTROLS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310759961.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-07
Filing Date
2023-06-26
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

A2L or A3 refrigerants, alternatives to traditional refrigerants, are flammable and require concentration detection by refrigerant detectors to prevent safety accidents. Due to different usage environments and conditions, the refrigerant detector program needs to be optimized and updated, but the traditional update method is inefficient. And it can easily lead to misoperation, causing program erasure and failure to work properly.

Method used

By setting the first preset time period and the first key between the terminal device and the main control device, the program update conditions are limited to ensure that the program update is only performed when the key is received within the preset time period, thus avoiding unconditional updates and improving update efficiency. accuracy and safety without the need to disassemble the refrigerant detector housing for updates.

Benefits of technology

It improves the accuracy and efficiency of refrigerant detector program updates, prevents program erasure caused by misoperation, ensures normal operation of the equipment, and saves manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118627074A
    Figure CN118627074A
Patent Text Reader

Abstract

The invention discloses a program updating method, a terminal equipment program updating method and a refrigerant detector. The terminal equipment judges whether a first secret key is received within a first preset duration or not; and if the terminal device receives the first secret key within the first preset duration, executing a program updating step. According to the scheme, the program of the terminal equipment is protected through the first secret key, and the problem that the program of the terminal equipment is erased and cannot work normally due to the fact that the terminal equipment enters a program updating function by mistake can be prevented.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on March 7, 2023, with application number 202310240113.8 and application name “A program update method, terminal device program update method and refrigerant detector”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of refrigeration, and in particular to a program update method, a terminal device program update method, and a refrigerant detector. Background Art

[0003] According to the Montreal Protocol, an international environmental convention, traditional refrigerants will be replaced by low chronic toxicity refrigerants such as A2L or A3 because they will damage the atmospheric ozone layer. However, these refrigerants are flammable. In order to prevent their leakage from reaching explosive concentrations and causing safety accidents, refrigerant detectors are needed to detect their concentrations.

[0004] Due to different usage environments and conditions, the refrigerant detector program needs to be optimized and updated. Summary of the invention

[0005] In view of this, the present application provides a program update method, a terminal device program update method and a refrigerant detector, and the specific schemes thereof are as follows:

[0006] A program update method is applicable to a program update system, wherein the program update system includes a terminal device and a main control device, and includes the following steps:

[0007] The terminal device determines whether the first key sent by the master control device is received within a first preset time period;

[0008] If the terminal device receives the first key within a first preset time period, a program update step is executed.

[0009] The program update method disclosed in this embodiment can improve the accuracy of terminal device program update by setting the first preset duration and the first key to limit the program update condition.

[0010] A terminal device program update method, applied to a terminal device, comprises the following steps:

[0011] Determining whether a first key sent by the master control device is received within a first preset time period;

[0012] If it is determined that the first key is received within the first preset time period, the program update step is executed.

[0013] The terminal device program update method disclosed in this embodiment can improve the accuracy of terminal device program update by setting the first preset duration and the first key to limit the program update condition.

[0014] A refrigerant detector, comprising:

[0015] A determination module, used to determine whether a first key sent by the master control device is received within a first preset time period;

[0016] The program update module is used to execute a program update step when the refrigerant detector receives the first key within a first preset time period.

[0017] The refrigerant detector disclosed in this embodiment can improve the accuracy of refrigerant detector program update by setting the first preset time length and the first key to limit the program update condition.

[0018] A refrigerant detector, comprising:

[0019] The processor is used to determine whether the refrigerant detector receives the first key sent by the main control device within a first preset time period; if it is determined that the refrigerant detector receives the first key within the first preset time period, then execute a program update step;

[0020] The memory is used to store the program for the processor to execute the above processing process.

[0021] The refrigerant detector disclosed in this embodiment can improve the accuracy of refrigerant detector program update by setting the first preset time length and the first key to limit the program update condition.

[0022] It can be seen from the above technical scheme that the program update method, terminal device program update method and refrigerant detector disclosed in the present application, the terminal device determines whether the first key is received within a first preset time period; if the terminal device receives the first key within the first preset time period, the program update step is executed to update the program of the terminal device, which can improve the accuracy of the program update. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A flowchart of a program updating method disclosed in an embodiment of the present application;

[0025] Figure 2 A flowchart of a program updating method disclosed in an embodiment of the present application;

[0026] Figure 3 A flowchart of a program updating method disclosed in an embodiment of the present application;

[0027] Figure 4 A flowchart of a program updating method disclosed in an embodiment of the present application;

[0028] Figure 5 A flowchart of a terminal device program update method disclosed in an embodiment of the present application;

[0029] Figure 6 A schematic diagram of the structure of a terminal device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The present application discloses a program update method, which is applied to a program update system. The program update system includes: a terminal device and a main control device. The flowchart of the program update method disclosed in this embodiment is as follows: Figure 1 As shown, including:

[0032] Step S11: The terminal device determines whether it has received a first key sent by the master control device within a first preset time period;

[0033] Step S12: If the terminal device receives the first key within the first preset time period, a program update step is executed.

[0034] The specific program update may be a full program update or a partial program update, which is not specifically limited in this embodiment.

[0035] In one embodiment, the program updating step includes:

[0036] The terminal device triggers the main control device to output the first program information;

[0037] The terminal device receives the first program information and performs a program update at least according to the first program information.

[0038] That is, the first program information is used to update all or part of the existing programs of the terminal device. The flowchart of the program update method disclosed in this embodiment can be specifically as follows: Figure 2As shown, the following steps are included:

[0039] Step S21: The terminal device determines whether it has received a first key sent by the master control device within a first preset time period;

[0040] Step S22: If the terminal device receives the first key within the first preset time period, the main control device is triggered to output the first program information;

[0041] Step S23: The terminal device obtains the first program information output by the main control device, and updates the program according to the first program information.

[0042] The refrigerant detector for detecting the concentration of A2L and A3 refrigerants is an embodiment of the above-mentioned terminal device. Due to the particularity of its function, the structure is usually small and light and includes a shell.

[0043] If the traditional burning method is used, the shell of the refrigerant detector needs to be disassembled, the burner needs to be connected to the refrigerant detector chip, and the power needs to be turned on to update the program. However, the process of disassembling the shell of the refrigerant detector is time-consuming and laborious, which reduces efficiency.

[0044] The program update method disclosed in this scheme, in one embodiment, the terminal device hardware can be connected to the main control device through 485 communication or CAN communication, and there is no need to disassemble the shell of the terminal device when updating the program, saving manpower and material resources; in terms of software, the problem of difficulty in program update of the refrigerant detector due to its own structure and the particularity of the use environment is solved through detailed processes and logical relationships, thereby improving efficiency. Of course, the terminal device and the main control device can also communicate through hardware communication methods such as USB, which is not specifically limited in this embodiment. In addition, this embodiment can improve the accuracy of terminal device program update by setting a first preset duration and a first key to limit program update conditions, that is, it can be used to protect the terminal device program and prevent the terminal device from mistakenly entering the program update function, resulting in program erasure, malfunction of the terminal device, and other problems.

[0045] Specifically, it is determined whether the terminal device receives the first key within a first preset time period.

[0046] Only when it is determined that the terminal device has received the first key within the first preset time period, the program update step will be executed to facilitate the terminal device to update the program. In this solution, the first key is used to protect the program of the terminal device to prevent the user from accidentally touching the program update function, which will cause the terminal device program to be erased and unable to work normally; and only when the terminal device receives the first key within the first preset time period, the program update function will be executed, avoiding the problem that unconditional entry into the program update function may cause accidental touch.

[0047] Further, determining whether the terminal device receives the first key within the first preset time period may be as follows: only when it is determined that the terminal device meets the condition, whether the terminal device receives the first key within the first preset time period is determined.

[0048] Among them, the terminal device satisfies the conditions, which can be: the terminal device is powered on, that is, as long as it is determined that the terminal device is powered on, the timing starts to determine whether the terminal device has received the first key until the first preset time is reached; or, the terminal device is started, and the timing starts when it is determined that the terminal device is started, and it is determined whether the terminal device has received the first key until the first preset time is reached; or, the terminal device is reset, and the timing starts when it is determined that the terminal device is reset, and it is determined whether the terminal device has received the first key until the first preset time is reached.

[0049] After the terminal device meets the conditions, it waits for input, which can be information directly input by the user into the terminal device. At the same time, timing is started from when it is determined that the terminal device meets the conditions to determine whether the key is received within the first preset time.

[0050] If it is determined that the terminal device receives the key within the first preset time period, it is necessary to further judge the received key to determine whether the received key is the first key; or, directly judge whether the first key is received. If the first key is not received, further judge whether the key is not received, or the key is received but the received key is not the first key.

[0051] If it is determined that the key received by the terminal device within the first preset time period is the first key, the program update function of the terminal device is executed, that is, the terminal device is controlled to enter the program update function area to perform the program update operation.

[0052] In another embodiment, the program updating step includes:

[0053] The terminal device outputs second program information related to the current version information of the terminal device to the main control device; the terminal device determines whether a second key based on the second program information is received within a second preset time period; if the terminal device receives the second key within the second preset time period, it waits for the program to be updated, triggers the main control device to output the first program information to the terminal device, and determines whether the terminal device completes the program update within a third preset time period.

[0054] After the terminal device enters the program update function area through the first key KEY1, the terminal device will output the second program information to the main control device through the communication line. The second program information is information related to the current version information of the terminal device program, which includes the current program version, program CRC check and selection menu, wherein the program CRC check is the program cyclic redundancy check code check. The first program information is output to the main control device or directly to the computer, so that the user can judge and confirm the current program version through the main control device or computer, thereby determining whether the current program of the terminal device needs to be updated. If it needs to be updated, continue with the subsequent steps. If it does not need to be updated, control the terminal device to reset.

[0055] Among them, the terminal device can be connected to the main control device through a 485 communication or CAN communication module, and output the second program information to the main control device or the computer through the 485 communication or CAN communication module.

[0056] After the terminal device outputs the second program information, the timing is restarted. If the user determines that the current version of the terminal device needs to be updated, the second key KEY2 needs to be input into the terminal device so that the terminal device receives the second key KEY2 within the second preset time period. Only when the terminal device receives the second key KEY2 within the second preset time period will it wait for the program update.

[0057] That is, after the terminal device outputs the second program information, the timing is restarted, and it is determined whether the second key based on the second program information is received within the second preset time. The second key is used for input based on the second program information, that is, only when the user determines that the terminal device currently needs to perform a program update based on the second program information, will the second key be input to the terminal device.

[0058] If the terminal device receives the second key within the second preset time period, the timing needs to be restarted, and it is further determined whether the program of the terminal device is updated within the third preset time period.

[0059] In this embodiment, by determining whether the first key is received within the first preset time after the terminal device is powered on, the problem that the terminal device of the refrigerant has no hardware conditions to enter the program update function is solved; after entering the program update function area, the terminal device first outputs the second program information through the 485 communication or CAN communication module, so that the user can judge and confirm the current program version, thereby improving operation efficiency; in addition, after the terminal device outputs the second program information, it determines whether the second key is received within the second preset time, and uses the first key and the second key to doubly protect the original program of the terminal device, thereby preventing the user from mistakenly entering the program update function, resulting in the erasure of the terminal device program, and thus failing to work normally.

[0060] The above program updating method is also applicable to online updating, and in this case the program updating system may further include: a server.

[0061] The server can communicate with the terminal device and the main control device respectively; when the terminal device needs to update the program, the main control device sends the first key to the server, and when the terminal device is powered on, the server sends the first key to the terminal device. If the terminal device receives the first key sent by the server within the first time after the power-on, the program update is triggered. Specifically, the main control device can be triggered to send the first program information to the server, and the server then sends the first program information to the terminal device to perform the program update.

[0062] In another embodiment, the main control device may also first send the first key and the first program information to the server. If the terminal device receives the first key sent by the server within the first time after power-on, the server is triggered to further send the first program information to the terminal device for program update.

[0063] Specifically, the server may be a cloud server. In an embodiment of online update, the first key sent by the master device may be stored in the server. After the terminal device is powered on, the server may send the first key to the terminal device. When the terminal device is powered on, a signal may be sent to the server so that the server may know that the terminal device has been powered on. The server may also search for the terminal device. When the terminal device is found for the first time, it means that the terminal device has been powered on.

[0064] In the program update method disclosed in this embodiment, the terminal device determines whether the first key is received within the first preset time period; if the terminal device receives the first key within the first preset time period, the main control device or the server is triggered to output the first program information to the terminal device, so as to update the program of the terminal device. In this scheme, the program of the terminal device is protected by the first key to prevent the user from accidentally touching the program update function, which causes the terminal device program to be erased and cannot work normally; and the program update function will only be executed if the terminal device receives the first key within the first preset time period, avoiding the problem that unconditional entry into the program update function may cause accidental touch.

[0065] This embodiment discloses a program updating method, and its flow chart is as follows: Figure 3 As shown, including:

[0066] Step S31, determining whether the terminal device receives the key within a first preset time period;

[0067] Step S32: If the terminal device receives the third key or does not receive the key within the first preset time period, control the terminal device to execute the user program function;

[0068] Step S33: If it is determined that the terminal device receives the first key within the first preset time period, the main control device is triggered to output the first program information;

[0069] Step S34: The terminal device obtains the first program information output by the main control device, and updates the program of the terminal device.

[0070] When the terminal device meets the condition, the timing starts to determine whether the terminal device receives the key within the first preset time length. If it is determined that the key is received, it is necessary to further determine whether the received key is the first key. If it is the first key, the program update function of the terminal device is executed when it is determined that the first key is received; if it is not the first key but the third key, the terminal device is controlled to execute the user program function when it is determined that the third key is received, that is, the program update function of the terminal device is not performed;

[0071] Furthermore, if the key is not received, after the first preset time period ends, the terminal device is controlled to execute the user program function.

[0072] Alternatively, it can also be: when the terminal device meets the conditions, start timing and directly determine whether the first key is received within the first preset time period. If the first key is received, the main control device is triggered to output the first program information, and the program update function of the terminal device can be specifically executed when it is determined that the first key is received; if the first key is not received, further determine whether the key is not received, or the key is received but the received key is the third key. If it is determined that the received key is the third key, the terminal device is controlled to execute the user program function when it is determined that the third key is received, that is, the program update function of the terminal device is not performed; if it is determined that neither the first key nor the third key is received within the first preset time period, then after the first preset time period ends, the terminal device is controlled to execute the user program function.

[0073] The terminal device meets the conditions, such as: after power-on, it is in a waiting state within the first preset time waiting for input, and can neither update the program nor enter the regular function program to communicate with the main control device. If it is necessary to detect the regular functions of the terminal device and the detection time is high, such as: factory detection of the terminal device, etc., after the terminal device is powered on, it automatically enters the user program area after waiting for the first preset time, which is time-consuming and labor-intensive, affecting efficiency. Therefore, by setting a third key, if the third key is detected within the first preset time, the user program function can be directly entered without waiting for the first preset time to end, which can save time and improve efficiency.

[0074] Furthermore, when it is determined that the terminal device has received the first key within a first preset time period, the second program information is output, and it is determined whether the second key based on the second program information is received within a second preset time period. If the second key is received, wait for the program to be updated; if the second key is not received within the second preset time period, the second program information is repeatedly output.

[0075] The terminal device outputs the second program information, that is, after the terminal device outputs the information related to its current program, it waits for the user to input the second key based on the second program information.

[0076] If the second key is received within the second preset time period, the terminal device enters a state of waiting for program update; if the key is not received within the second preset time period, or if the key is received but the key is not the second key, the terminal device can be controlled to repeatedly output the second program information to remind the user to update the version to prevent the program from being erased due to misoperation, which may cause the terminal device to fail to operate normally.

[0077] In the terminal device program update method disclosed in this embodiment, the terminal device determines whether the first key is received within the first preset time length; if the terminal device receives the first key within the first preset time length, the main control device is triggered to output the first program information to the terminal device, so as to update the program of the terminal device. In this scheme, the program of the terminal device is protected by the first key to prevent the user from accidentally touching the program update function, which causes the terminal device program to be erased and cannot work normally; and the program update function will only be executed if the terminal device receives the first key within the first preset time length, avoiding the problem that unconditional entry into the program update function may cause accidental touch.

[0078] This embodiment discloses a program updating method, and its flow chart is as follows: Figure 4 As shown, including:

[0079] Step S41: The terminal device determines whether the first key is received within a first preset time period;

[0080] Step S42: if it is determined that the terminal device receives the first key within the first preset time period, then executing a program update function of the terminal device, and outputting second program information related to the current version information of the terminal device program;

[0081] Step S43, determining whether a second key based on the second program information is received within a second preset time period;

[0082] Step S44: if it is determined that the second key is received within the second preset time, wait for program update, trigger the main control device to output the first program information to the terminal device, and determine whether the terminal device completes program update within the third preset time;

[0083] Step S45: if it is determined that the program update of the terminal device is completed within the third preset time period, output the third program information related to the updated program version information of the terminal device.

[0084] When the terminal device receives the second key and enters the waiting state for program update, the timing is restarted and it is determined whether the program of the terminal device is updated within the third preset time, that is, whether the transmission and update of the new program is completed within the third preset time.

[0085] If the transmission and update of the new program is completed within the third preset time period, it indicates that the program in the terminal device has been successfully updated. At this time, the terminal device needs to output the third program information. The third program information is information related to the updated program version information of the terminal device, that is, the new program version of the terminal device and CRC check and other related parameters, which are output to the main control device or computer so that the user can confirm the program version.

[0086] Further, if it is determined that the program update of the terminal device is not completed within the third preset time period, it is re-determined whether the terminal device receives the key within the first preset time period.

[0087] That is, if the program update of the terminal device is not completed within the third preset time period, the terminal device resets itself and re-enters the program update interface, that is, the program update process of the terminal device starts again and restarts, and determines whether the terminal device receives the key within the first preset time period. If the first key is received within the first preset time period, the program update function of the terminal device is executed, and the second program information related to the current version information of the terminal device program is output. It is determined whether the second key based on the second program information is received within the second preset time period. If it is determined that the second key is received within the second preset time period, wait for the program update, and determine whether the program update of the terminal device is completed within the third preset time period.

[0088] If it is determined that the program update of the terminal device is not completed within the third preset time period, the terminal device resets itself, which can prevent the terminal device from being stuck during the program update process and being unable to be used normally when the power cannot be cut off.

[0089] Since there is no reset line between the refrigerant terminal device and the main control device, the main control device cannot control the terminal device to reset after determining that the terminal device is faulty. If during the program update process of the terminal device, the transmission of the new program is disturbed, resulting in communication interruption or other reasons that cause the new program update to fail, the terminal device will not be able to be used normally due to program jamming.

[0090] If the terminal device is stuck during the program update process and resets itself, it will be unable to enter the regular function program, that is, the terminal device cannot directly execute the user program function because the code in the user program function area has been modified during the program update. At this time, you can reset and re-enter the update interface. If it does not reset itself, it will remain stuck in the damaged code area and will not be able to re-enter the update program function.

[0091] Furthermore, if it is determined that the program update of the terminal device is completed within the third preset time period, third program information related to the updated program version information of the terminal device is output; confirmation information based on the third program information is obtained, and the terminal device after the program update is controlled to execute the user program function.

[0092] After the program update of the terminal device is completed, the terminal device will output information related to the updated program version for the user to confirm the program version. After obtaining the confirmation information, that is, after the user completes the confirmation of the program version, the program of the terminal device will be reset and enter the new user program area based on the reset operation.

[0093] Specifically, after obtaining the confirmation information, the reset program is entered, at which time, the timing is restarted, and a new user program area is entered within a first preset time period, and the new user program area corresponds to the user program area after the program of the terminal device is updated.

[0094] The program update method disclosed in the present embodiment counts down while waiting for the update program to be sent. If the sending and updating of the new program are not completed within the third preset time period, the terminal device resets itself, thereby solving the problem that the terminal device is stuck and becomes inoperable when the power cannot be turned off and the transmission of the new program is disturbed, resulting in communication interruption or other reasons that cause the update of the new program to fail. In addition, after the program is successfully updated, the terminal device outputs the information related to the new program, i.e., the third program information, so that the user can judge and confirm the updated program version of the terminal device to improve the operation efficiency.

[0095] In the program update method disclosed in this embodiment, the terminal device determines whether the first key is received within the first preset time length; if the terminal device receives the first key within the first preset time length, the main control device is triggered to output the first program information to the terminal device, so as to update the program of the terminal device. In this scheme, the program of the terminal device is protected by the first key to prevent the user from accidentally touching the program update function, which causes the terminal device program to be erased and unable to work normally; and the program update function will only be executed if the terminal device receives the first key within the first preset time length, avoiding the problem of unconditional entry into the program update function that may cause accidental touch.

[0096] This embodiment discloses a terminal device program update method, which is applied to a terminal device and includes the following steps:

[0097] The terminal device determines whether the first key sent by the master device is received within the first preset time period;

[0098] If the terminal device determines that the first key is received within the first preset time period, the program update step is executed.

[0099] The terminal device program updating method disclosed in this embodiment may refer to the program updating method applicable to the program updating system provided in the above embodiments.

[0100] In a specific embodiment, the flow chart is as follows: Figure 5 As shown, including:

[0101] Step S51: The terminal device determines whether a first key sent by the master device is received within a first preset time period;

[0102] Step S52: If the terminal device determines that the first key is received within the first preset time period, the main control device is triggered to output the first program information;

[0103] Step S53: The terminal device updates the program based on the first program information.

[0104] Furthermore, if the terminal device determines that the first key is received within the first preset time period, triggering the main control device to output the first program information includes:

[0105] If the first key is received within the first preset time period, the terminal device outputs second program information related to the current version information of the terminal device to the main control device;

[0106] The terminal device determines whether a second key based on the second program information is received within a second preset time period;

[0107] If the terminal device receives the second key within the second preset time, it waits for the program to be updated, triggers the main control device to output the first program information to the terminal device, and determines whether the terminal device completes the program update within the third preset time;

[0108] Among them, the starting time of the first preset duration is the time when the terminal device meets the conditions.

[0109] The program updating method of the terminal device disclosed in this embodiment is implemented based on the program updating method disclosed in the above embodiment, which will not be described in detail here.

[0110] The terminal device program update method disclosed in this embodiment is applied to the terminal device to determine whether the first key is received within the first preset time length; if the first key is received within the first preset time length, the main control device is triggered to output the first program information, and the program is updated based on the first program information. In this scheme, the program of the terminal device is protected by the first key to prevent the user from accidentally touching the program update function, which causes the terminal device program to be erased and unable to work normally; and the program update function will only be executed if the terminal device receives the first key within the first preset time length, avoiding the problem of unconditional entry into the program update function that may cause accidental touch.

[0111] This embodiment discloses a terminal device, including:

[0112] Judgment module and program update module.

[0113] A determination module, used to determine whether a first key sent by a master control device is received within a first preset time period;

[0114] The program update module is used for executing a program update step when the refrigerant detector determines that the first key is received within a first preset time period.

[0115] Further, in one embodiment, the program updating step includes:

[0116] The main control device is triggered to output first program information, and a program is updated based on the first program information.

[0117] In another embodiment, the program updating step includes: outputting second program information related to the current version information of the terminal device to the main control device;

[0118] Determining whether a second key based on the second program information is received within a second preset time period;

[0119] If the second key is received within the second preset time, wait for the program to be updated, trigger the main control device to output the first program information to the terminal device, and determine whether the terminal device completes the program update within the third preset time;

[0120] Among them, the starting time of the first preset duration is the time when the terminal device meets the conditions.

[0121] The specific implementation of the terminal device disclosed in this embodiment is based on the program update method disclosed in the above embodiment, which will not be repeated here. The above terminal device may be a refrigerant detector.

[0122] This embodiment discloses a terminal device, and its structural diagram is as follows: Figure 6 As shown, including:

[0123] Processor 61 and memory 62.

[0124] The processor 61 is used to determine whether the terminal device receives the first key within a first preset time period; if it is determined that the terminal device receives the first key within the first preset time period, a program update step is executed to update the program of the terminal device.

[0125] In one embodiment, the program updating step includes:

[0126] The main control device is triggered to output first program information, and a program is updated based on the first program information.

[0127] Further, in another embodiment, the program updating step includes:

[0128] Outputting second program information related to the current version information of the terminal device to the main control device;

[0129] Determining whether a second key based on the second program information is received within a second preset time period;

[0130] If the second key is received within the second preset time, wait for the program to be updated, trigger the main control device to output the first program information to the terminal device, and determine whether the terminal device completes the program update within the third preset time;

[0131] Among them, the starting time of the first preset duration is the time when the terminal device meets the conditions.

[0132] The terminal device disclosed in this embodiment is implemented based on the program update method disclosed in the above embodiment, which will not be described in detail here. The above terminal device may be a refrigerant detector.

[0133] The terminal device disclosed in this embodiment determines whether the first key is received within the first preset time length; if the first key is received within the first preset time length, the main control device is triggered to output the first program information, and the program is updated based on the first program information. In this solution, the program of the terminal device is protected by the first key to prevent the user from accidentally touching the program update function, which causes the terminal device program to be erased and unable to work normally; and the program update function will only be executed if the terminal device receives the first key within the first preset time length, avoiding the problem of unconditional entry into the program update function that may cause accidental touches.

[0134] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. The computer program is loaded and executed by a processor to implement the steps of the above-mentioned program updating method. The specific implementation process can refer to the description of the corresponding part of the above-mentioned embodiment, and this embodiment will not repeat it.

[0135] The present application also proposes a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the method provided in various optional implementations of the above-mentioned program update method or program update system. The specific implementation process can refer to the description of the above-mentioned corresponding embodiment, and will not be repeated.

[0136] It should be noted that when the above-mentioned program update method is applicable to online update, the key and / or program information previously transmitted between the main control device and the terminal device can be transmitted through the server.

[0137] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0138] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0139] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0140] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A program update method, applicable to a program update system, wherein the program update system comprises a terminal device and a main control device, characterized in that: The following steps are involved: The terminal device determines whether the first key sent by the master control device is received within a first preset time period; If the terminal device receives the first key within a first preset time period, a program update step is executed.

2. The program updating method according to claim 1, characterized in that: The program updating step comprises: The terminal device triggers the main control device to output first program information; The terminal device receives the first program information and performs program update at least according to the first program information.

3. The program updating method according to claim 1, characterized in that: The program updating step comprises: The terminal device outputs second program information related to the current version information of the terminal device to the main control device; The main control device outputs a second key to the terminal device according to the second program information; The terminal device determines whether the second key is received within a second preset time period; If the terminal device receives the second key within the second preset time period, it waits for program update, triggers the main control device to output the first program information to the terminal device, and determines whether the terminal device completes the program update within a third preset time period.

4. The program updating method according to claim 3, characterized in that: Also includes: If the terminal device determines that the program update of the terminal device is completed within the third preset time period, the terminal device outputs third program information related to the updated program version information to the main control device; The terminal device obtains confirmation information generated by the main control device based on the third program information, and controls the terminal device after the program is updated to execute the user program function.

5. The program updating method according to claim 3, characterized in that: Also includes: If it is determined that the program update of the terminal device is not completed within the third preset time period, resetting the terminal device and re-determining whether the terminal device has received the key within the first preset time period; If it is determined that the second key is not received within the second preset time period, the first program information is output repeatedly.

6. The program updating method according to claim 1, characterized in that: The program update system further includes a server, the server can store the first key and / or the first program information, and the server can communicate with the terminal device and the main control device respectively; The main control device outputs the first key and / or the first program information to the terminal device at least through the server.

7. The program updating method according to any one of claims 1 to 6, characterized in that: Also includes: If the terminal device determines that the third key is received within the first preset time period or no key is received, the terminal device is controlled to execute a user program function.

8. A terminal device program update method, applied to a terminal device, characterized in that: The following steps are involved: Determining whether a first key sent by the master control device is received within a first preset time period; If it is determined that the first key is received within the first preset time period, the program update step is executed.

9. The terminal device program updating method according to claim 8, characterized in that: The program updating step comprises: Outputting second program information related to the current version information of the terminal device to the main control device; Determining whether a second key based on the second program information is received within a second preset time period; If the second key is received within the second preset time, wait for program update, trigger the main control device to output the first program information to the terminal device, and determine whether the terminal device completes program update within a third preset time; Alternatively, the program updating step includes: The terminal device triggers the main control device to output first program information; The terminal device receives the first program information and performs program update at least according to the first program information.

10. A refrigerant detector, characterized in that: include: A judgment module, used for judging whether the refrigerant detector receives a first key sent by the main control device within a first preset time period; The program update module is used to execute a program update step when the refrigerant detector receives the first key within a first preset time period.

11. A refrigerant detector, characterized in that: include: A processor, configured to determine whether the refrigerant detector receives a first key sent by the main control device within a first preset time period; If it is determined that the refrigerant detector receives the first key within the first preset time period, executing a program update step; The memory is used to store the program for the processor to execute the above processing process.