Method for managing data in electrical equipment, electrical equipment and storage medium

By comparing the data length in the storage device with the data length to be read, and determining the operating parameters based on the read data, the error problem of electrical equipment analyzing data and accessing the storage device after the software is upgraded, improving the stability and iterability of the equipment.

CN119960660APending Publication Date: 2025-05-09SCHNEIDER ELECTRIC IND SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311484624.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

After the software upgrade of traditional electrical equipment, data updates in the storage device will lead to inability to correctly parse data and access errors in the storage device, resulting in unstable operation of the equipment.

Method used

By obtaining the data length from a predetermined address of the storage device and comparing it with the data length to be read, data is read from the storage device, and operating parameters of the electrical equipment are determined based on the read data.

Benefits of technology

Ensure that electrical equipment can correctly parse updated data after upgrading and access storage devices accurately, thereby improving the iterability and stability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960660A_ABST
    Figure CN119960660A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for managing data in electrical equipment, the electrical equipment and a computer readable storage medium. The method includes: acquiring a first length from a predetermined address in a storage device of the electrical apparatus, the first length indicating an amount of data stored in the storage device; comparing the first length with a second length, the second length indicating an amount of data to be read for operation of the electrical device; reading data from the storage device based on a comparison result of the first length and the second length; and determining operating parameters related to the electrical equipment based on the read data. Therefore, the data in the electrical equipment can be effectively updated so as to improve the iterability and the stability of the electrical equipment, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of electrical devices, and more particularly, to a method of managing data in an electrical device, an electrical device, and a computer-readable storage medium. Background Art

[0002] With the advancement of technology and changes in business needs, electrical equipment usually needs to upgrade software to improve its operating performance, support new functions and improvements, enhance data security, etc. However, after upgrading the software of traditional electrical equipment, since the data in the storage device will be updated (such as adding or deleting), the upgraded software may not be able to correctly parse the data and may cause storage device access errors. Summary of the invention

[0003] Embodiments of the present disclosure provide a method for managing data in an electrical device, the electrical device, and a computer-readable storage medium.

[0004] In a first aspect of the present disclosure, a method for managing data in an electrical device is provided, comprising: obtaining a first length from a predetermined address in a storage device of the electrical device, the first length indicating the amount of data stored in the storage device; comparing the first length with a second length, the second length indicating the amount of data to be read for operation of the electrical device; reading data from the storage device based on a comparison result of the first length and the second length; and determining operating parameters related to the electrical device based on the read data.

[0005] In an embodiment according to the present disclosure, the processing unit compares the first length obtained from the predetermined address in the storage device with the second length of the data to be read, and reads the data from the storage device based on the comparison result of the first length and the second length. And based on the read data, the operating parameters related to the electrical device are determined. Therefore, after the software of the electrical device is upgraded, the updated data can be correctly parsed and applied to the upgraded electrical device, and the storage device can be accurately accessed, thereby improving the iterativeness and stability of the electrical device.

[0006] In some embodiments, reading data from a storage device includes: in response to the second length being equal to the first length, reading data of the first length or the second length from the storage device, and wherein determining an operating parameter related to the electrical device includes: determining the read data as a parameter value of the operating parameter.

[0007] In some embodiments, reading data from a storage device includes: in response to the second length being greater than the first length, reading data of a first length from the storage device, and wherein determining an operating parameter related to the electrical device includes: determining a parameter value of the operating parameter based on the read data and a predetermined value of the operating parameter.

[0008] In some embodiments, determining the parameter value of the operating parameter based on the read data and the predetermined value of the operating parameter includes: generating a temporary variable having a second length based on the predetermined value of the operating parameter; updating the data of the first length in the temporary variable based on the read data; and determining the parameter value of the operating parameter based on the updated temporary variable.

[0009] In some embodiments, the method further includes: writing the updated temporary variable to a storage area having a second length in the storage device; and updating the value of the first length stored at the predetermined address to a value of the second length.

[0010] In some embodiments, reading data from the storage device includes: in response to the second length being less than the first length, reading data of a second length from the storage device, and wherein determining an operating parameter related to the electrical device includes: determining the read data as a parameter value of the operating parameter.

[0011] In some embodiments, the method further includes: updating the value of the first length stored at the predetermined address to the value of the second length.

[0012] In some embodiments, reading data from the storage device includes: reading consecutively stored data starting from an address after a predetermined address.

[0013] In a second aspect of the present disclosure, an electrical device is provided, comprising: a storage device; and a processing unit coupled to the storage device, the processing unit being configured to execute the method of the first aspect.

[0014] In a third aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processing unit to implement the method of the first aspect.

[0015] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0017] Figure 1 A schematic diagram showing an example data storage structure in a storage device of a conventional electrical device;

[0018] Figure 2A flowchart illustrating an example process for managing data in a storage device of an electrical device according to some embodiments of the present disclosure;

[0019] Figure 3 A schematic diagram showing an example data storage structure in a storage device of an electrical device according to some embodiments of the present disclosure;

[0020] Figure 4 A schematic diagram showing an example of data to be read from a storage device according to some embodiments of the present disclosure;

[0021] Figure 5 A schematic diagram showing generating a temporary variable having a second length based on a predetermined value of an operating parameter according to some embodiments of the present disclosure is shown;

[0022] Figure 6 A schematic diagram showing another example of data to be read in a storage device according to some embodiments of the present disclosure; and

[0023] Figure 7 A schematic structural block diagram of an electrical device according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0026] The term "in response to" indicates that a corresponding event occurs or a condition is satisfied. In this article, unless explicitly stated, executing a step "in response to A" does not mean executing the step immediately after "A", but may include one or more intermediate steps.

[0027] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0028] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0030] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0031] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0032] Figure 1 FIG. 1 is a schematic diagram showing an exemplary data storage structure 100 in a storage device of a conventional electrical device. Figure 1 , the storage device may store data 1, data 2, data 3, ..., data n-1, data n, and newly added data A (hereinafter referred to as data individually or collectively), where n may be any positive integer greater than or equal to 1, for example, 2, 3, 4, 5, 10, etc. It should be noted that when the software of the electrical equipment is upgraded, if the new software needs to add data A, data A is generally added at the end of the original data structure, and is generally not inserted in the middle of the original data structure. Otherwise, it will affect the storage of the data after the predetermined address of the newly added data.

[0033] Furthermore, if Figure 1 As shown, the value at the storage location of the unwritten data may be the inherent value of the storage device, for example Figure 1 Such an inherent value (such as 0xFF) is a special value and is generally not used as valid data of a certain operating parameter of the electrical device.

[0034] During the initial operation of the electrical device, the processing unit in the electrical device sets appropriate default values ​​for each operating parameter, and the electrical device operates with the default values. The default values ​​can enable the electrical device to have normal output functions before configuration, until the user modifies the value of the data and saves it locally, that is, in the storage device.

[0035] Furthermore, the chip code of the electrical device defines various data (i.e., structure variables), and each data has its storage size and storage location specified. The chip will save all data in a fixed address of the storage device in the order of definition. Each time the chip wants to read or rewrite a certain data, it will start reading or rewriting the data from the fixed address.

[0036] In view of the data storage scheme in the electrical equipment described above, if the user upgrades the old software to the new software, the amount of data defined in the new software may change. When the new software is running, data will be read from the storage device at the length indicated in the new software. Assume that data is added to the new software, for example, the data to be read contains newly added data A. In this case, according to the above-mentioned traditional scheme, the value of the newly added data A read by the new software is 0xFF. However, 0xFF is a special value and is not applicable to the function corresponding to data A, or exceeds the valid range of data A. In other words, a value of type 0xFF is an illegal value or an abnormal value for data A, which will cause the electrical equipment to exhibit unknown abnormal behavior when the new software applies the value, or even a serious crash.

[0037] In order to solve or at least partially solve the above-mentioned problems or other potential problems of electrical equipment of traditional solutions, an embodiment of the present disclosure provides a solution for managing data in electrical equipment. In the electrical equipment, before reading data from a storage device, a first length is obtained from a predetermined address in the storage device, which indicates the amount of data stored in the storage device, and a second length of data to be read for the operation of the electrical equipment is determined. Based on the comparison result of the first length and the second length, data is read from the storage device, and operating parameters related to the electrical equipment are determined based on the read data. In this way, it is possible to avoid unknown abnormal behavior or even a crash when applying the value of data after the electrical equipment is upgraded. Thereby, the reliability of the electrical equipment can be improved.

[0038] Some example embodiments of the present disclosure will be described below with reference to the accompanying drawings. Please note that in some descriptions of the embodiments, certain specific values ​​may be involved in order to better help readers understand. These values ​​are exemplary and may vary according to specific application scenarios, and do not limit the scope of the present disclosure in any way.

[0039] Figure 21 is a flowchart showing an example process 200 for managing data in a storage device of an electrical device according to some embodiments of the present disclosure. For example, the process 200 may be implemented at the electrical device, for example, by a processing unit of the electrical device (such as, for example, Figure 7 The processing unit described above is implemented.

[0040] At block 210 , a first length is obtained from a predetermined address in a storage device of an electrical device, the first length indicating an amount of data stored in the storage device.

[0041] Figure 3 A schematic diagram of an example data storage structure 300 in a storage device of an electrical device according to some embodiments of the present disclosure is shown. Exemplarily, data P is stored at a predetermined address 310 in the storage device. The value of the data P may indicate a first length. Figure 3 In the example of , the data of the first length may include data 1, data 2, data 3 . . . data n-1, data n. It should be noted that the predetermined address 310 of data P is located before the address of data 1.

[0042] Before reading the data in the storage device, the processing unit may also obtain a second length, which indicates the amount of data to be read. For example, the processing unit may calculate the total length of data defined in the currently running software.

[0043] Continue to refer Figure 2 In block 220, the first length and the second length are compared. Then, based on the comparison result of the first length and the second length, data is read from the storage device, and based on the read data, operating parameters related to the electrical device are determined. The comparison result may be in three cases: the first length is equal to the second length, the first length is greater than the second length, and the first length is less than the second length. For the three comparison results, the processing unit will perform corresponding actions and determine the relevant operating parameters. Now continue to refer to Figure 2 Example embodiments for different comparison results are described.

[0044] If it is determined at block 220 that the first length is equal to the second length, process 200 proceeds to block 230. At block 230, data of the first length or the second length is read from the storage device. Figure 3 , data 1, data 2, data 3…data n-1, data n can be read from the storage device.

[0045] It can be understood that the case where the first length is equal to the second length may be that the software of the electrical device does not delete or add data before and after the upgrade. This case may also be that the electrical device does not upgrade the software, but only restarts. This case may also be that the software of the electrical device directly reads the data stored in the storage device with the second length or the first length as the running parameters of the software, which is not specifically limited in the embodiments of the present disclosure.

[0046] In block 231, the read data is determined as the parameter value of the operating parameter. Figure 3 In the example of, the read data 1, data 2, data 3, ..., data n-1, data n can be used as the operating parameters of the electrical device. In this embodiment, since the first length is equal to the second length, the data stored at the predetermined address in the storage device may not be updated.

[0047] If it is determined at block 220 that the second length is greater than the first length, process 200 proceeds to block 250. At block 250, data of the first length is read from the storage device. Figure 4 An example data structure 400 to be read in a storage device is described. Data 1, data 2, data 3, ..., data n-1, data n are located after a predetermined address and correspond to a first length. Figure 4 As shown, the address of the newly added data A is located after the data n. It is understandable that the second length is greater than the first length when the electrical device software is upgraded, the software is run for the first time after the upgrade, and the upgraded software has newly added data.

[0048] In block 251, a parameter value of an operating parameter is determined based on the read data and a predetermined value of the operating parameter. The read data is data of a first length in a storage device. The predetermined value of the operating parameter may be, for example, a default value of the operating parameter.

[0049] In some embodiments, the parameter value of the operating parameter may be determined by the process shown in block 251. Figure 2 In block 252, a temporary variable having a second length is generated based on a predetermined value of the operating parameter. For example, a default value of the operating parameter may be assigned to the temporary variable. Figure 5 A data structure 500 of an example temporary variable is described. Exemplarily, a temporary variable 500 of a second length is shown. In this case, the temporary variable 500 has a predetermined value of an operating parameter, such as a default value. For example, the temporary variable 500 has a predetermined value 1, a predetermined value 2, a predetermined value 3, ..., a predetermined value n-1, a predetermined value n, and a predetermined value A.

[0050] In block 253, the data of the first length in the temporary variable 500 is updated based on the read data. Thus, the updated temporary variable 500 can be obtained. Figure 5 For example, the read data of the first length is assigned to the data of the first length in the temporary variable 500. For example, the read data 1, data 2, data 3, ..., data n-1, data n replace the predetermined value 1, predetermined value 2, predetermined value 3, ..., predetermined value n-1, predetermined value n in the temporary variable 500, thereby obtaining the updated temporary variable 500.

[0051] At block 254, a parameter value of the operating parameter is determined based on the updated temporary variable 500. In some embodiments, the parameter value of the operating parameter of the electrical device may be determined based on data 1, data 2, data 3, ..., data n-1, data n, and a predetermined value A.

[0052] In block 255, the updated temporary variable 500 is written to a storage area having a second length in the storage device. For example, data 1, data 2, data 3, ..., data n-1, data n, and a predetermined value A in the temporary variable 500 are written to a storage area having a second length in the storage device. For example, data 1, data 2, data 3, ..., data n-1, data n, and a predetermined value A in the temporary variable 500 may be written to a storage location after a predetermined address. In some embodiments, after the data in the temporary variable 500 is written to the storage device, data of the second length may be read from the storage device as a parameter value of the operating parameter.

[0053] In block 256, the value of the first length stored at the predetermined address is updated to the value of the second length. For example, the stored data P is modified to the value of the second length.

[0054] In the example embodiment described above, the parameter value of the operating parameter is determined based on the read data and the predetermined value of the operating parameter, and a temporary variable is utilized. However, it should be understood that this is only exemplary and is not intended to be limiting. In the embodiments of the present disclosure, the parameter value can also be determined in any other suitable manner.

[0055] Returning to block 220, if it is determined at block 220 that the second length is less than the first length, process 200 proceeds to block 270. At block 270, data of the second length is read from the storage device. Figure 6 An example structure 600 of data to be read from a storage device is described. Figure 6 , the data of the second length read is included in the data of the first length. For example, only data 1, data 2, data 3, ..., data n-1 are retained in the upgraded software, and data n is no longer needed. It can be understood that the case where the second length is less than the first length may be that the upgraded software deletes the data. In this case, the data stored in the storage device but deleted from the software will not be read, that is, it will be abandoned.

[0056] It should be noted that, since the address of the data is fixed, if the data b between data 1 and data n is no longer needed to be run, in order not to affect the normal parsing and running of the data, this data b will not be deleted, but only any action will be stopped from being executed on it.

[0057] In block 271, the read data is determined as the parameter value of the operating parameter. Figure 6 For example, the read data 1, data 2, data 3, ..., data n-1 can be used as operating parameters of the electrical equipment.

[0058] In block 272, the value of the first length stored at the predetermined address is updated to the value of the second length. For example, the stored data P is modified to the value of the second length.

[0059] This workflow 200 can be executed repeatedly. For example, if the electrical device is restarted or the software is upgraded again, box 210 will be re-executed. When the electrical device in the embodiment of the present disclosure adds or deletes data, the validity of the data used as operating parameters can be guaranteed, so that the operating function of the electrical device will not be affected. The electrical device in the embodiment of the present disclosure can arbitrarily add or delete parameter values ​​of multiple operating parameters at the end of the data of the new software, and the new software can easily identify data changes with the old software. The new software adds or deletes parameter values ​​without affecting other originally stored parameter values ​​in the storage device. In this way, the validity of the data used as operating parameters can be ensured, and it can also be ensured that the electrical device will not exhibit abnormal behavior due to illegal parameter values ​​of the data of the new software, thereby improving the iterativeness and stability of the electrical device.

[0060] Figure 7 1 shows a schematic structural block diagram of an electrical device 700 according to some embodiments of the present disclosure. The electrical device 700 can be installed in an electrical environment. Figure 7 As shown, the electrical device 700 includes a processing unit 710 and a storage device 720. The processing unit 710 is coupled to the storage device 720.

[0061] The electrical device 700 can be applied to different types of loads, such as thermostats, guest room control systems (RCU), KNX systems (which are a type of building automation and control systems), smart devices (such as smart sockets, smart switches, smart lighting, etc.), remote controls, etc.

[0062] The electrical device 700 can store data locally, such data can be, for example, configuration information, network information, communication address information data, etc. These data play a decisive role in the normal operation function and output behavior of the electrical device 700. The storage device 720 that can store data locally can include any suitable type of storage device, such as but not limited to erasable programmable read-only memory (EEPROM), serial external flash memory (SPI Flash), read-only memory (ROM), etc.

[0063] The processing unit 710 is configured to obtain a first length from a predetermined address in a storage device 720 of the electrical device 700, the first length indicating the amount of data stored in the storage device 720; compare the first length with a second length, the second length indicating the amount of data to be read for operation of the electrical device 700; read data from the storage device 720 based on the comparison result of the first length and the second length; and determine an operation parameter related to the electrical device 700 based on the read data. For example, the processing unit 710 includes a chip.

[0064] In some embodiments, the processing unit 710 is configured to: in response to the second length being equal to the first length, read data of the first length or the second length from the storage device 720; and determine the read data as a parameter value of the operating parameter.

[0065] In some embodiments, the processing unit 710 is configured to read data of the first length from the storage device 720 in response to the second length being greater than the first length; and determine a parameter value of the operating parameter based on the read data and a predetermined value of the operating parameter.

[0066] In some embodiments, the processing unit 710 is configured to: generate a temporary variable 500 having a second length based on a predetermined value of an operating parameter; update data of a first length in the temporary variable 500 based on the read data; and determine a parameter value of the operating parameter based on the updated temporary variable 500.

[0067] In some embodiments, the processing unit 710 is further configured to write the updated temporary variable 500 into a storage area having a second length in the storage device 720; and update the value of the first length stored at the predetermined address to a value of the second length.

[0068] In some embodiments, the processing unit 710 is configured to: in response to the second length being smaller than the first length, read data of the second length from the storage device 720 ; and determine the read data as a parameter value of the operating parameter.

[0069] In some embodiments, the processing unit 710 is further configured to update the value of the first length stored at the predetermined address to a value of the second length.

[0070] In some embodiments, the processing unit 710 is configured to read data from the storage device 720 including: reading consecutively stored data starting from an address after a predetermined address.

[0071] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is executed by the processing unit 710 to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes a computer program, and the computer program is executed by the processing unit 710 to implement the method described above.

[0072] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0073] These computer-readable program instructions can be provided to a processing unit 710 of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit 710 of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0074] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0075] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0076] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for managing data in an electrical device, comprising: obtaining a first length from a predetermined address in a storage device of the electrical device, the first length indicating an amount of data stored in the storage device; comparing the first length to a second length, the second length indicating an amount of data to be read for operation of the electrical device; Based on the comparison result of the first length and the second length, reading data from the storage device; as well as Based on the read data, operating parameters related to the electrical device are determined.

2. The method according to claim 1, wherein reading data from the storage device comprises: In response to the second length being equal to the first length, reading data of the first length or the second length from the storage device, and Determining the operating parameters related to the electrical equipment includes: The read data is determined as the parameter value of the operating parameter.

3. The method according to claim 1, wherein reading data from the storage device comprises: In response to the second length being greater than the first length, reading data of the first length from the storage device, and Determining the operating parameters related to the electrical equipment includes: A parameter value of the operating parameter is determined based on the read data and a predetermined value of the operating parameter.

4. The method of claim 3, wherein determining the parameter value of the operating parameter based on the read data and the predetermined value of the operating parameter comprises: generating a temporary variable having the second length based on a predetermined value of the operating parameter; Update the data of the first length in the temporary variable based on the read data; as well as A parameter value of the operating parameter is determined based on the updated temporary variable.

5. The method according to claim 4, further comprising: Writing the updated temporary variable into a storage area having a second length in the storage device; as well as The value of the first length stored at the predetermined address is updated to the value of the second length.

6. The method of claim 1 , wherein reading data from the storage device comprises: In response to the second length being smaller than the first length, reading data of the second length from the storage device, and Determining the operating parameters related to the electrical equipment includes: The read data is determined as the parameter value of the operating parameter.

7. The method according to claim 6, further comprising: The value of the first length stored at the predetermined address is updated to the value of the second length.

8. The method of claim 1 , wherein reading data from the storage device comprises: The continuously stored data are read starting from the address after the predetermined address.

9. An electrical device comprising: Storage device; as well as A processing unit is coupled to the storage device, wherein the processing unit is configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processing unit to implement the method according to any one of claims 1 to 7.