Software upgrading method and device for LCD (Liquid Crystal Display) screen of box transformer measurement and control device

Through the network connection between the measurement and control device and the target LCD screen and the packet verification mechanism, the remote software upgrade of the box-change measurement and control device LCD screen is realized, solving the problem of low efficiency of the traditional serial port upgrade mode, reducing labor and time costs, and improving operation and maintenance efficiency and security.

CN120276758AActive Publication Date: 2025-07-08BEIJING HUINENGDA ELECTRIC POWER TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510554312.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-07-08
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

The traditional serial port upgrade mode has low efficiency in the upgrade of the LCD screen software of the box-change measurement and control device in complex environments, resulting in increased labor and time costs, and the inability to achieve effective remote management.

Method used

Through the network connection between the measurement and control device and the target LCD screen and the target web page, remote software upgrade is realized, and technologies such as upgrade approval information, target serial number matching, and data packet verification are adopted to ensure the accuracy and completeness of data transmission and avoid data loss or disorderly order caused by network fluctuations.

Benefits of technology

It significantly reduces labor and time costs, improves the operation and maintenance efficiency of upgrade tasks, ensures the safety and reliability of the upgrade process, and adapts to equipment management needs in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276758A_ABST
    Figure CN120276758A_ABST
Patent Text Reader

Abstract

The invention discloses a software upgrading method and device for an LCD screen of a box transformer substation measurement and control device, and relates to the technical field of software upgrading of the LCD screen of the box transformer substation measurement and control device in a power system. Receiving target information sent by the target LCD screen, switching the measurement and control device into an active mode according to the target information, and sending upgrading acknowledgement information to the target webpage; receiving a target sub-data packet; analyzing the target sub-data packet to obtain a target serial number; when the target serial number is consistent with a preset comparison serial number, sending the target sub-data packet to the target LCD screen, so that the target LCD screen writes the target sub-data packet into an internal memory; obtaining a first verification value from an ending data packet until the ending data packet sent by the target webpage is received; and when the first verification value is equal to the second verification value, determining that the target LCD screen is in an upgrading success state so as to display the upgrading success state to the target webpage. According to the technical scheme, the problem that a traditional serial port upgrading mode is low in efficiency in a complex scene is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of software upgrade for the LCD screen of box-type substation measurement and control devices in the power system, and specifically relates to a software upgrade method and device for the LCD screen of box-type substation measurement and control devices. Background Art

[0002] In the power system, especially in the field of operation management of wind farms, as one of the core devices, the functional reliability and operation and maintenance efficiency of box-type substation measurement and control devices are directly related to the safe and stable operation of the power system. As the core interface for human-machine interaction, the LCD display screen undertakes key tasks such as monitoring the operation status of the device, parameter configuration, and displaying alarm information, and is an important window for operation and maintenance personnel to master the health status of the device.

[0003] Currently, the software upgrade of the LCD of box-type substation measurement and control devices mainly relies on the traditional serial port upgrade mode. This mode is based on the physical layer serial communication protocol and requires a dedicated host computer device and customized cables to establish a point-to-point connection. The specific operation process is as follows: Operation and maintenance personnel need to carry the host computer to the site, complete the device connection through the physical interface, and perform software package transmission, verification, and burning operations based on the serial communication protocol. In the actual large-scale wind farm environment, the number of box-type substation measurement and control devices in the wind farm is huge, and they are widely distributed in complex environments such as remote mountainous areas, high-altitude areas, or offshore platforms. The traditional serial port upgrade mode requires operation and maintenance personnel to perform on-site operations one by one, resulting in a significant increase in labor costs and time costs, and the maintenance efficiency of the upgrade task is low.

[0004] Therefore, there is an urgent need for a software upgrade method and device for the LCD screen of box-type substation measurement and control devices that can solve the above technical problems. Summary of the Invention

[0005] This application provides a software upgrade method and device for the LCD screen of box-type substation measurement and control devices. This method can achieve remote upgrade, significantly reduce labor and time costs, and adapt to the device management requirements in complex environments, effectively solving the problem of low efficiency of the traditional serial port upgrade mode in complex scenarios.

[0006] First aspect, the present application provides a software upgrade method for the LCD screen of a box-type substation measurement and control device, which is applied to the measurement and control device. The measurement and control device is connected to the target LCD screen through a serial port, and the measurement and control device is connected to the target web page through a network. The method includes: receiving target information sent by the target LCD screen, switching the measurement and control device to the active mode according to the target information, and sending an upgrade approval message to the target web page; receiving a target sub-packet, where the target sub-packet is any one of the sub-packets, and the target sub-packet is a sub-packet sent to the measurement and control device according to the upgrade approval message. The target sub-packet includes the LCD device address, function code, register start address, number of data bytes, packet sequence number, and byte executable file text; parsing the target sub-packet to obtain the target sequence number; determining whether the target sequence number is consistent with a preset comparison sequence number, where the preset comparison sequence number is the sequence number corresponding to the total number of times the measurement and control device parses the target sub-packet within a preset time; when the target sequence number is consistent with the preset comparison sequence number, sending the target sub-packet to the target LCD screen so that the target LCD screen writes the target sub-packet into the internal memory; until receiving an end packet sent by the target web page, obtaining a first check value from the end packet; determining whether the first check value is equal to a second check value, where the second check value is the byte check value calculated by the target LCD screen for all received target sub-packets; when the first check value is equal to the second check value, determining that the target LCD screen is in a successful upgrade state so as to display the successful upgrade state to the target web page.

[0007] By adopting the above technical solution, the measurement and control device automatically switches to the active mode by receiving the target information sent by the target LCD screen, and sends an upgrade approval message to the target web page. According to the upgrade approval message, it is determined to receive the target sub-packet, and the upgrade file is split into multiple sub-packets, reducing the risk of single transmission failure. By matching the target sequence number with the preset comparison sequence number, it is ensured that the sub-packets are received in order, avoiding data loss or disorder caused by network fluctuations. Then, a first check value is obtained from the end packet sent by the target web page, and the byte check value of all sub-packets calculated by the target LCD screen, that is, the second check value, is obtained. By comparing the first check value with the second check value, the accuracy of the written data can be determined. When the first check value is consistent with the second check value, it is confirmed that the target LCD screen is in a successful upgrade state, and according to the successful upgrade state, the upgrade completion is fed back to the target web page, eliminating the need for maintenance personnel to go to the site for upgrade operations, significantly reducing the labor and time costs, so as to improve the operation and maintenance efficiency of the upgrade task in distributed scenarios such as wind farms.

[0008] Optionally, receive the target information sent by the target LCD screen, specifically including: receiving the start upgrade request sent by the target web page; obtaining the target password from the start upgrade request, and determining whether the target password is consistent with the preset password, where the preset password is the password input by the target user; when the target password is consistent with the preset password, so that the target LCD screen can obtain the target file start address and the target byte count from the start upgrade request, the target byte count is the total byte count corresponding to the executable file body in the upgrade data packet, and the upgrade data packet includes target sub-data packets; receive the adaptation status sent by the target LCD screen, switch the target LCD screen to the passive mode according to the adaptation status, and output the adaptation status as the target information, where the adaptation status is the status determined when the target file start address is consistent with the preset file start address and the target byte count is less than or equal to the preset byte threshold, and the preset file start address and the preset byte threshold are parameters for the normal operation of the target LCD screen.

[0009] By adopting the above technical solution, first verify the consistency between the target password and the preset password to ensure that only authorized users can click the upgrade request, prevent unauthorized access and operations, and improve the security of the system; during the upgrade process, verify the consistency between the target file start address and the preset file start address, and whether the target byte count is less than or equal to the preset byte threshold, ensure that the upgrade data packet conforms to the operating parameters of the target LCD screen, avoid upgrade failure or device damage caused by parameter mismatch, after the target LCD screen is successfully adapted, switch it to the passive mode to ensure the smooth progress of the upgrade process, so that the measurement and control device can switch to the active mode according to the adaptation status.

[0010] Optionally, after receiving the adaptation status sent by the target LCD screen, the method further includes: determining the upgrade baud rate according to the adaptation status; sending the upgrade baud rate to the target LCD screen, so that the target LCD screen can be adjusted according to the upgrade baud rate, so that data transmission between the target LCD screen and the measurement and control device is carried out at the upgrade baud rate.

[0011] By adopting the above technical solution, dynamically adjust the upgrade baud rate according to the adaptation status to ensure that the data transmission rate between the target LCD screen and the measurement and control device matches, avoid transmission errors or delays caused by baud rate mismatch, maximize the data transmission rate by selecting an appropriate baud rate, reduce the transmission time, improve the overall system efficiency, optimize the baud rate, can shorten the upgrade time, reduce the user waiting time, and improve the user experience.

[0012] Optionally, in order for the target LCD screen to write the target sub-packet data into the internal memory, it specifically includes: obtaining a target address from the target LCD screen, where the target address is the address of the start address of the target file in the internal memory, and the internal memory is the storage unit corresponding to the target LCD screen; obtaining the byte executable file body from the target sub-packet data, and sending the executable file body to the target LCD screen, so that the target LCD screen writes the executable file body into the target address.

[0013] By adopting the above technical solution, the target address obtained from the target LCD screen is the actual address of the start address of the target file in the internal memory, ensuring that the upgrade data (executable file body) is written to the correct storage location, avoiding data overwrite or system anomalies caused by incorrect addresses. By directly extracting the executable file body from the target sub-packet data and accurately writing it to the target address, the integrity and consistency of the upgrade data are ensured, reducing upgrade failures caused by data transmission or storage errors. Automatically obtaining the target address and completing data writing reduces the steps of manual address configuration and reduces the upgrade risk caused by human errors.

[0014] Optionally, after obtaining the byte executable file body from the target sub-packet data and sending the executable file body to the target LCD screen so that the target LCD screen writes the executable file body into the target address, the method further includes: reading a first character from the internal memory; converting the byte executable file body into a second character; determining whether the first character is consistent with the second character; when the first character is consistent with the second character, determining that the internal memory is in a normal writing state and sending a normal writing message for the target web page; when the first character is not consistent with the second character, determining that the internal memory is in an abnormal writing state and triggering a stop upgrade operation according to the abnormal writing state.

[0015] By adopting the above technical solution, after writing the executable file body into the internal memory, immediately reading the first character and comparing it with the converted second character ensures the accuracy of the data writing process. Through character comparison, data corruption caused by memory failures, electromagnetic interference, or writing errors can be detected in a timely manner, avoiding system crashes caused by data errors. When it is detected that the first character is not consistent with the second character, immediately trigger a stop upgrade operation to prevent abnormal data from continuing to be written and avoid the system entering an irrecoverable state due to incorrect data. By verifying the writing state in real time, users can avoid upgrade failures caused by writing errors, reducing repeated operations and waiting times.

[0016] Optionally, before receiving the target information sent by the target LCD screen, the method further includes: receiving a first version number sent by a target web page; determining whether the first version number is consistent with a second version number, where the second version number is the version number corresponding to the current software program of the target LCD screen; when the first version number is inconsistent with the second version number, determining that the target LCD screen is in a state to be upgraded, and determining to receive a start upgrade request sent by the target web page according to the state to be upgraded.

[0017] By adopting the above technical solution, first receive the first version number sent by the target web page and compare it with the second version number corresponding to the current software program of the target LCD screen, so as to detect in real time whether the software versions are consistent. When the version numbers are consistent, the upgrade process can be skipped to avoid unnecessary upgrades to the LCD screen with the latest version, saving system resources. When the version numbers are inconsistent, it is determined that the target LCD screen is in a state to be upgraded and the start upgrade request is received, ensuring that the upgrade operation is only targeted at the LCD screen devices that need to be updated.

[0018] Optionally, after determining whether the first verification value is equal to the second verification value, the method further includes: when the first verification value is not equal to the second verification value, determining that the target LCD screen is in a state of upgrade failure, so as to perform a re-upgrade operation according to the state of upgrade failure.

[0019] By adopting the above technical solution, after the upgrade is completed, by comparing the first verification value with the second verification value, it can be immediately determined whether the upgrade is successful. When the first verification value is inconsistent with the second verification value, the upgrade failure can be immediately identified and a re-upgrade operation can be triggered, avoiding the system being in an abnormal state for a long time due to delayed error discovery. The verification value comparison mechanism can detect the tampering of the upgrade package caused by external attacks (such as data injection), ensuring that the upgrade data has not been maliciously modified.

[0020] In the second aspect of the present application, a software upgrade device for the LCD screen of a box-type substation measurement and control device is provided, which is used to execute the method of any one of the above. The device includes a receiving unit, a processing unit, and a display unit; the receiving unit receives the target information sent by the target LCD screen, switches the measurement and control device to the active mode according to the target information, and sends an upgrade approval message to the target web page; receives the target sub-packet, the target sub-packet is any one of the sub-packets, and the target sub-packet is the sub-packet sent to the measurement and control device according to the upgrade approval message. The target sub-packet includes the LCD device address, function code, register start address, number of data bytes, packet sequence number, and byte executable file body; the processing unit parses the target sub-packet to obtain the target sequence number; determines whether the target sequence number is consistent with the preset comparison sequence number, and the preset comparison sequence number is the sequence number corresponding to the total number of times the measurement and control device parses the target sub-packet within the preset time; when the target sequence number is consistent with the preset comparison sequence number, sends the target sub-packet to the target LCD screen so that the target LCD screen writes the target sub-packet into the internal memory; until receiving the end packet sent by the target web page, obtains the first check value from the end packet; determines whether the first check value is equal to the second check value, and the second check value is the byte check value calculated by the target LCD screen for all received target sub-packets; the display unit, when the first check value is equal to the second check value, determines that the target LCD screen is in the upgrade success state, so as to display the upgrade success state to the target web page.

[0021] Optionally, the receiving unit is used to receive the start upgrade request sent by the target web page; obtain the target password from the start upgrade request, and determine whether the target password is consistent with the preset password, and the preset password is the password input by the target user; the processing unit is used to, when the target password is consistent with the preset password, enable the target LCD screen to obtain the target file start address and the target number of bytes from the start upgrade request, and the target number of bytes is the total number of bytes corresponding to the executable file body in the upgrade packet, and the upgrade packet includes the target sub-packet; the receiving unit is used to receive the adaptation status sent by the target LCD screen, switch the target LCD screen to the passive mode according to the adaptation status, and output the adaptation status as the target information, and the adaptation status refers to the status determined when the target file start address is consistent with the preset file start address and the target number of bytes is less than or equal to the preset byte threshold, and the preset file start address and the preset byte threshold are the parameters for the normal operation of the target LCD screen.

[0022] Optionally, the processing unit is used to determine the upgrade baud rate according to the adaptation status; send the upgrade baud rate to the target LCD screen so that the target LCD screen adjusts according to the upgrade baud rate, so that data transmission between the target LCD screen and the measurement and control device is carried out at the upgrade baud rate.

[0023] Optionally, the receiving unit is configured to obtain a target address from the target LCD screen, where the target address is the address of the start address of the target file in the internal memory, and the internal memory is the storage unit corresponding to the target LCD screen; obtain the byte executable file body from the target sub-packet, and send the executable file body to the target LCD screen, so that the target LCD screen writes the executable file body into the target address.

[0024] Optionally, the receiving unit is configured to read a first character from the internal memory; the processing unit is configured to convert the byte executable file body into a second character; determine whether the first character is the same as the second character; when the first character is the same as the second character, determine that the internal memory is in a normal writing state, and send a normal writing message for the target web page; when the first character is not the same as the second character, determine that the internal memory is in an abnormal writing state, and trigger a stop upgrade operation according to the abnormal writing state.

[0025] Optionally, the receiving unit is configured to receive a first version number sent by the target web page; the processing unit is configured to determine whether the first version number is the same as the second version number, where the second version number is the version number corresponding to the current software program of the target LCD screen; when the first version number is not the same as the second version number, determine that the target LCD screen is in a state to be upgraded, and determine to receive a start upgrade request sent by the target web page according to the state to be upgraded.

[0026] Optionally, when the first check value is not equal to the second check value, the processing unit is configured to determine that the target LCD screen is in a state of upgrade failure, so as to perform a re-upgrade operation according to the state of upgrade failure.

[0027] In a third aspect of the present application, an electronic device is provided. The electronic device 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. The processor is used to execute the instructions stored in the memory, so that an electronic device executes the method according to any one of the above in the present application.

[0028] In a fourth aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of the above in 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. The measurement and control device automatically switches to the active mode by receiving the target information sent by the target LCD screen, and sends the upgrade approval information for the target web page. It determines to receive the target sub-packets according to the upgrade approval information, splits the upgrade file into multiple sub-packets, reducing the risk of single transmission failure. By matching the target sequence number with the preset comparison sequence number, it ensures the sequential reception of sub-packets, avoiding data loss or out-of-order caused by network fluctuations. Then it obtains the first check value from the end packet sent by the target web page, and obtains the byte check value of all sub-packets calculated by the target LCD screen, that is, the second check value. By comparing the first check value with the second check value, the accuracy of the written data can be determined. When the first check value is consistent with the second check value, it is confirmed that the target LCD screen is in the upgrade success state. According to the upgrade success state, it feeds back the upgrade completion to the target web page, eliminating the need for maintenance personnel to go to the site for upgrade operations, significantly reducing the labor and time costs, so as to improve the maintenance efficiency of upgrade tasks in distributed scenarios such as wind farms.

[0030] 2. First, verify the consistency between the target password and the preset password to ensure that only authorized users can click the upgrade request, preventing unauthorized access and operations and improving the security of the system. During the upgrade process, verify the consistency between the starting address of the target file and the preset file starting address, and whether the target byte count is less than or equal to the preset byte threshold, ensuring that the upgrade data packet conforms to the operating parameters of the target LCD screen, avoiding upgrade failure or device damage caused by parameter mismatch. After the target LCD screen is successfully adapted, it is switched to the passive mode to ensure the smooth progress of the upgrade process, so that the measurement and control device can switch to the active mode according to the adaptation status. Description of the Drawings

[0031] Figure 1 is the first flow diagram of a software upgrade method for the LCD screen of a box substation measurement and control device provided by an embodiment of the present application; Figure 2 is the second flow diagram of a software upgrade method for the LCD screen of a box substation measurement and control device provided by an embodiment of the present application; Figure 3 is the structural diagram of a software upgrade device for the LCD screen of a box substation measurement and control device provided by an embodiment of the present application; Figure 4 is the structural diagram of an electronic device disclosed by an embodiment of the present application.

[0032] Description of the reference numerals: 301, receiving unit; 302, processing unit; 303, display unit; 400, electronic device; 401, processor; 402, memory; 403, user interface; 404, network interface; 405, communication bus. Detailed Embodiments

[0033] To enable those skilled in the art 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 accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments.

[0034] In the description of the embodiments of this application, words such as "for example" or "for illustration" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "for example" or "for illustration" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "for example" or "for illustration" is intended to present relevant concepts in a specific manner.

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

[0036] In the field of power systems, especially in the operation and management of wind farms, as one of the core devices, the function reliability and operation and maintenance efficiency of the box transformer measurement and control device are directly related to the safe and stable operation of the power system. As the core interface for human-computer interaction, the LCD display screen undertakes key tasks such as monitoring the operation status of the device, parameter configuration, and displaying alarm information, and is an important window for operation and maintenance personnel to master the health status of the device.

[0037] Currently, the LCD software upgrade of the box transformer measurement and control device mainly relies on the traditional serial port upgrade mode. This mode is based on the physical layer serial communication protocol and requires a dedicated host computer device and a customized cable to establish a point-to-point connection. The specific operation process is as follows: The operation and maintenance personnel need to carry the host computer to the site, complete the device connection through the physical interface, and perform software package transmission, verification, and burning operations based on the serial communication protocol. In the actual large-scale wind farm environment, the number of box transformer measurement and control devices in the wind farm is huge and they are widely distributed in complex environments such as remote mountainous areas, high-altitude areas, or offshore platforms.

[0038] At the same time, the traditional serial port upgrade method lacks effective remote management means. Once a problem occurs during the upgrade process, maintenance personnel cannot obtain detailed fault information in a timely manner and can only troubleshoot problems through on-site inspection and debugging. This undoubtedly prolongs the fault handling time, affects the normal operation of the device, and brings potential risks to the stable operation of the power system. Since the traditional serial port upgrade mode requires maintenance personnel to perform on-site operations one by one, the labor cost and time cost are significantly increased, resulting in low maintenance efficiency of the upgrade task.

[0039] Therefore, how to solve the problem of low efficiency of the traditional serial port upgrade mode in complex scenarios. A software upgrade method for the LCD screen of a box transformer measurement and control device provided by an embodiment of the present application is applied to the measurement and control device. The measurement and control device is connected to the target LCD screen through a serial port, and the measurement and control device is connected to the target web page through a network. The target web page refers to the web page corresponding to the browser, and this browser is used to store the upgrade data packet of the current latest version of the LCD screen. The target web page establishes a data link with the measurement and control device using an optical fiber network or a network cable. The target LCD screen refers to the interaction interface of the box transformer measurement and control device, and the target LCD screen is connected to the measurement and control device through a serial port. At this time, the measurement and control device refers to the main control device in the box transformer measurement and control device, so as to use the measurement and control device to obtain the upgrade data packet from the target web page and forward the upgrade data packet to the target LCD screen, thereby realizing remote software upgrade of the LCD screen. Figure 1 It is the first process schematic diagram of a software upgrade method for the LCD screen of a box transformer measurement and control device provided by an embodiment of the present application. Refer to Figure 1 , this method includes the following steps S101-step S108.

[0040] S101: Receive the target information sent by the target LCD screen, switch the measurement and control device to the active mode according to the target information, and send an upgrade approval message to the target web page.

[0041] In the above S101, before the measurement and control device receives the target information sent by the target LCD screen, it is necessary to first judge the current software program version information of the target LCD screen. When the current software program version information of the target LCD screen is consistent with the software program version information stored in the target web page, it is confirmed that the current software program of the target LCD screen is the latest version and no upgrade operation is required. Therefore, the version information of the target LCD screen is continuously monitored subsequently. When the current software program version information of the target LCD screen is inconsistent with the software program version information stored in the target web page, the upgrade operation will be triggered, specifically including: receiving the first version number sent by the target web page; judging whether the first version number is consistent with the second version number, where the second version number is the version number corresponding to the current software program of the target LCD screen; when the first version number is inconsistent with the second version number, it is determined that the target LCD screen is in a state to be upgraded, and according to the state to be upgraded, it is determined to receive the start upgrade request sent by the target web page. Specifically, the target web page obtains the latest upgrade data packet, parses the latest upgrade data packet to obtain the first version number, and then sends the first version number to the measurement and control device so that the measurement and control device can receive the first version number sent from the target web page. Since a communication connection has been established between the measurement and control device and the target web page in advance, the measurement and control device can receive the first version number sent by the target web page. The version number is usually in string format. After receiving the first version number, the measurement and control device then obtains the second version number from the target LCD screen. At this time, the second version number refers to the version number of the software currently running on the target LCD screen, which is usually stored in the internal memory or EEPROM of the LCD screen. The target LCD screen can read the second version number from the version register and send the second version number to the measurement and control device. Then, the first version number and the second version number are compared as strings. According to the version number comparison result, it is judged whether the target LCD screen needs to be upgraded. If the first version number is inconsistent with the second version number, the target LCD screen is marked as in a state to be upgraded. In the state to be upgraded, the start upgrade request sent by the target web page is received to start the upgrade process. After determining that the target LCD screen is in a state to be upgraded, the user (the user refers to the operator) can initiate an upgrade request through the page in the master control room. According to the upgrade request sent by the user, the target web page can send a start upgrade request to the measurement and control device. As Figure 2 shown, first read the upgrade status from the measurement and control device. At this time, the upgrade status refers to the version in the current software data packet obtained by the measurement and control device from the target web page, and then compare the obtained version information with the version information corresponding to the target LCD screen. When the two are consistent, it is determined to send a negative response to the target LCD screen. At this time, the negative response means that there is no need to perform software upgrade on the LCD screen.

[0042] In addition, after the measurement and control device receives the start upgrade request sent by the target web page, it obtains the target password from the start upgrade request and determines whether the target password is consistent with the preset password. The preset password is the password input by the target user. When the target password is consistent with the preset password, the target LCD screen obtains the target file start address and the target byte count from the start upgrade request. The target byte count is the total byte count corresponding to the executable file body in the upgrade data packet, and the upgrade data packet includes target sub-packets. The measurement and control device receives the adaptation status sent by the target LCD screen, switches the target LCD screen to the passive mode according to the adaptation status, and outputs the adaptation status as the target information. The adaptation status refers to the status determined when the target file start address is consistent with the preset file start address and the target byte count is less than or equal to the preset byte threshold. The preset file start address and the preset byte threshold are parameters for the normal operation of the target LCD screen. Specifically, after the target web page sends a start upgrade request to the measurement and control device, the start upgrade request includes the password byte count, the password, the executable file start address, and the executable file byte count. At this time, the password is used to verify the identity of the user. Here, the user refers to the operator who sends the upgrade request through the target web page. Before the user sends an upgrade request through the target web page, the identity of the user needs to be verified. The user can verify whether the operator has the permission to send an upgrade request through the target web page by inputting a verification password, and the verification password can be set as a fixed password. The executable file start address is the start address of the upgrade file in the latest upgrade data packet, indicating the writing position of the file in the LCD screen memory. The executable file byte count is the total byte count of the upgrade file, indicating the amount of data to be transmitted. After the measurement and control device receives the start upgrade request sent by the target web page through the network, it extracts the target password from the received start upgrade request. At this time, the target password refers to the field corresponding to the password in the start upgrade request. The verification password input by the target user, that is, the preset password, has been obtained in advance, and then the target password is compared with the preset password. The preset password is the verification password input by the user and is used to verify whether the user has the permission to send an upgrade request. When the password is inconsistent with the preset password, it is determined that the user has no permission to send an upgrade request, that is, the user has no permission to perform the upgrade operation, so a user verification error message is returned. When the target password is consistent with the preset password, it is determined that the user has the permission to perform the upgrade operation, so the start upgrade request is continued to be processed. For example, the target password extracted from the start upgrade request is 123456. At this time, the preset password input by the user is obtained. When the preset password is 123456, the target password is compared with the preset password. When the two are consistent, it is determined that the user identity verification is passed, and the subsequent verification of the start upgrade request can be continued. After the measurement and control device determines that the target password verification is passed, it can wait for the target LCD screen to read the executable file information from the start upgrade request through the serial port. At this time, the executable file information refers to the executable file start address and the executable file byte count.After the target LCD screen reads the start address and byte count of the executable file, the start address of the executable file refers to the start address of the target file, and the byte count of the executable file refers to the target byte count. Then, determine the parameters that can operate normally according to the model of the target LCD screen. The parameters refer to the start address of all memories in the target LCD screen (preset file start address) and the maximum storable byte threshold (preset byte threshold). First, compare the target file start address with the preset file start address, and then compare the target byte count with the preset byte threshold. When the target file start address is inconsistent with the preset file start address, or the target byte count is greater than the preset byte threshold, it is confirmed that the target LCD screen cannot run the data packet in the start upgrade request, that is, the upgrade data packet does not match the target LCD screen. The target LCD screen needs to send information corresponding to the upgrade incompatibility to the measurement and control device for subsequent analysis of the updated upgrade data packet in the target web page. The measurement and control device verifies the password in the start upgrade request sent by the target web page. Only when the passwords are the same can subsequent operations be executed, which enhances the security of software upgrades and prevents illegal upgrade operations.

[0043] Only when the target file start address is consistent with the preset file start address and the target byte count is less than or equal to the preset byte threshold can it be confirmed that the start upgrade request is in an adapted state with the target LCD screen. The adapted state means that the current upgrade data packet is the updated data packet required by the target LCD screen. After determining to perform a software upgrade on the target LCD screen according to the adapted state, the target LCD screen switches to the passive mode according to the adapted state. At this time, the passive mode refers to the modbus server mode. The server means that the target LCD screen acts as a slave station, responds to the requests of the master station, and returns data. Before the software upgrade of the target LCD screen, the target LCD screen corresponds to the modbus client mode. Since the software upgrade of the target LCD screen is to be performed, the target LCD screen is first switched from the modbus client mode to the modbus server mode according to the adapted state, so that the measurement and control device receives the subsequent upgrade data packets sent by the target web page, and the measurement and control device forwards the received upgrade data packets to the target LCD screen for subsequent processing. Avoiding direct data transmission between the target web page and the target LCD screen may affect the normal operation of the target LCD screen due to transmission errors. As Figure 2 shown, receive the start upgrade request sent by the target web page, first verify the password in the start upgrade request. When the password verification is correct, then send the start address and byte count in the start upgrade request to the target LCD screen to determine whether the target LCD screen is adapted to the upgrade data packet.

[0044] Further, after determining that the software of the target LCD screen needs to be upgraded, the upgrade baud rate needs to be determined according to the adaptation status, and the transmission rate between the measurement and control device and the target LCD screen needs to be adjusted according to the upgrade baud rate, so that the communication rate between the measurement and control device and the target LCD screen must be consistent. If the measurement and control device sends data at a specific baud rate, the target LCD screen needs to receive it at the same baud rate, otherwise it will cause data loss or garbled characters, specifically including: determining the upgrade baud rate according to the adaptation status; sending the upgrade baud rate to the target LCD screen so that the target LCD screen can be adjusted according to the upgrade baud rate, so that the target LCD screen and the measurement and control device use the upgrade baud rate for data transmission. Specifically, the corresponding baud rate can be set to be selected in different states. The present application can divide the transmission state into an adaptation state and a non-adaptation state. The adaptation state refers to the state of upgrading transmission, and the non-adaptation state refers to other states that do not require upgrading transmission. In the adaptation state, the high-speed baud rate can be used by default, which is suitable for file transmission. In the non-adaptation state, the medium-speed baud rate can be used, which has better compatibility. If it is determined that the target LCD screen is in an adaptation state with the upgrade data packet in the start upgrade request, the upgrade baud rate is selected to be used so that the target LCD screen adjusts the original baud rate in the baud rate register according to the upgrade baud rate. The measurement and control device subsequently selects to use the upgrade baud rate to send data to the target LCD screen according to the adaptation state. Based on the above method, the dynamic configuration of the baud rate during the upgrade of the target LCD screen can be achieved to ensure the efficiency and stability of data transmission. After determining that the target LCD screen is adapted to the upgrade data packet in the start upgrade request, the target LCD screen sends the adaptation state as the target information to the measurement and control device. After the measurement and control device receives the target information sent by the target LCD screen, it determines that the software of the target LCD screen needs to be upgraded according to the target information, so the measurement and control device is switched to the active mode according to the target information. At this time, the active mode refers to the modbus client mode. The client refers to the measurement and control device as the master station, which actively initiates the request. For example, the measurement and control device, as a client, sends a display instruction to the target LCD screen. Because the measurement and control device corresponds to the modbus server mode before the software upgrade of the target LCD screen, the measurement and control device is switched from the modbus server mode to the modbus client mode according to the target information, so that the measurement and control device begins to prepare to receive the upgrade data packet sent from the target web page. The measurement and control device sends the upgrade approval information to the target web page through the network, that is, confirms the start of the upgrade information. For example, the measurement and control device returns "status: true" to the target web page. At the same time, the target LCD screen returns the upgrade baud rate according to the adaptability of the executable file and switches to the modbus server mode. The measurement and control device then switches to the modbus client mode accordingly. This device mode switching mechanism is closely integrated with the upgrade process, which is an important guarantee for reliable data transmission and orderly upgrade operations.

[0045] S102: Receive a target sub - data packet. The target sub - data packet is any one of the sub - data packets, and the target sub - data packet is sent by the measurement and control device according to the upgrade approval information.

[0046] In the above S102, after the target web page receives the upgrade approval information sent by the measurement and control device, the target web page first divides the upgrade file package into multiple sub - data packets. Each sub - data packet contains the following information: LCD device address, function code, register start address, number of data bytes, packet sequence number, and byte - executable file body. The function code represents the type of data packet. The number of data bytes refers to the number of valid data bytes contained in the current data packet. The packet sequence number refers to the sequence number of the current data packet, which is used to ensure that the data packets are received in order. The byte - executable file body refers to the actual upgrade data. The measurement and control device receives the target sub - data packet through the network and stores it in the buffer. The target sub - data packet is any one of the multiple sub - data packets.

[0047] S103: Analyze the target sub - data packet to obtain the target sequence number.

[0048] In the above S103, after the measurement and control device receives the target sub - data packet, the measurement and control device extracts the field corresponding to the packet sequence number from the received target sub - data packet. It can first analyze the target sub - data packet, then find the field corresponding to the packet sequence number in the analysis, and then output this field as the target sequence number. For example, the target sequence number is 0x01, which means the first sub - data packet at this time.

[0049] S104: Determine whether the target sequence number is consistent with the preset comparison sequence number.

[0050] In the above S104, a counter is maintained in the measurement and control device to record the total number of sub - data packets received within the preset time. The preset time refers to the time from the first time point to the current time point. The first time point refers to the time point corresponding to when the measurement and control device sends the upgrade approval information to the target web page, and the current time point refers to the time point corresponding to obtaining the target sequence number by analyzing the target sub - data packet. Then, the preset comparison sequence number is obtained from the counter. The preset comparison sequence number is a dynamic value, and the initial value of the dynamic value is 0. Within the preset time, when the measurement and control device receives a sub - data packet, it adds 1 to the initial value to get the current value. Subsequently, when the measurement and control device receives another sub - data packet, it adds 1 to the current value again, that is, the sequence number corresponding to the total number of sub - data packets received by the measurement and control device within the preset time after accumulation. For example, the preset time is 5 seconds. If the measurement and control device receives 1 target sub - data packet within 5 seconds, the number displayed on the counter is 1, and at this time, the preset comparison sequence number is determined to be 0x01 according to the displayed number.

[0051] S105: When the target sequence number is the same as the preset comparison sequence number, send the target sub-data packet to the target LCD screen so that the target LCD screen writes the target sub-data packet into the internal memory.

[0052] In the above S105, the measurement and control device compares the currently received target sequence number with the preset comparison sequence number. When the target sequence number is different from the preset comparison sequence number, it is determined that the target sub-data packet is sent incorrectly, and the target sub-data packet is discarded so that the measurement and control device sends an instruction to resend the upgrade data packet to the target web page. When the target sequence number is the same as the preset comparison sequence number, it is determined that the target sub-data packet is sent correctly, and the target sub-data packet is sent to the target LCD screen through the serial port. After receiving the target sub-data packet, the target LCD screen writes the target sub-data packet into the internal memory, such as the internal Flash. For example, when the target sequence number is 0x01 and the preset comparison sequence number is 0x01, when it is determined that the target sequence number is the same as the preset comparison sequence number at this time, the target sub-data packet is sent to the target LCD screen.

[0053] In addition, to enable the target LCD screen to write the target sub-data packet into the internal memory, it specifically includes: obtaining the target address from the target LCD screen, where the target address is the address of the start address of the target file in the internal memory, and the internal memory is the storage unit corresponding to the target LCD screen; obtaining the byte executable file body from the target sub-data packet, and sending the executable file body to the target LCD screen so that the target LCD screen writes the executable file body into the target address. Specifically, first obtain the start address of the target file from the start upgrade request. At this time, the start address of the target file refers to the address where the target sub-data packet is written in the internal memory of the target LCD screen. Query the target address of the internal memory in the target LCD screen according to the start address of the target file and return the address value. The measurement and control device analyzes the address value and extracts the target address. Then obtain the byte executable file body from the target sub-data packet, that is, the measurement and control device extracts the "executable file body" field. Transmit the extracted executable file body to the target LCD screen. The target LCD screen receives the data write command through the serial port, analyzes the address, length, and data body. According to the address and length, write the data into the internal memory. If the executable file is large, it can be sent in chunks to avoid excessive single transmission of data. If it is sent in chunks, it can be written into the target address corresponding to the internal memory of the target LCD screen in the order of the executable file.

[0054] Further, when writing the corresponding executable file body in the target sub-packet into the internal memory, it is also necessary to verify the writing status of the internal memory of the target LCD screen in real time to ensure the reliability of data transmission. Specifically, it includes: reading the first character from the internal memory; converting the byte executable file body into the second character; determining whether the first character is consistent with the second character; when the first character is consistent with the second character, determining that the internal memory is in a normal writing state and sending a normal writing message to the target web page; when the first character is inconsistent with the second character, determining that the internal memory is in an abnormal writing state and triggering a stop upgrade operation according to the abnormal writing state. Specifically, first obtain the target address when previously writing the executable file body. The measurement and control device sends a read command to the target LCD screen through the serial port. The target LCD screen reads data from the internal memory and returns the read value. The measurement and control device analyzes the returned read value to obtain the data value and uses the data value as the first character. The measurement and control device extracts the executable file body from the target sub-packet and converts the executable file body into the second character. Then compare whether the first character is consistent with the second character. When the first character value is consistent with the second character value, it is determined that the internal memory is in a normal writing state, and the measurement and control device sends a normal writing message to the target web page so that the target web page can continue to send other sub-packets to the measurement and control device according to the normal writing message. When the first character is inconsistent with the second character, it is determined that the internal memory is in an abnormal writing state. The abnormal writing state means that the internal memory cannot normally write the target sub-data, so a stop upgrade operation is triggered, that is, stop sending subsequent data and send a stop subsequent data message to the target web page. By verifying the data written in the internal memory, the upgrade operation can be stopped in time to prevent the spread of errors and cause the upgrade to fail.

[0055] S106: Until receiving the end packet sent by the target web page, obtain the first check value from the end packet.

[0056] In the above S106, referring to the above processing method for the target sub-packet, process other sub-packets until all sub-packets are sent, and write the executable file bodies corresponding to all sub-packets into the internal memory. The target web page sends an end packet, and the end packet includes the LCD device address, function code, register start address, number of data bytes, and byte check value. Obtain the first check value from the end packet. At this time, the first check value refers to the check value calculated by bytes for the executable files in all the sent sub-packets, and the check value refers to the checksum. As Figure 2 shown.

[0057] S107: Determine whether the first check value is equal to the second check value.

[0058] In the above S107, after receiving all sub - data packets, the target LCD screen calculates the checksum (such as CRC32) of all executable files to obtain a second check value. After receiving the first check value, the measurement and control device obtains the second check value from the target LCD screen and compares the second check value with the first check value.

[0059] S108: When the first check value is equal to the second check value, it is determined that the target LCD screen is in the successful upgrade state, so as to display the successful upgrade state to the target web page.

[0060] In the above S108, when the first check value is equal to the second check value, it is determined that the target LCD screen is in the successful upgrade state. The successful upgrade state means that the target LCD screen has correctly written all executable files into the internal memory. The measurement and control device sends a successful upgrade message to the target web page through the network. After receiving the successful upgrade message, the target web page updates the user interface and displays "Upgrade successful". Thus, the program upgrade process of the target LCD screen ends. After determining that the software upgrade process of the target LCD screen is over, the measurement and control device needs to be switched from the active mode to the passive mode, and then the target LCD screen is switched from the passive mode to the active mode. The firmware upgrade of the LCD screen is realized through serial port and network communication, ensuring the integrity and correctness of data transmission. As Figure 2 shown, when the first check value is consistent with the second check value, it is determined that the target LCD screen is successfully upgraded, and the successful upgrade is forwarded to the target web page so as to display the successful upgrade information on the target web page for users to understand the upgrade progress of the target LCD screen.

[0061] In addition, when the first check value is not equal to the second check value, it is determined that the target LCD screen is in the failed upgrade state, so as to re - perform the upgrade operation according to the failed upgrade state. Specifically, the first check value and the second check value are compared as strings. When the first check value is not consistent with the second check value, the target LCD screen is marked as the failed upgrade state, and the upgrade operation is re - performed according to the actual failure state. That is, the upgrade file is re - obtained from the target web page, and the subsequent processing is carried out in sequence according to the above upgrade steps. Subsequently, after all executable files are written, the check value of the target LCD screen is recalculated and compared with the first check value. Through the above method, the detection and automatic re - upgrade of the failed upgrade state of the target LCD screen can be realized, ensuring the reliability of device upgrade. At the end of the upgrade stage, first calculate the data of the executable files received in the target LCD screen to obtain a second check value, and then compare it with the first check value sent by the target web page to judge whether the executable files are transmitted completely and correctly. This data integrity check mechanism can ensure the accuracy of the upgrade software and avoid upgrade failure caused by data transmission errors.

[0062] This application connects the target web page and the measurement and control device through an optical fiber network or a network cable, and connects the measurement and control device to the serial port of the target LCD screen, thereby constructing a communication path from the target web page to the measurement and control device and then from the measurement and control device to the target LCD screen. The operator only needs to send an upgrade request on the web page of the browser to remotely upgrade the LCD screens of the substation measurement and control devices distributed in different locations. This greatly reduces the workload of on-site manual operations. Especially in application scenarios such as large wind farms, it avoids maintenance personnel from frequently traveling back and forth to each measurement and control device for upgrade operations, significantly improving the convenience of upgrades.

[0063] The embodiment of this application also provides a software upgrade device for the LCD screen of a substation measurement and control device. Figure 3 It is a schematic structural diagram of a software upgrade device for the LCD screen of a substation measurement and control device provided by the embodiment of this application. Refer to Figure 3 and is used to execute the method of any one of the above. The device includes a receiving unit 301, a processing unit 302, and a display unit 303.

[0064] The receiving unit 301 receives the target information sent by the target LCD screen, switches the measurement and control device to the active mode according to the target information, and sends an upgrade approval message to the target web page; receives the target sub-packet. The target sub-packet is any one sub-packet, and the target sub-packet is the sub-packet sent to the measurement and control device according to the upgrade approval message. The target sub-packet includes the LCD device address, function code, register start address, number of data bytes, packet sequence number, and byte executable file text.

[0065] The processing unit 302 parses the target sub-packet to obtain the target sequence number; determines whether the target sequence number is consistent with the preset comparison sequence number. The preset comparison sequence number is the sequence number corresponding to the total number of times the measurement and control device parses the target sub-packet within the preset time; when the target sequence number is consistent with the preset comparison sequence number, the target sub-packet is sent to the target LCD screen so that the target LCD screen writes the target sub-packet into the internal memory; until the end packet sent by the target web page is received, the first check value is obtained from the end packet; determines whether the first check value is equal to the second check value. The second check value is the byte check value calculated by the target LCD screen for all received target sub-packets.

[0066] The display unit 303, when the first check value is equal to the second check value, determines that the target LCD screen is in the upgrade success state, so as to display the upgrade success state to the target web page.

[0067] In a possible implementation, the receiving unit 301 is configured to receive a start upgrade request sent by a target web page; obtain a target password from the start upgrade request, and determine whether the target password is consistent with a preset password, where the preset password is the password input by the target user; the processing unit 302 is configured to, when the target password is consistent with the preset password, enable the target LCD screen to obtain a target file start address and a target byte count from the start upgrade request, where the target byte count is the total byte count corresponding to the executable file body in the upgrade data packet, and the upgrade data packet includes target sub-packets; the receiving unit 301 is configured to receive an adaptation status sent by the target LCD screen, switch the target LCD screen to the passive mode according to the adaptation status, and output the adaptation status as target information, where the adaptation status is the status determined when the target file start address is consistent with a preset file start address and the target byte count is less than or equal to a preset byte threshold, and the preset file start address and the preset byte threshold are parameters for the normal operation of the target LCD screen.

[0068] In a possible implementation, the processing unit 302 is configured to determine an upgrade baud rate according to the adaptation status; send the upgrade baud rate to the target LCD screen, so that the target LCD screen adjusts according to the upgrade baud rate, so that data transmission between the target LCD screen and the measurement and control device is performed at the upgrade baud rate.

[0069] In a possible implementation, the receiving unit 301 is configured to obtain a target address from the target LCD screen, where the target address is the address of the target file start address in the internal memory, and the internal memory is the storage unit corresponding to the target LCD screen; obtain the byte executable file body from the target sub-packet, and send the executable file body to the target LCD screen, so that the target LCD screen writes the executable file body into the target address.

[0070] In a possible implementation, the receiving unit 301 is configured to read a first character from the internal memory; the processing unit 302 is configured to convert the byte executable file body into a second character; determine whether the first character is consistent with the second character; when the first character is consistent with the second character, determine that the internal memory is in a normal writing state, and send a normal writing message to the target web page; when the first character is inconsistent with the second character, determine that the internal memory is in an abnormal writing state, and trigger a stop upgrade operation according to the abnormal writing state.

[0071] In a possible implementation, the receiving unit 301 is configured to read a first character from the internal memory; the processing unit 302 is configured to convert the byte executable file body into a second character; determine whether the first character is the same as the second character; when the first character is the same as the second character, determine that the internal memory is in a normal writing state, and send a normal writing message for the target web page; when the first character is not the same as the second character, determine that the internal memory is in an abnormal writing state, and trigger a stop upgrade operation according to the abnormal writing state.

[0072] In a possible implementation, when the first check value is not equal to the second check value, the processing unit 302 is configured to determine that the target LCD screen is in a failed upgrade state, so as to perform a re-upgrade operation according to the failed upgrade state.

[0073] It should be noted that: when the device provided in the above embodiment realizes its functions, only the above division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, 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 embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.

[0074] This application also discloses an electronic device. Refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, a memory 402, and at least one communication bus 405.

[0075] Among them, the communication bus 405 is used to realize the connection and communication between these components.

[0076] Among them, the user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may further include a standard wired interface and a wireless interface.

[0077] Among them, the network interface 404 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0078] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and circuits to connect various parts within the entire server. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 402, and by invoking data stored in the memory 402, it performs various functions of the server and processes data. Optionally, the processor 401 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 401 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application requests, etc.; the GPU is responsible for the rendering and drawing of the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 401 and may be implemented separately by a single chip.

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

[0080] As Figure 4 shown, the memory 402, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for software upgrade of the LCD screen of the substation transformer monitoring device.

[0081] In Figure 4In the electronic device 400 shown, the user interface 403 is mainly used to provide an interface for the user to input and obtain the data input by the user; and the processor 401 can be used to call the application program stored in the memory 402 for software upgrade of the LCD screen of the substation measurement and control device. When executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments.

[0082] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0083] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0084] In the several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection to each other can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.

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

[0086] In addition, in each embodiment of this application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0087] When 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned memory includes various media such as USB flash drives, mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0088] The foregoing are only exemplary embodiments of the present disclosure, and the scope of the present disclosure cannot be limited thereby. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. Those skilled in the art will readily think of other implementation manners of the present disclosure after considering the specification and the practice of the present disclosure. The present application aims to cover any variations, uses, or adaptive changes of the present disclosure, and these variations, uses, or adaptive changes follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not described in the present disclosure.

Claims

1. A software upgrade method for the LCD screen of a box-type substation measurement and control device, characterized in that, Applied to a measurement and control device, the measurement and control device is connected to a target LCD screen through a serial port, and the measurement and control device is connected to a target web page through a network. The method includes: Receiving target information sent by the target LCD screen, switching the measurement and control device to an active mode according to the target information, and sending an upgrade approval message to the target web page; Receiving a target sub-packet, where the target sub-packet is any one of the sub-packets, and the target sub-packet is a sub-packet sent to the measurement and control device according to the upgrade approval message. The target sub-packet includes an LCD device address, a function code, a register start address, the number of data bytes, a packet sequence number, and the byte executable file body; Parsing the target sub-packet to obtain a target sequence number; Determining whether the target sequence number is the same as a preset comparison sequence number, where the preset comparison sequence number is the sequence number corresponding to the total number of times the measurement and control device parses the target sub-packet within a preset time; When the target sequence number is the same as the preset comparison sequence number, sending the target sub-packet to the target LCD screen so that the target LCD screen writes the target sub-packet into an internal memory; Until receiving an end packet sent by the target web page, obtaining a first check value from the end packet; Determining whether the first check value is equal to a second check value, where the second check value is a byte check value calculated by the target LCD screen for all received target sub-packets; When the first check value is equal to the second check value, determining that the target LCD screen is in a successful upgrade state, so as to display the successful upgrade state to the target web page.

2. The method according to claim 1, wherein The receiving the target information sent by the target LCD screen specifically includes: Receiving a start upgrade request sent by the target web page; Obtaining a target password from the start upgrade request, and determining whether the target password is the same as a preset password, where the preset password is a password input by a target user; When the target password is the same as the preset password, enabling the target LCD screen to obtain a target file start address and a target number of bytes from the start upgrade request, where the target number of bytes is the total number of bytes corresponding to the executable file body in the upgrade packet, and the upgrade packet includes the target sub-packet; Receiving an adaptation status sent by the target LCD screen, switching the target LCD screen to a passive mode according to the adaptation status, and outputting the adaptation status as the target information. The adaptation status is a status determined when the target file start address is the same as a preset file start address and the target number of bytes is less than or equal to a preset byte threshold, and the preset file start address and the preset byte threshold are parameters for the normal operation of the target LCD screen.

3. The method according to claim 2, wherein After receiving the adaptation status sent by the target LCD screen, the method further includes: Determining an upgrade baud rate according to the adaptation status; Send the upgraded baud rate to the target LCD screen so that the target LCD screen adjusts according to the upgraded baud rate, enabling data transmission between the target LCD screen and the measurement and control device using the upgraded baud rate.

4. The method according to claim 2, wherein The step of enabling the target LCD screen to write the target sub-packet into the internal memory specifically includes: Obtain a target address from the target LCD screen. The target address is the address of the start address of the target file in the internal memory, and the internal memory is the storage unit corresponding to the target LCD screen; Obtain the byte executable file body from the target sub-packet and send the executable file body to the target LCD screen so that the target LCD screen writes the executable file body into the target address.

5. The method according to claim 4, wherein After obtaining the byte executable file body from the target sub-packet and sending the executable file body to the target LCD screen so that the target LCD screen writes the executable file body into the target address, the method further includes: Read a first character from the internal memory; Convert the byte executable file body into a second character; Determine whether the first character is the same as the second character; When the first character is the same as the second character, determine that the internal memory is in a normal writing state and send a normal writing information for the target web page; When the first character is not the same as the second character, determine that the internal memory is in an abnormal writing state and trigger a stop upgrade operation according to the abnormal writing state.

6. The method according to claim 2, wherein Before receiving the target information sent by the target LCD screen, the method further includes: Receive a first version number sent by the target web page; Determine whether the first version number is the same as a second version number, where the second version number is the version number corresponding to the current software program of the target LCD screen; When the first version number is not the same as the second version number, determine that the target LCD screen is in a state to be upgraded and determine to receive the start upgrade request sent by the target web page according to the state to be upgraded.

7. The method according to claim 1, characterized in that After determining whether the first check value is equal to the second check value, the method further includes: When the first check value is not equal to the second check value, determine that the target LCD screen is in a state of upgrade failure, so as to perform an upgrade operation again according to the state of upgrade failure.

8. A software upgrade device for the LCD screen of a box-type substation measurement and control device, which is used to execute the method described in any one of claims 1 to 7, and is characterized in that, The device includes a receiving unit (301), a processing unit (302), and a display unit (303); The receiving unit (301) receives the target information sent by the target LCD screen, switches the measurement and control device to the active mode according to the target information, and sends an upgrade approval information to the target web page; Receive a target sub-packet, where the target sub-packet is any one of the sub-packets, and the target sub-packet is the sub-packet sent by the measurement and control device according to the upgrade approval information. The target sub-packet includes the LCD device address, function code, register start address, number of data bytes, packet sequence number, and byte executable file body; The processing unit (302) parses the target sub-packet to obtain a target sequence number; determines whether the target sequence number is consistent with a preset comparison sequence number, where the preset comparison sequence number is the sequence number corresponding to the total number of times the measurement and control device parses the target sub-packet within a preset time; when the target sequence number is consistent with the preset comparison sequence number, sends the target sub-packet to the target LCD screen so that the target LCD screen writes the target sub-packet into the internal memory; Until receiving an end packet sent by the target web page, obtain a first check value from the end packet; determine whether the first check value is equal to a second check value, where the second check value is the byte check value calculated by the target LCD screen for all received target sub-packets; The display unit (303), when the first check value is equal to the second check value, determines that the target LCD screen is in a successful upgrade state, so as to display the successful upgrade state to the target web page.

9. An electronic device, characterized in that, It includes a processor (401), a memory (402), a user interface (403), and a network interface (404). The memory (402) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (402) so that the electronic device (400) executes the method according to any one of claims 1-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-7 is executed.

Citation Information

Patent Citations

  • Display apparatus, upgrading apparatus, control method thereof and display system

    CN103227960A

  • Controller remote upgrading method and device, computer equipment and readable storage medium

    CN115309418A

  • Sensor terminal node upgrading method and system in Modbus TCP network scene

    CN115766444A

  • Firmware upgrading method and device for LED illuminating lamp

    CN117215605A

  • Remote upgrading method and device of end equipment, equipment and storage medium

    CN117519753A