A method and system for upgrading software for controlling home appliances
By collecting hardware information before upgrading home appliances, determining compatibility and optimizing resources, generating upgrade task sequences, and dynamically adjusting communication protocols, the complexity and slow operation of upgrades caused by the diversity of hardware and storage limitations of home appliances are solved, achieving efficient and stable software upgrades.
Patent Information
- Application Number
- CN202511007157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The diversity of hardware interface types and communication protocols in home appliances increases the complexity and cost of software upgrades. Limited hardware storage capacity cannot accommodate large upgrade packages, resulting in slow or laggy operation of the devices.
Before upgrading, the system collects information on the device's processor model, storage capacity, communication interface type, and sensor status to determine hardware compatibility, cleans up temporary files and redundant information, optimizes memory resources, generates an upgrade task sequence, monitors communication signals and transmission rates in real time, dynamically adjusts protocols, and detects and recovers lost data.
Ensure hardware compatibility and stability during home appliance upgrades, optimize storage and memory resources, avoid upgrade failures or device malfunctions, and improve upgrade efficiency and device performance.
Smart Images

Figure CN120892070B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software data processing, and in particular to an upgrading method and system for home appliance control software. BACKGROUND
[0002] Hardware interface types of home appliances are various, such as serial port (RS-232), infrared, Wi-Fi, Bluetooth, etc. Different devices adopt different interface types, resulting in the need for adaptation for each interface during software upgrading, which increases the complexity and cost of upgrading. Different home appliances adopt different communication protocols, for example, some devices use a proprietary infrared remote control protocol, while others adopt standard Wi-Fi or Bluetooth protocols. During software upgrading, it is necessary to ensure that the new version of software can support these different communication protocols, otherwise the device cannot communicate normally. The hardware storage capacity of home appliances is limited, while the software upgrade package is large, resulting in insufficient device storage space and inability to complete upgrading. Specifically, the main control chip of some smart home appliances has a small storage capacity and cannot accommodate a large firmware upgrade package; during the upgrading process, the device needs to load the new software package and install it, which will occupy a large amount of memory resources, causing the device to run slowly or even stall. SUMMARY
[0003] Therefore, it is necessary to provide an upgrading method and system for home appliance control software to solve at least one of the above technical problems.
[0004] To achieve the above purpose, an upgrading method for home appliance control software, the method comprising the following steps:
[0005] Step S1: Before starting the software upgrading process of the home appliance, the processor model, storage capacity, communication interface type and sensor state of the device are collected to form hardware configuration information;
[0006] Step S2: Based on the hardware configuration information, it is determined whether the device hardware meets the preset running requirements of the new version of software. If not, the upgrading process is suspended, and the user is prompted with hardware incompatibility information. If yes, the memory resources of the storage space of the home appliance are evaluated according to the hardware configuration information. If the memory resources of the storage space are insufficient, the temporary files, cache data and redundant information in the device are cleaned up, and the memory resources are allocated according to the processor model and memory resources;
[0007] Step S3: The functional dependency relationship and upgrading priority of each component of the home appliance are determined according to the hardware configuration information, and an upgrading task sequence is generated. The components of the home appliance are upgraded in sequence according to the upgrading task sequence, and the signal strength and transmission rate of the communication interface are monitored in real time during the upgrading file transmission process. The communication protocol is dynamically adjusted according to the signal strength and transmission rate;
[0008] Step S4: detecting data loss in the communication process, if communication interruption or data loss is detected, continue transmitting the remaining data from the last successful transmission interruption point, and verify the communication and cooperation status with other upgraded components after each component upgrade is completed.
[0009] Preferably, step S1 comprises the following steps:
[0010] Step S11: extracting the unique identifier of the processor from the system information of the home appliance, matching the extracted unique identifier with the preset processor model database to determine the processor model;
[0011] Step S12: scanning the storage partitions of the home appliance, identifying the total capacity and used capacity of each partition, calculating the remaining available space of each partition, and summarizing the available space of all partitions to generate the storage capacity;
[0012] Step S13: detecting the communication port state of the home appliance and identifying the type of currently connected communication interface;
[0013] Step S14: detecting the response signal of each sensor in the home appliance, recording the response strength and response time of the sensor; according to the response strength and response time of the sensor, determining the working state of each sensor.
[0014] Preferably, in step S2, based on the hardware configuration information, it is judged whether the device hardware meets the preset running requirements of the new version of software, if not, the upgrade process is suspended, and the hardware incompatibility information is prompted to the user, including:
[0015] Compare the processor model with the list of processor models supported by the new version of software, test the compatibility of the processor by simulating the running environment, and judge whether the processor meets the running requirements of the new version of software;
[0016] Compare the storage capacity with the minimum storage space required by the new version of software, and judge whether the storage capacity meets the running requirements of the new version of software;
[0017] Compare the communication interface type with the communication interface type supported by the new version of software, and judge whether the communication interface meets the running requirements of the new version of software;
[0018] Compare the sensor state with the requirements of the new version of software for sensors, and judge whether the sensor meets the running requirements of the new version of software;
[0019] If any of the processor model, storage capacity, communication interface type and sensor state does not meet the preset running requirements of the new version of software, the upgrade process is suspended, and the hardware incompatibility information is prompted to the user.
[0020] Preferably, if yes in step S2, the evaluating the storage space memory resource of the home appliance according to the hardware configuration information comprises:
[0021] reading the storage partition table of the home appliance through the hardware interface to obtain the start sector and the end sector of each partition;
[0022] reading the FAT32, NTFS and exFAT file system types of each partition;
[0023] reading the total capacity and the used capacity of each partition to calculate the remaining available space;
[0024] reading the memory management unit of the home appliance through the hardware interface to obtain the current memory usage;
[0025] identifying the process ID, the occupied physical memory and the virtual memory of the current memory usage, and recording the currently used memory and the remaining available memory.
[0026] Preferably, if the storage space memory resource is insufficient in step S2, the cleaning the temporary files, the cache data and the redundant information in the device and allocating the memory resource according to the processor model and the memory resource comprises:
[0027] identifying and locating the temporary file storage path in the home appliance, reading the creation time of the temporary file and the temporary file size;
[0028] deleting the temporary file whose creation time is more than 24 hours or whose size is more than 50 MB;
[0029] identifying and locating the cache data storage path in the home appliance, reading the last access time of the cache data and the cache data size;
[0030] deleting the cache data whose last access time is more than 7 days or whose size is more than 200 MB;
[0031] identifying and locating the redundant information storage path in the home appliance, and deleting the repeated file copies;
[0032] determining the required minimum memory of the new version software according to the processor model and the memory resource, and allocating the memory space for the new version software based on the required minimum memory.
[0033] Preferably, the determining the functional dependency relationship and the upgrade priority of each component of the home appliance according to the hardware configuration information and generating the upgrade task sequence in step S3 comprises:
[0034] reading the processor model and the sensor state in the hardware configuration information;
[0035] The processor's supported power management functions, user interface functions, and background service functions are determined based on sensor status.
[0036] Establish dependencies between the functions supported by the processor;
[0037] Assign a priority value to each function based on the dependencies between functions, assign the highest priority value to power management functions, the medium priority value to user interface functions, and the lowest priority value to background service functions.
[0038] Generate an upgrade task sequence based on functional dependencies and priority values.
[0039] Of particular importance is establishing dependencies between processor-supported features, including:
[0040] Generate a list of features supported by the processor, including power management features, user interface features, and background service features;
[0041] Assign a unique identifier to each function and associate the identifier with the function name;
[0042] Assign a priority value of 1 to the power management function, a priority value of 2 to the user interface function, and a priority value of 3 to the background service function;
[0043] After generating the dependency graph, check if there are any redundant dependencies in the graph;
[0044] If redundant dependencies exist, remove the redundant dependencies and optimize the dependency graph.
[0045] Detect whether there is a circular dependency in the dependency graph. If a circular dependency is detected, record the path of the circular dependency.
[0046] Preferably, in step S3, the components of the home appliance are upgraded sequentially according to the upgrade task sequence, and the signal strength and transmission rate of the communication interface are monitored in real time during the upgrade file transfer process, including:
[0047] Upgrade the components of the home appliances sequentially according to the upgrade task sequence;
[0048] During the upgrade process, the upgrade status and timestamp of each component are recorded;
[0049] For each component, perform the following operations: read the component's current version information; compare the current version with the target version to determine the content that needs to be updated, generate a differential update package, and transmit only the necessary update content to reduce the amount of data; apply the differential update package to the component, complete the upgrade, and record the upgraded version information and status;
[0050] In the process of upgrading file transmission, the signal strength and transmission rate of the communication interface are monitored in real time.
[0051] Especially important is that, in the process of upgrading file transmission, the signal strength and transmission rate of the communication interface are monitored in real time, which includes:
[0052] In the process of upgrading file transmission, the signal strength of the communication interface is monitored once per second;
[0053] If the signal strength is lower than -70dBm, a warning message is recorded, and the time point is marked as a potential unstable communication point;
[0054] In the process of upgrading file transmission, the transmission rate of the communication interface is monitored once per second;
[0055] If the transmission rate is lower than 100kbps, a warning message is recorded, and the time point is marked as a potential unstable communication point;
[0056] The monitored signal strength and transmission rate data are stored in the log file of the device, wherein the log file includes a timestamp, a signal strength value and a transmission rate value.
[0057] Preferably, the step S3 of dynamically adjusting the communication protocol according to the signal strength and the transmission rate includes:
[0058] For the case that the signal strength is higher than -70dBm, it is marked as high signal strength; for the case that the signal strength is between -70dBm and -80dBm, it is marked as medium signal strength; for the case that the signal strength is lower than -80dBm, it is marked as low signal strength;
[0059] For the case that the transmission rate is higher than 100kbps, it is marked as high transmission rate; for the case that the transmission rate is between 50kbps and 100kbps, it is marked as medium transmission rate; for the case that the transmission rate is lower than 50kbps, it is marked as low transmission rate;
[0060] If the signal strength is high and the transmission rate is high, the standard Wi-Fi protocol is selected; if the signal strength is medium and the transmission rate is medium, the Bluetooth protocol is selected; if the signal strength is low and the transmission rate is low, the Wi-Fi Direct protocol is selected.
[0061] Preferably, the step S4 includes the following steps:
[0062] Step S41: In the process of upgrading file transmission, the checksum of the transmission data is calculated once per second; the calculated checksum is compared with the checksum fed back by the receiving end; if the checksums are inconsistent, the position and timestamp of data loss are recorded;
[0063] Step S42: When data loss is detected, record the last successfully transmitted data block number and location, and store the breakpoint information in the temporary storage area of the device;
[0064] Step S43: Continue transmitting the remaining data blocks from the recorded breakpoint, and recheck each data block during transmission;
[0065] Step S44: After each component upgrade is completed, send a cooperative verification signal to the upgraded component; receive the response signal from the upgraded component to verify the integrity of the communication link and the accuracy of data transmission;
[0066] Step S45: If the verification fails, record the failure information and attempt to resend the verification signal up to three times;
[0067] Step S46: If all three verifications fail, pause the upgrade process and prompt the user with cooperative abnormality information.
[0068] The application can accurately determine whether the device hardware meets the operation requirements of the new version software by collecting hardware configuration information such as the processor model, storage capacity, communication interface type and sensor state of the device before starting the software upgrade process of the home appliance. If the hardware is incompatible, the upgrade process is suspended in time and the user is prompted, avoiding upgrade failure or device operation abnormity due to hardware not meeting the requirements, thereby ensuring the reliability of the upgrade process and the stability of the device. Based on the hardware configuration information, the storage space memory resources of the home appliance are evaluated, and when the storage space memory resources are insufficient, temporary files, cache data and redundant information in the device are cleaned up, and memory resources are allocated according to the evaluation results of the processor model and the memory resources. This process can effectively solve the upgrade failure problem caused by insufficient storage space or unreasonable memory resource allocation, and optimize the running efficiency of the device, providing good basic conditions for software upgrade. According to the hardware configuration information, the functional dependency relationship and the upgrade priority of each component of the home appliance are determined, and an upgrade task sequence is generated, and the components are upgraded in sequence according to the sequence. This orderly upgrade method can avoid system conflicts or function failure problems caused by chaotic component upgrade sequence, ensure that each component can be updated in a reasonable order during the upgrade process, improve the upgrade efficiency and guarantee the overall performance of the device after upgrade. In the upgrade file transmission process, the signal strength and transmission rate of the communication interface are monitored in real time, and the communication protocol is dynamically adjusted according to the signal strength and transmission rate. This dynamic adjustment mechanism can effectively deal with problems such as changes in communication environment or signal interference, ensuring the stability and reliability of the data transmission process, reducing the risk of data loss or transmission interruption caused by unstable communication. By detecting data loss during communication, if communication interruption or data loss is detected, the remaining data is transmitted from the last successful transmission interruption point, avoiding upgrade failure or device operation abnormity caused by incomplete data transmission. At the same time, after each component is upgraded, the communication and cooperative working state with other upgraded components is verified to ensure that each component of the device can work normally after upgrade, guaranteeing the overall function and performance of the device.
[0069] The present specification also provides an upgrade system for home appliance control software for executing the upgrade method for home appliance control software as described above, which comprises:
[0070] A hardware configuration information acquisition module is configured to collect the processor model, storage capacity, communication interface type and sensor state of the device before starting the software upgrade process of the home appliance, and form hardware configuration information.
[0071] The memory resource allocation module is used for judging whether the device hardware meets the running requirements of the preset new version software based on the hardware configuration information, if not, the upgrading process is suspended, and the hardware incompatibility information is prompted to the user, if yes, the memory space memory resource of the household appliance device is evaluated according to the hardware configuration information, if the memory space memory resource is insufficient, the temporary files, cache data and redundant information in the device are cleaned, and the memory resource is allocated according to the processor model and the memory resource;
[0072] The upgrading operation module is used for determining the function dependency relationship and the upgrading priority of each component of the household appliance device according to the hardware configuration information, and generating an upgrading task sequence, and sequentially performing the upgrading operation on the components of the household appliance device according to the upgrading task sequence, and monitoring the signal strength and the transmission rate of the communication interface in real time in the upgrading file transmission process, and dynamically adjusting the communication protocol according to the signal strength and the transmission rate.
[0073] The upgrading communication process detection module is used for detecting the data loss in the communication process, if the communication interruption or the data loss is detected, the remaining data is transmitted from the last successful transmission interruption point, and after each component is upgraded, the communication and the cooperative working state with other upgraded components are verified.
[0074] The hardware configuration information acquisition module accurately acquires the device hardware parameters, the memory resource allocation module realizes the resource optimization and the hardware compatibility judgment, the upgrading operation module sequentially performs the component upgrading and dynamically adjusts the communication protocol, and the upgrading communication process detection module guarantees the data transmission integrity and the component cooperative working state, so that the efficiency, stability and reliability of the household appliance device control software upgrading are realized, and it is ensured that the device can normally operate and play the expected function after the upgrading. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 It is a step flow schematic diagram of a household appliance device control software upgrading method;
[0076] Figure 2 It is Figure 1 It is a detailed implementation step flow schematic diagram of step S1;
[0077] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0078] The technical method of the present application will be described clearly and completely in combination with the accompanying drawings, obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the skilled in the art without creative labor belong to the protection scope of the present application.
[0079] Furthermore, the accompanying drawings are included to provide a further understanding of the present application, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application. In the drawings:
[0080] It should be understood that, although terms such as "first", "second", and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element without departing from the scope of the example embodiments. The term "and / or" as used herein encompasses any and all combinations of one or more of the associated associated items.
[0081] To achieve the above object, there is provided Figures 1 to 2 A method for upgrading home appliance control software, the method comprising the steps of:
[0082] Step S1: Collecting the processor model, storage capacity, communication interface type and sensor state of the device to form hardware configuration information before starting the software upgrade process of the home appliance;
[0083] In the embodiment of the present application, before starting the software upgrade process of the home appliance, the hardware configuration of the device is first detected by the built-in hardware detection module. The hardware detection module runs a detection program based on an embedded system, which reads the processor model information, storage capacity parameters, communication interface type and sensor state data of the device in sequence by calling the interface function of the device driver layer. For the acquisition of the processor model information, the detection program reads the identification register of the central processor to obtain its model identifier, which is stored in the hardware information storage area of the device in the form of a hexadecimal string. The detection of the storage capacity parameters is to query the capacity identification bit of the device storage chip to obtain the total capacity and available capacity of the storage chip, which are recorded in the hardware information storage area in bytes. The detection of the communication interface type is to detect the state of the hardware identification pin of the communication module to determine whether the communication interface is a wired Ethernet interface, a wireless Wi-Fi interface or a Bluetooth interface, and to store the interface type in a preset encoding form. The detection of the sensor state is to send a state query instruction to the sensor and receive the state code returned by the sensor, which contains information about whether the sensor is working normally and the current working mode. These information are also stored in the hardware information storage area in the form of encoding. After the detection is completed, the detection program packages the collected processor model, storage capacity, communication interface type and sensor state data to form a complete hardware configuration information data packet, which is stored in the non-volatile storage unit of the device in a specific format for subsequent hardware compatibility check in the software upgrade process.
[0084] Step S2: Determine whether the device hardware meets the running requirements of the preset new version software based on the hardware configuration information. If not, the upgrade process is suspended, and the user is prompted with hardware incompatibility information. If yes, the storage space memory resources of the home appliance are evaluated according to the hardware configuration information. If the storage space memory resources are insufficient, the temporary files, cache data and redundant information in the device are cleaned up, and the memory resources are allocated according to the processor model and memory resources.
[0085] In the embodiment of the present application, in step S2, the system first reads the hardware configuration information data packet generated in step S1 from the non-volatile storage unit of the device. The data packet contains information such as processor model, storage capacity, communication interface type, and sensor state. The system calls a preset hardware compatibility database, which stores the minimum requirement parameters of the new version of software for hardware, including processor model support list, minimum storage capacity requirement, communication interface type support range, and sensor state requirement. The system compares the read hardware configuration information with the parameters in the hardware compatibility database one by one. If the processor model is not in the support list, or the storage capacity is lower than the minimum requirement, or the communication interface type does not match, or the sensor state does not meet the requirement, it is determined that the device hardware does not meet the running requirements of the new version of software. At this time, the system suspends the software upgrade process, and displays hardware incompatibility information through the user interaction interface of the device, prompting the user that the upgrade cannot be performed. If the hardware configuration information meets the running requirements of the new version of software, the system enters the storage space memory resource evaluation stage. The system calls a storage space detection module, which scans the storage file system of the device to count the total capacity, used capacity, and remaining capacity of the device storage space. At the same time, the system calls a memory resource detection module, which reads the state information of the device memory management unit to obtain the total capacity, allocated capacity, and available capacity of the current memory. The system compares the detected device storage space and memory resources with the storage space requirement parameters and memory resource requirement parameters of the new version of software. If the remaining capacity of the storage space is lower than the storage space requirement of the new version of software, or the available capacity of the memory is lower than the memory resource requirement of the new version of software, it is determined that the storage space memory resource is insufficient. In the case of insufficient storage space memory resource, the system starts a cleaning module. The cleaning module first scans the storage file system of the device to identify and mark temporary files, cache data, and redundant information in the device. Temporary files include temporary log files, temporary download files, and the like generated during software running; cache data includes web page cache, application cache, and the like; redundant information includes duplicate backup files, old version software files that are no longer used, and the like. The cleaning module deletes these files according to the preset cleaning rules to release the storage space. At the same time, the system re-allocates the memory resources through the memory management unit according to the evaluation results of the processor model and the memory resources. The system dynamically adjusts the memory allocation strategy according to the performance parameters of the processor, such as the number of processor cores and the main frequency, and the current usage of the memory resources. For multi-core processors, the system will preferentially allocate memory to critical tasks and running modules of the new version of software to ensure the smooth progress of the software upgrade process.
[0086] Step S3: determining the function dependency relationship and the upgrade priority of each component of the home appliance according to the hardware configuration information, and generating an upgrade task sequence; performing upgrade operation on the components of the home appliance in sequence according to the upgrade task sequence, and monitoring the signal strength and the transmission rate of the communication interface in real time during the upgrade file transmission process; and dynamically adjusting the communication protocol according to the signal strength and the transmission rate;
[0087] In step S3, the system first calls the preset component function dependency relationship database and upgrade priority rule library according to the hardware configuration information collected in step S1. The component function dependency relationship database stores the dependency relationship between each component of the home appliance, for example, the sensor component depends on the communication interface component for data transmission, and the control module depends on the processor component for instruction processing. The upgrade priority rule library allocates priority to each component according to the importance of the component and the degree of influence on the operation of the device, for example, the priority of the processor component and the communication interface component is higher than that of the sensor component and the display component. The system determines the function dependency relationship and the upgrade priority of each component of the home appliance by analyzing the hardware configuration information, combining the component function dependency relationship database and the upgrade priority rule library, and generates an upgrade task sequence. The upgrade task sequence is arranged from high to low according to the priority, ensuring that the key components are upgraded first. For example, if the priority of the processor component and the communication interface component is the highest, they are arranged at the front of the upgrade task sequence. Then, the system performs upgrade operation on the components of the home appliance in sequence according to the upgrade task sequence. During the upgrade file transmission process, the system starts the communication interface monitoring module, which monitors the signal strength and the transmission rate of the communication interface in real time by calling the hardware state detection function of the communication interface. The signal strength is measured by the received signal strength indication (RSSI) value of the communication interface, and the transmission rate is calculated by monitoring the amount of data transmitted per unit time. The system presets a signal strength threshold and a transmission rate threshold, for example, when the RSSI value is lower than -80 dBm or the transmission rate is lower than 100 kbps, it is determined that the communication state is poor. According to the monitored signal strength and transmission rate, the system dynamically adjusts the communication protocol. The system calls the communication protocol switching module, which switches to a communication protocol with stronger anti-interference capability, for example, from Wi-Fi protocol to Bluetooth protocol, when the signal strength is lower than the threshold, and switches to a more efficient transmission protocol, for example, from low-rate serial communication protocol to high-rate Ethernet protocol, when the transmission rate is lower than the threshold. The communication protocol switching module completes the switching operation of the protocol by modifying the configuration parameters of the communication interface, ensuring the stability and efficiency of the upgrade file transmission. During the entire upgrade process, the system continuously monitors the communication interface state and dynamically adjusts the communication protocol according to the real-time data until all components are upgraded.
[0088] Step S4: Detect data loss during communication. If communication interruption or data loss is detected, continue transmitting the remaining data from the point of interruption where the last successful transmission was interrupted. After each component upgrade is completed, verify the communication and collaborative working status with other upgraded components.
[0089] In this embodiment of the invention, in step S4, the system activates the data integrity detection module. This module performs real-time verification of the transmitted data by implementing a Cyclic Redundancy Check (CRC) algorithm in the communication link. During data transmission, the sending end divides the data to be transmitted into fixed-length data blocks, and each data block is appended with a checksum calculated by the CRC algorithm. When the receiving end receives each data block, it also uses the CRC algorithm to verify the data block. By comparing whether the calculated checksum matches the checksum appended to the received data block, it determines whether the data block has been lost or damaged during transmission. The system presets a data loss threshold; for example, when the number of consecutively lost or damaged data blocks reaches 5% of the total number of data blocks, it is determined that data loss has occurred during communication. If a communication interruption or data loss is detected, the system calls the data recovery module. This module first records the interruption point location when the data loss occurred, and the interruption point location is stored in the form of a data block number. Subsequently, the system continues to transmit the remaining data from the interruption point of the last successful transmission. Before resuming transmission, the data recovery module re-establishes the communication link by calling the state recovery function of the communication interface and synchronizes the interruption point information to the sending and receiving ends to ensure that data transmission starts from the correct position. During the transmission recovery process, the system continues to implement CRC checks to verify the data blocks transmitted in real time, ensuring data integrity and accuracy. After each component upgrade is completed, the system starts the component collaboration verification module. This module verifies the communication and collaboration status between upgraded components by calling preset component communication protocols and collaboration interfaces. The verification process includes sending test commands and data to detect the response time and data interaction accuracy between components. For example, for the upgraded processor component and communication interface component, the system sends a series of commands, requiring the processor component to process data and transmit the results through the communication interface component; at the same time, the communication interface component receives external data and passes it to the processor component for processing. The system presets collaboration verification parameters, including a maximum response time threshold and data interaction accuracy requirements. If the response time between components exceeds the maximum response time threshold, or the data interaction accuracy is lower than the preset requirements, the collaboration status is determined to be abnormal, and the system will record the abnormal information and perform corresponding troubleshooting and repair operations.
[0090] As an example of the present invention, reference is made to... Figure 2 As shown, in this example, step S1 includes:
[0091] Step S11: Extract the unique identifier of the processor from the system information of the home appliance, match the extracted unique identifier with the preset processor model database to determine the processor model;
[0092] Step S12: Scan the storage partition of the home appliance, identify the total capacity and used capacity of each partition, calculate the remaining available space of each partition, and aggregate the available space of all partitions to generate the storage capacity;
[0093] Step S13: Detect the communication port state of the home appliance and identify the type of currently connected communication interface;
[0094] Step S14: Detect the response signal of each sensor in the home appliance, record the response strength and response time of the sensor; according to the response strength and response time of the sensor, determine the working state of each sensor.
[0095] In step S11, the system calls the system information management module of the device to extract the unique identifier of the processor by accessing the system register of the central processing unit (CPU) of the device. The unique identifier is usually a serial number or model identifier pre-written by the processor manufacturer, stored in hexadecimal or ASCII code form. The system matches the extracted unique identifier with the preset processor model database. The processor model database stores the processor models that support upgrading and their corresponding unique identifier list. The matching process is implemented through a string comparison algorithm. If a match is found, the processor model is determined to be the current processor model used by the device, and the model information is stored in the hardware configuration information data structure for subsequent steps. In step S12, the system starts the storage partition scanning module, which scans the storage medium of the home appliance device by calling the file system interface of the device. For each partition, the module reads the metadata of the partition to obtain the total capacity and used capacity of the partition. The total capacity is obtained by reading the capacity field in the partition table; the used capacity is calculated by counting the number of allocated disk blocks in the partition and multiplying the size of each disk block. Then, the system calculates the remaining available space of each partition, which is the total capacity minus the used capacity. Finally, the system sums up the available space of all partitions to generate the total storage capacity of the device, and stores the storage capacity information in the hardware configuration information data structure. In step S13, the system calls the communication port state detection module, which detects the communication port state of the home appliance device by accessing the communication interface management unit of the device. The detection process includes reading the hardware state register of the communication port to obtain the connection state, signal level, and communication protocol type of the port. The system identifies the type of the currently connected communication interface based on the connection state and protocol type of the communication port, such as an Ethernet interface, a Wi-Fi interface, or a Bluetooth interface. The identification result is stored in the hardware configuration information data structure in a preset encoding form, and the current signal strength and transmission rate parameters of the communication interface are recorded, providing a basis for communication stability evaluation in subsequent upgrading process. In step S14, the system starts the sensor response signal detection module, which sends a preset response test signal to each sensor in the home appliance device to record the response strength and response time of the sensor. The response test signal is an electrical signal with a specific frequency and amplitude. The sensor returns a response signal after receiving the signal, and the module records the time difference from sending the test signal to receiving the response signal, i.e., the response time, through a high-precision timer. At the same time, the response signal amplitude, i.e., the response strength, is measured through a signal strength detection circuit. The system judges the working state of each sensor according to the preset sensor working state judgment standard, such as the response strength threshold and the response time threshold. If the response strength of the sensor is higher than the threshold and the response time is within the specified range, the sensor is determined to be working normally; otherwise, it is determined to be abnormal.The working state result of the sensor is stored in the hardware configuration information data structure in the form of a state code, and the state code contains the identification of normal or abnormal and the specific abnormal type (such as too slow response or too weak signal).
[0096] Preferably, in step S2, it is judged whether the device hardware meets the preset running requirement of the new version software based on the hardware configuration information, if not, the upgrading process is suspended, and the hardware incompatible information is prompted to the user, including:
[0097] The processor model is compared with the processor model list supported by the new version software, the compatibility of the processor is tested through the simulation running environment, and it is judged whether the processor meets the running requirement of the new version software;
[0098] The storage capacity is compared with the minimum storage space required by the new version software, and it is judged whether the storage capacity meets the running requirement of the new version software;
[0099] The communication interface type is compared with the communication interface type supported by the new version software, and it is judged whether the communication interface meets the running requirement of the new version software;
[0100] The sensor state is compared with the requirement of the new version software to the sensor, and it is judged whether the sensor meets the running requirement of the new version software;
[0101] If any one of the processor model, the storage capacity, the communication interface type and the sensor state does not meet the preset running requirement of the new version software, the upgrading process is suspended, and the hardware incompatible information is prompted to the user.
[0102] In the embodiment of the present application, first, the system call processor compatibility detection module extracts the determined processor model from the hardware configuration information and compares it with the processor model list supported by the new version of software. The supported processor model list is stored in the system preset database, containing all compatible processor models and their corresponding unique identifiers. The comparison process is realized by string matching algorithm. If the processor model exists in the support list, further simulation running environment test is carried out. The simulation running environment test module creates a virtual environment matching the running environment of the new version of software through virtualization technology, injects the performance parameters of the processor (such as frequency, core number, cache size, etc.) into the virtual environment, and runs a preset test code. The test code simulates the typical operation load of the new version of software on the processor, including floating point operation, integer operation and multi-thread task processing. The system monitors the running state of the processor in the virtual environment, records the execution time, operation result accuracy and resource occupancy rate of the test code and other parameters. If the test result shows that the processor can accurately complete the operation task within the specified time and the resource occupancy rate is within a reasonable range, it is determined that the processor meets the running requirements of the new version of software. Secondly, the system call storage capacity detection module extracts the total storage capacity of the device from the hardware configuration information and compares it with the minimum storage space required by the new version of software. The minimum storage space required by the new version of software is stored in the system preset parameter configuration file in bytes. The detection module judges whether the storage capacity of the device is greater than or equal to the minimum storage space required by the new version of software through simple numerical comparison operation. If the storage capacity is less than the minimum storage space requirement, it is determined that the storage capacity does not meet the running requirements of the new version of software. Then, the system call communication interface detection module extracts the type of the currently connected communication interface from the hardware configuration information and compares it with the list of communication interface types supported by the new version of software. The supported communication interface type list is stored in the system preset database, containing various types such as wired Ethernet interface, wireless Wi-Fi interface, Bluetooth interface and their corresponding code identifiers. The comparison process is realized by code matching algorithm. If the communication interface type exists in the support list, further detection of the signal strength and transmission rate of the communication interface is carried out. The signal strength is measured by the received signal strength indication (RSSI) value of the communication interface, and the transmission rate is calculated by monitoring the amount of data transmitted per unit time. The system presets the minimum threshold values of signal strength and transmission rate, for example, the RSSI value is not less than -70dBm, and the transmission rate is not less than 1Mbps. If the signal strength and transmission rate of the communication interface both meet the minimum threshold requirements, it is determined that the communication interface meets the running requirements of the new version of software. Finally, the system call sensor state detection module extracts the working state of each sensor from the hardware configuration information, including response strength and response time, and compares it with the requirements of the new version of software on the sensor.The requirements of the new version software for the sensors are stored in a system preset parameter configuration file, including a minimum threshold of sensor response strength and a maximum threshold of response time. The detection module judges whether the response strength of each sensor is higher than the minimum threshold and whether the response time is within the maximum threshold range through a numerical comparison operation. If the working states of all sensors meet the requirements, it is determined that the sensors meet the operation requirements of the new version software. In the above comparison and test process, if any of the processor model, storage capacity, communication interface type and sensor state does not meet the preset operation requirements of the new version software, the system calls the upgrade flow control module to suspend the software upgrade process. At the same time, the system calls the user interaction module to prompt the user of the hardware incompatibility information through the display interface of the device or the user terminal, and the prompt information clearly indicates the hardware items that do not meet the requirements and the specific reasons.
[0103] Preferably, if the condition in step S2 is met, the memory resource of the storage space of the home appliance is evaluated according to the hardware configuration information, including:
[0104] The storage partition table of the home appliance is read through the hardware interface to obtain the start sector and the end sector of each partition;
[0105] The FAT32, NTFS and exFAT file system types of each partition are read;
[0106] The total capacity and the used capacity of each partition are read, and the remaining available space is calculated;
[0107] The memory management unit of the home appliance is read through the hardware interface to obtain the current memory usage;
[0108] The process ID, the occupied physical memory and the virtual memory of the current memory usage are identified, and the currently used memory and the remaining available memory are recorded.
[0109] In the embodiments of the present application, first, the system accesses the storage partition table of the home appliance device by calling the hardware interface module and using the storage controller interface of the device. The partition table is usually located at a fixed position of the storage medium, such as the master boot record (MBR) or GUID partition table (GPT) area of the hard disk. The hardware interface module reads the partition table data from the specified address of the storage medium by sending a read instruction, and obtains the start sector and end sector information of each partition. The start sector and end sector are recorded in the form of sector numbers, and the size of each sector is usually 512 bytes or 4096 bytes, depending on the format of the storage medium. The system stores this information in a temporary data structure for subsequent operations. Then, the system detects the file system type of each partition. By reading the boot sector or superblock information of each partition through the hardware interface module, the system identifies the file system type used by the partition. For the FAT32 file system, the BPB (BIOS Parameter Block) structure in the boot sector is detected, especially the file system type identification field in the BPB; for the NTFS file system, the "NTFS" flag in the boot sector is detected; for the exFAT file system, the file system identification field in the boot sector is detected. The system records the detected file system type information (FAT32, NTFS or exFAT) in the temporary data structure associated with the corresponding partition. Next, the system detects the storage capacity of each partition in detail. By reading the file system metadata of the partition through the hardware interface module, the system obtains the total capacity and used capacity of each partition. For the FAT32 file system, the total capacity is calculated by the total sector number field in the BPB, and the used capacity is calculated by scanning the file allocation table (FAT table) to count the number of allocated clusters multiplied by the cluster size; for the NTFS file system, the total capacity is obtained by reading the partition size field in the superblock, and the used capacity is obtained by scanning the NTFS metadata file to count the number of allocated disk blocks multiplied by the block size; for the exFAT file system, the total capacity is obtained by reading the partition size field in the boot sector, and the used capacity is obtained by scanning the exFAT allocation table to count the number of allocated clusters multiplied by the cluster size. The system calculates the remaining available space of each partition, which is the total capacity minus the used capacity, and records this information in the temporary data structure. In addition, the system accesses the memory management unit (MMU) of the home appliance device by calling the hardware interface module. The MMU is responsible for managing the physical memory and virtual memory of the device, and the system obtains the current memory usage by sending a query instruction. The memory usage includes the total memory capacity, the used memory capacity and the remaining available memory capacity. The total memory capacity is obtained by reading the system memory configuration register of the MMU; the used memory capacity is obtained by scanning the memory allocation table to count the number of allocated memory blocks multiplied by the block size; the remaining available memory capacity is calculated by subtracting the used memory capacity from the total memory capacity. Finally, the system analyzes the current memory usage in detail and identifies the processes occupying the memory.By calling the process management interface of the operating system, the system obtains the list of currently running processes, including the process ID (PID) of each process, the size of the physical memory and virtual memory occupied. The physical memory occupation is obtained by reading the memory mapping table of the process to count the number of allocated physical memory pages multiplied by the page size; the virtual memory occupation is obtained by reading the virtual memory space of the process to count the size of the allocated virtual memory region. The system records the total amount of currently used memory and the total amount of remaining available memory, and stores these information in a temporary data structure for subsequent resource assessment and allocation in the upgrade process.
[0110] Preferably, if the storage space memory resource is insufficient in step S2, the temporary files, cache data and redundant information in the device are cleaned up, and the memory resources are allocated according to the processor model and the memory resources, including:
[0111] Identify and locate the temporary file storage path in the home appliance device, read the creation time of the temporary file and the size of the temporary file;
[0112] Delete temporary files whose creation time exceeds 24 hours or whose size exceeds 50MB;
[0113] Identify and locate the cache data storage path in the home appliance device, read the last access time of the cache data and the size of the cache data;
[0114] Delete cache data whose last access time exceeds 7 days or whose size exceeds 200MB;
[0115] Identify and locate the redundant information storage path in the home appliance device, and delete duplicate file copies;
[0116] Determine the required minimum memory of the new version software according to the processor model and the memory resources; allocate memory space for the new version software based on the required minimum memory.
[0117] In the embodiment of the present application, first, the system calls the file system scanning module, identifies and locates the temporary file storage path by accessing the operating system file system interface of the home appliance. The path is usually preset in the system configuration file of the device, such as “ / tmp” or “C:\Windows\Temp”. After the module enters the path, it reads the file metadata in the directory through the file system interface to obtain the creation time and file size of each temporary file. The creation time is recorded in the timestamp format, and the file size is recorded in bytes. The system stores these information in the temporary file information table. Then, the system starts the file cleaning module to perform screening and deletion operations on the temporary files. The module checks the creation time and file size of the temporary files according to the preset cleaning rules. If the creation time of the file exceeds 24 hours from the current time, or the file size exceeds 50 MB, the file is marked as a deletion object. The cleaning module sends a deletion instruction through the file system interface to delete the marked temporary file from the storage medium, and updates the temporary file information table to record the result of the deletion operation. Next, the system calls the file system scanning module again to identify and locate the cache data storage path. The cache data path is usually stored in a specific directory of the device according to the configuration of the application program. After the module enters the path, it reads the last access time of the cache data and the cache data size. The last access time is also recorded in the timestamp format, and the cache data size is recorded in bytes. The system stores these information in the cache data information table. Then, the system starts the cache cleaning module to perform screening and deletion operations on the cache data. The module checks the last access time and cache data size of the cache data according to the preset cleaning rules. If the last access time of the cache data exceeds 7 days from the current time, or the cache data size exceeds 200 MB, the cache data is marked as a deletion object. The cleaning module sends a deletion instruction through the file system interface to delete the marked cache data from the storage medium, and updates the cache data information table to record the result of the deletion operation. Next, the system calls the redundant information detection module to identify and locate the redundant information storage path. The module scans the storage partition of the device, calculates the hash value of the file content using the file hash algorithm (such as MD5 or SHA-256) to generate the unique hash value of the file. The module stores all the hash values of the files in the hash value table, and performs sorting and deduplication operations on the hash value table. If multiple files have the same hash value, it is determined that these files are duplicate file copies. The module selects to retain one copy and marks the other duplicate copies as deletion objects, and sends a deletion instruction through the file system interface to delete the duplicate file copies from the storage medium. Finally, the system calls the memory resource management module to determine the required minimum memory of the new version software according to the processor model and memory resources. The module queries the preset memory requirement database to obtain the minimum memory parameter required by the new version software according to the processor model.The parameter is stored in bytes, for example, for a certain type of processor, the minimum memory required by the new version of software is 256MB. The memory resource management module allocates memory space for the new version of software by calling the memory allocation interface of the operating system according to the required minimum memory parameter. During the allocation process, the module checks whether the remaining available memory of the current device meets the required minimum memory requirement. If it meets, the required memory space is allocated to the new version of software; if it does not meet, a memory shortage warning is triggered, and the subsequent upgrade operation is suspended.
[0118] Preferably, the function dependency relationship and the upgrade priority of each component of the home appliance device are determined according to the hardware configuration information in step S3, and the upgrade task sequence is generated, including:
[0119] reading the processor type and sensor state in the hardware configuration information;
[0120] determining the power management function, the user interface function and the background service function supported by the processor based on the sensor state;
[0121] establishing the dependency relationship between the functions supported by the processor;
[0122] assigning a priority value to each function according to the dependency relationship between the functions, assigning the highest priority value to the power management function, assigning the medium priority value to the user interface function, and assigning the lowest priority value to the background service function;
[0123] generating the upgrade task sequence according to the function dependency relationship and the priority value.
[0124] In the embodiment of the present application, the system calls the hardware configuration information reading module to extract the processor model and sensor state from the stored hardware configuration information. The processor model is stored in the form of a string, and the sensor state is recorded in the form of a state code, which contains information about whether the sensor is working normally and the current working mode. These information are stored in the non-volatile storage unit of the device, and the system loads them into the memory through a read operation for subsequent processing. Subsequently, the system calls the function support judgment module to determine the power management function, user interface function and background service function supported by the processor based on the sensor state. The module queries the preset function support database, which stores the mapping relationship between different sensor states and processor supported functions. For example, if the sensor state code indicates that the sensor is working normally and in high power consumption mode, the processor supports advanced power management function; if the sensor state code indicates that the sensor is in low power consumption mode, the processor only supports basic power management function. The judgment of user interface function and background service function is also based on the matching result of sensor state code and function support database. The system stores the judgment result in the function support list, which records each function supported by the processor. Then, the system calls the function dependency relationship establishment module to establish the dependency relationship between the functions supported by the processor. The module calls the preset function dependency rule library, which defines the sequence and dependency conditions between functions. For example, the power management function is the basis of the user interface function and the background service function, the user interface function depends on the power management function to provide stable power support, and the background service function depends on the power management function and the user interface function to provide a running environment. The module generates a function dependency relationship graph according to the function support list and the function dependency rule library, which represents the dependency relationship between functions in the form of a directed graph. Then, the system calls the priority assignment module to assign a priority value to each function according to the dependency relationship between functions. The module assigns the highest priority value (for example, priority value 1) to the power management function, the medium priority value (for example, priority value 2) to the user interface function, and the lowest priority value (for example, priority value 3) to the background service function according to the preset priority assignment rule. The priority value is used to represent the execution order of the function in the upgrade task sequence, and the lower the priority value, the higher the priority. The module associates the priority value with each function in the function support list and stores it in the function priority table. Finally, the system calls the upgrade task sequence generation module to generate an upgrade task sequence according to the function dependency relationship and the priority value. The module analyzes the function dependency relationship graph and the function priority table, arranges the upgrade tasks of each function in order from low to high (i.e. from high to low priority) according to the priority value, and combines the dependency relationship between functions.For example, the power management function will be arranged at the first position of the upgrade task sequence due to the highest priority and being the basis of other functions; the user interface function will be arranged after the power management function due to the dependence on the power management function and the second priority; the background service function will be arranged at the last position of the upgrade task sequence due to the lowest priority and the dependence on the first two functions. The generated upgrade task sequence is stored in the form of a task list, each task containing the function name, the priority value and the dependence information, providing a clear operation sequence for the subsequent software upgrade process.
[0125] Especially important is that the dependence between the processor-supported functions is established including;
[0126] A list of processor-supported functions is generated, including the power management function, the user interface function and the background service function;
[0127] A unique identifier is assigned to each function, and the identifier is associated with the function name;
[0128] The power management function is assigned a priority value of 1, the user interface function is assigned a priority value of 2, and the background service function is assigned a priority value of 3;
[0129] After the dependence graph is generated, it is checked whether there is a redundant dependence in the graph;
[0130] If there is a redundant dependence, the redundant dependence is removed, and the dependence graph is optimized;
[0131] It is detected whether there is a circular dependence in the dependence graph, and if a circular dependence is detected, the path of the circular dependence is recorded.
[0132] In the embodiment of the present application, the system calls the function list generation module to generate a list of functions supported by the processor according to the processor model and sensor status. The function list includes power management functions, user interface functions, and background service functions. The function names are stored in the function list data structure in the form of strings. For example, the power management function is named "PowerManagement", the user interface function is named "UserInterface", and the background service function is named "BackgroundService". Then, the system assigns a unique identifier to each function and associates the identifier with the function name. The unique identifier is in the format of UUID (Universally Unique Identifier) and is generated by calling the UUID generation algorithm. For example, the unique identifier of the power management function is "UUID-12345678-1234-1234-1234-123456789012", the unique identifier of the user interface function is "UUID-23456789-2345-2345-2345-234567890123", and the unique identifier of the background service function is "UUID-34567890-3456-3456-3456-345678901234". The system stores the function name and the corresponding unique identifier in the function mapping table for subsequent operations. Next, the system assigns a priority value to each function. The power management function is assigned a priority value of 1, the user interface function is assigned a priority value of 2, and the background service function is assigned a priority value of 3. The priority value is stored in the function priority table in the form of an integer and is associated with the unique identifier of the function. For example, the function priority table records the following information: UUID-12345678-1234-1234-1234-123456789012 (power management function) corresponds to priority value 1, UUID-23456789-2345-2345-2345-234567890123 (user interface function) corresponds to priority value 2, and UUID-34567890-3456-3456-3456-345678901234 (background service function) corresponds to priority value 3. After generating the dependency graph, the system calls the dependency optimization module to check whether there are redundant dependencies in the graph. The dependency graph is stored in the form of a directed graph, with nodes representing functions and edges representing dependencies. The module checks whether there are duplicate dependency paths by traversing the dependency graph. For example, if function A depends on function B and function B also depends on function A, this bidirectional dependency is considered redundant. The module detects redundant dependencies by using a topological sorting algorithm, and if redundant dependencies are found, removes the redundant edges and optimizes the dependency graph. The optimized dependency graph is stored in the optimized dependency data structure. Finally, the system calls the circular dependency detection module to detect whether there are circular dependencies in the dependency graph.The module traverses the dependency graph by a depth first search (DFS) algorithm and records the traversal path. If a node is found to have been visited and the traversal is not completed, it indicates a circular dependency. For example, if function A depends on function B, function B depends on function C, and function C depends on function A, a circular dependency path is formed. The module records the circular dependency path in a circular dependency path list for subsequent analysis and processing.
[0133] Preferably, in step S3, the components of the home appliance are upgraded in sequence according to the upgrade task sequence, and during the upgrade file transmission process, the signal strength and transmission rate of the communication interface are monitored in real time, including:
[0134] According to the upgrade task sequence, the components of the home appliance are upgraded in sequence;
[0135] During the upgrade process, the upgrade status and time stamp of each component are recorded;
[0136] For each component, the following operations are performed: reading the current version information of the component; comparing the current version with the target version to determine the content that needs to be updated, generating a differential update package, and only transmitting the necessary update content to reduce the data volume; applying the differential update package to the component to complete the upgrade, and recording the version information and status after the upgrade;
[0137] During the upgrade file transmission process, the signal strength and transmission rate of the communication interface are monitored in real time.
[0138] In the embodiment of the present application, the system calls the upgrade task scheduling module to perform upgrade operation on the components of the home appliance in sequence according to the pre-generated upgrade task sequence. The upgrade task sequence is stored in the form of a task list, each task containing component name, priority value and dependency information. The system extracts the component information of the current component to be upgraded from the task sequence and starts the upgrade operation. During the upgrade process, the system calls the state recording module to record the upgrade state and timestamp for each component upgrade operation. The upgrade state includes state codes such as "start upgrade", "upgrade in progress", "upgrade complete" or "upgrade failure", and the timestamp records the start time and end time of the upgrade operation in UTC time format. These information is stored in the upgrade state log for subsequent query and analysis. For each component, the system first calls the version information reading module to read the current version information of the component by accessing the version management interface of the component. The current version information includes version number, build date and version description, etc. fields, stored in the form of a string. Then, the system calls the version comparison module to compare the read current version information with the target version information. The target version information is stored in the upgrade task sequence and is associated with the component name. The comparison module compares the version number, build date and other information by field to determine the content that needs to be updated. According to the comparison result, the system calls the differential update package generation module to generate a differential update package. The differential update package generation module analyzes the differences between the current version file and the target version file through a binary comparison algorithm, extracts only the code snippets, configuration parameters and resource files that need to be updated, and generates a differential update package. The differential update package is stored in a compressed format and contains the necessary update content and instruction scripts for applying the update, in order to reduce the data transmission volume. Then, the system calls the upgrade application module to apply the differential update package to the component. The application process includes decompressing the differential update package and executing the instruction script to replace or update the related files and parameters in the component. During the application process, the system monitors the running state of the component in real time to ensure the correctness of the update operation. After the upgrade is completed, the system calls the version information reading module again to read the post-upgrade version information of the component, and records the post-upgrade version number, state code and completion timestamp in the upgrade state log. During the upgrade file transmission process, the system calls the communication interface monitoring module to monitor the signal strength and transmission rate of the communication interface in real time. The signal strength is measured by the received signal strength indication (RSSI) value of the communication interface, and the transmission rate is calculated by monitoring the amount of data transmitted per unit time. The communication interface monitoring module predefines threshold values for signal strength and transmission rate, such as RSSI value not less than -70 dBm and transmission rate not less than 100 kbps. If the signal strength or transmission rate is lower than the threshold value, the system will record the abnormal situation and adjust the transmission parameters according to the pre-set communication strategy, such as reducing the transmission rate or switching the communication frequency band, to ensure stable transmission of the upgrade file.
[0139] Especially important is that, in the process of upgrading file transmission, the signal strength and transmission rate of the communication interface are monitored in real time, including:
[0140] In the process of upgrading file transmission, the signal strength of the communication interface is monitored once per second;
[0141] If the signal strength is lower than -70dBm, record the warning information and mark the time point as a potential communication instability point;
[0142] In the process of upgrading file transmission, the transmission rate of the communication interface is monitored once per second;
[0143] If the transmission rate is lower than 100kbps, record the warning information and mark the time point as a potential communication instability point;
[0144] The monitored signal strength and transmission rate data are stored in the log file of the device, wherein the log file includes a time stamp, a signal strength value and a transmission rate value.
[0145] In the embodiment of the present application, a system call communication interface monitoring module is provided. The module acquires real-time state information of the communication interface by interacting with the communication interface hardware driver. During the upgrade file transmission process, the monitoring module monitors the signal strength of the communication interface at a frequency of once per second. The signal strength is measured by the received signal strength indication (RSSI) value of the communication interface, and the RSSI value is measured in decibels-milliwatts (dBm). The monitoring module reads the RSSI value in the communication interface hardware state register. If the RSSI value is lower than -70 dBm, it is determined that the signal strength is weak, and there is a risk of unstable communication. At this time, the monitoring module calls the warning information recording module to record the warning information containing the time stamp, and marks the time point as a potential unstable communication point. The time stamp is recorded in UTC time format, accurate to seconds. At the same time, the monitoring module monitors the transmission rate of the communication interface at a frequency of once per second. The transmission rate is determined by calculating the amount of data transmitted per unit time, and is measured in kilobits per second (kbps). The monitoring module calculates the amount of data transmitted per second by reading the traffic counter of the communication interface. If the transmission rate is lower than 100 kbps, it is determined that the transmission rate is too low, and there is also a risk of unstable communication. At this time, the monitoring module again calls the warning information recording module to record the warning information containing the time stamp, and marks the time point as a potential unstable communication point. The monitoring module stores the signal strength and transmission rate data monitored each time in the log file of the device. The log file is stored in text format, and each record contains a time stamp, a signal strength value and a transmission rate value. The time stamp is used to identify the specific time of the data record, the signal strength value is recorded in dBm, and the transmission rate value is recorded in kbps. The format of the log file is: time stamp (UTC format) | signal strength value (dBm) | transmission rate value (kbps). For example, a record is: "2025-07-06T12:34:56Z|-68dBm|120kbps".
[0146] Preferably, the step S3 of dynamically adjusting the communication protocol according to the signal strength and the transmission rate comprises:
[0147] For the case where the signal strength is higher than -70 dBm, it is marked as high signal strength; for the case where the signal strength is between -70 dBm and -80 dBm, it is marked as medium signal strength; for the case where the signal strength is lower than -80 dBm, it is marked as low signal strength;
[0148] For the case where the transmission rate is higher than 100 kbps, it is marked as high transmission rate; for the case where the transmission rate is between 50 kbps and 100 kbps, it is marked as medium transmission rate; for the case where the transmission rate is lower than 50 kbps, it is marked as low transmission rate;
[0149] If the signal strength is high and the transmission rate is high, the standard Wi-Fi protocol is selected; if the signal strength is medium and the transmission rate is medium, the Bluetooth protocol is selected; if the signal strength is low and the transmission rate is low, the Wi-Fi Direct protocol is selected.
[0150] In the embodiment of the application, the system calls a communication state classification module, which classifies the signal strength and the transmission rate by reading the real-time data of the communication interface monitoring module. For the signal strength, the module classifies it into three levels: high signal strength, medium signal strength and low signal strength. The specific classification criteria are as follows: if the signal strength is higher than -70 dBm, it is marked as high signal strength; if the signal strength is between -70 dBm and -80 dBm, it is marked as medium signal strength; and if the signal strength is lower than -80 dBm, it is marked as low signal strength. For the transmission rate, the module also classifies it into three levels: high transmission rate, medium transmission rate and low transmission rate. The specific classification criteria are as follows: if the transmission rate is higher than 100 kbps, it is marked as high transmission rate; if the transmission rate is between 50 kbps and 100 kbps, it is marked as medium transmission rate; and if the transmission rate is lower than 50 kbps, it is marked as low transmission rate. Then, the system calls a communication protocol selection module to select a suitable communication protocol according to the classification results of the signal strength and the transmission rate. The module queries a pre-set protocol selection rule table to select a corresponding communication protocol according to the combination of the signal strength and the transmission rate. The specific rules are as follows: if the signal strength is high and the transmission rate is high, the standard Wi-Fi protocol is selected; if the signal strength is medium and the transmission rate is medium, the Bluetooth protocol is selected; and if the signal strength is low and the transmission rate is low, the Wi-Fi Direct protocol is selected. The protocol selection module sends the configuration parameters of the selected communication protocol to the communication interface control module, which adjusts the protocol settings of the communication interface. According to the received protocol configuration parameters, the communication interface control module modifies the working mode and parameter settings of the communication interface by calling the hardware driver interface of the communication interface. For the standard Wi-Fi protocol, the module configures the communication interface to be in the regular Wi-Fi mode and sets appropriate channel and bandwidth parameters; for the Bluetooth Low Energy (BLE) protocol, the module switches the communication interface to the BLE mode and optimizes the power consumption management parameters; and for the Wi-Fi Direct protocol, the module configures the communication interface to be in the Wi-Fi Direct mode and adjusts the group management parameters and device discovery parameters. After completing the protocol settings, the communication interface control module feeds back a setting completion signal to the communication protocol selection module to ensure that the communication interface works normally according to the selected protocol.
[0151] Preferably, step S4 comprises the following steps:
[0152] Step S41: Calculate the checksum of the transmitted data every second during the upgrade file transmission process; compare the calculated checksum with the checksum fed back by the receiving end; if the checksums are inconsistent, record the position and timestamp of the data loss;
[0153] Step S42: When data loss is detected, record the last successfully transmitted data block number and position, and store the breakpoint information in the temporary storage area of the device;
[0154] Step S43: Continue transmitting the remaining data blocks from the recorded breakpoint, and recheck each data block during the transmission process;
[0155] Step S44: After each component upgrade is completed, send a cooperative work verification signal to the upgraded component; receive the response signal from the upgraded component to verify the integrity of the communication link and the accuracy of the data transmission;
[0156] Step S45: If the verification fails, record the failure information and try to resend the verification signal, up to three times;
[0157] Step S46: If the three verifications all fail, pause the upgrade process and prompt the user with cooperative work exception information.
[0158] In the embodiment of the present application, during the upgrade file transmission process, the system calls the data verification module, which calculates the checksum of the transmitted data once per second. The checksum calculation uses the cyclic redundancy check (CRC) algorithm, which generates a fixed-length checksum value by performing CRC calculation on the current data block being transmitted. At the same time, the receiving end also performs the same CRC calculation on the received data block and feeds back the calculated checksum to the sending end. The data verification module of the sending end compares the checksum calculated by itself with the checksum fed back by the receiving end. If the checksums are inconsistent, it indicates that data loss or damage has occurred during transmission. At this time, the data verification module records the position of the data loss, including the data block number and the offset in the data stream, as well as the timestamp of the data loss, which is accurate to milliseconds in UTC time format. These information is stored in the device's log file for subsequent analysis. When detecting data loss, the system calls the breakpoint recording module, which records the last successful transmission data block number and position. The data block number is the serial number of the data block in the transmission data stream, and the position refers to the starting sector number in the storage medium or the offset in the file. The breakpoint information is stored in the temporary storage area of the device, such as a specific buffer in the memory or a temporary partition in the non-volatile memory. The breakpoint information is stored in a structured data format, including data block number, position information, and timestamp. Subsequently, the system calls the data recovery module, which continues to transmit the remaining data blocks from the recorded breakpoint. During the recovery transmission process, the data recovery module re-performs CRC verification on each data block. The purpose of re-verification is to ensure that subsequent transmitted data blocks do not have new errors during transmission. If a new data block is found to have failed verification, the system repeats the above recording and recovery operations until all data blocks are successfully transmitted and verified. After each component upgrade is completed, the system calls the cooperative work verification module, which sends a cooperative work verification signal to the upgraded component. The verification signal contains specific test instructions and data for detecting the integrity of the communication link between components and the accuracy of data transmission. After receiving the verification signal, the upgraded component performs the corresponding operation and returns a response signal. The response signal contains the execution result and status code, and the cooperative work verification module analyzes the received response signal to determine whether the verification is passed. If the verification fails, the cooperative work verification module records the failure information, including the name of the failed component, the reason for the failure, and the timestamp. Subsequently, the module attempts to resend the verification signal, up to three times. There is a preset time interval between each attempt, for example, 1 second. If three verifications fail, the system calls the upgrade flow control module to pause the upgrade process. At the same time, the system calls the user interaction module to prompt the user with cooperative work exception information. The prompt information is displayed through the device's display interface or user terminal, and the content includes the name of the abnormal component, the reason for the abnormality, and the recommended solution. The prompt information is presented in text form to ensure that the user can clearly understand the problems that occur during the upgrade process.
[0159] The present specification also provides an upgrading system for home appliance control software for executing the upgrading method for home appliance control software as described above, which comprises:
[0160] a hardware configuration information collection module for collecting the processor model, storage capacity, communication interface type and sensor state of the device to form hardware configuration information before the device starts the software upgrading process;
[0161] a memory resource allocation module for judging whether the device hardware meets the preset running requirements of the new version software based on the hardware configuration information, suspending the upgrading process if it does not meet the requirements and prompting the user with hardware incompatibility information, and evaluating the memory resource of the storage space of the home appliance according to the hardware configuration information if it meets the requirements, cleaning up temporary files, cache data and redundant information in the device and allocating memory resources according to the processor model and memory resource if the memory resource of the storage space is insufficient;
[0162] an upgrading operation module for determining the functional dependency relationship and upgrading priority of each component of the home appliance according to the hardware configuration information and generating an upgrading task sequence, and performing upgrading operation on the components of the home appliance in sequence according to the upgrading task sequence and monitoring the signal strength and transmission rate of the communication interface in real time during the upgrading file transmission process, and dynamically adjusting the communication protocol according to the signal strength and transmission rate;
[0163] an upgrading communication process detection module for detecting data loss during the communication process, continuing to transmit the remaining data from the last successful transmission interruption point if communication interruption or data loss is detected, and verifying the communication and cooperative working state with other upgraded components after each component is upgraded.
[0164] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the present application being defined by the appended claims and not by the above description, and it is intended to encompass all variations falling within the meaning and range of equivalents of the elements of the application file.
[0165] The above description is merely one specific implementation of the application, which enables those skilled in the art to understand or implement the application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application shall not be limited to these embodiments shown herein, but shall conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for upgrading software for controlling a home appliance, characterized by, The method comprises the following steps: Step S1: Before starting the software upgrade process of the home appliance, the processor model, storage capacity, communication interface type and sensor state of the device are collected to form hardware configuration information; Step S2: Based on the hardware configuration information, it is judged whether the device hardware meets the preset running requirements of the new version software. If not, the upgrade process is suspended, and the user is prompted with hardware incompatibility information. If yes, the memory resources of the storage space of the home appliance are evaluated according to the hardware configuration information; If the memory resources of the storage space are insufficient, the temporary files, cache data and redundant information in the device are cleaned up, and the memory resources are allocated according to the processor model and memory resources; Step S3: The functional dependency relationship and upgrade priority of each component of the home appliance are determined according to the hardware configuration information, and an upgrade task sequence is generated. According to the upgrade task sequence, the components of the home appliance are upgraded in turn, and the signal strength and transmission rate of the communication interface are monitored in real time during the upgrade file transmission process; The communication protocol is dynamically adjusted according to the signal strength and transmission rate; The generation of the upgrade task sequence comprises: Reading the processor model and sensor state in the hardware configuration information; Based on the sensor state, the power management function, user interface function and background service function supported by the processor are determined; The dependency relationship between the functions supported by the processor is established; the dependency relationship between the functions supported by the processor comprises: Generating a list of functions supported by the processor, including power management function, user interface function and background service function; Assigning a unique identifier to each function and associating the identifier with the function name; Assigning a priority value of 1 to the power management function, a priority value of 2 to the user interface function, and a priority value of 3 to the background service function; After generating the dependency graph, it is checked whether there is redundant dependency relationship in the graph; If there is redundant dependency relationship, remove the redundant dependency relationship and optimize the dependency graph; Detecting whether there is a circular dependency in the dependency graph, and if a circular dependency is detected, recording the path of the circular dependency; According to the dependency relationship between the functions, a priority value is assigned to each function. The power management function is assigned the highest priority value, the user interface function is assigned a medium priority value, and the background service function is assigned the lowest priority value; According to the function dependency relationship and the priority value, an upgrade task sequence is generated; Step S4: Detecting data loss during communication, if communication interruption or data loss is detected, continue transmitting the remaining data from the last successful transmission breakpoint, and verify the communication and cooperative working state with other upgraded components after each component is upgraded.
2. The method for upgrading the software for controlling the home appliance according to claim 1, wherein, Step S1 comprises the following steps: Step S11: Extract the unique identifier of the processor from the system information of the home appliance, and match the extracted unique identifier with the preset processor model database to determine the processor model; Step S12: Scan the storage partitions of the home appliance, identify the total capacity and used capacity of each partition, calculate the remaining available space of each partition, and aggregate the available space of all partitions to generate the storage capacity; Step S13: Detect the communication port status of the home appliance and identify the type of the currently connected communication interface; Step S14: Detect the response signal of each sensor in the home appliance and record the response strength and response time of the sensor; determine the working status of each sensor based on the response strength and response time of the sensor.
3. The method for upgrading the software for controlling the home appliance according to claim 1, wherein, In step S2, based on the hardware configuration information, it is determined whether the device hardware meets the preset operating requirements of the new version of the software. If it does not meet the requirements, the upgrade process is paused, and the user is prompted with hardware incompatibility information, including: The processor model is compared with the list of processor models supported by the new version of the software. The processor compatibility is tested by simulating the running environment to determine whether the processor meets the running requirements of the new version of the software. Compare the storage capacity with the minimum storage space required by the new version of the software to determine whether the storage capacity meets the running requirements of the new version of the software; Compare the communication interface type with the communication interface types supported by the new version of the software to determine whether the communication interface meets the operating requirements of the new version of the software. Compare the sensor status with the requirements of the new software version to determine whether the sensor meets the operating requirements of the new software version. If any of the processor model, storage capacity, communication interface type, or sensor status does not meet the preset requirements for running the new version of the software, the upgrade process will be paused, and the user will be prompted with hardware incompatibility information.
4. The method for upgrading the software for controlling the home appliance according to claim 1, wherein, If the conditions are met in step S2, then the storage space memory resources of the home appliance are evaluated based on the hardware configuration information, including: The storage partition table of the home appliance is read through the hardware interface to obtain the start and end sectors of each partition; Read the FAT32, NTFS, and exFAT file system types for each partition; Read the total capacity and used capacity of each partition, and calculate the remaining available space; The current memory usage can be obtained by reading the memory management unit of the home appliance through the hardware interface. Identify the process ID, physical memory and virtual memory used to determine current memory usage, and record the currently used memory and remaining available memory.
5. The method for upgrading the software of the home appliance control according to claim 1, wherein, If storage space memory resources are insufficient in step S2, temporary files, cached data, and redundant information in the device are cleaned up, and memory resources are allocated according to the processor model and memory resources, including: Identify and locate the temporary file storage path in home appliances, and read the creation time and size of the temporary files; Delete temporary files that were created more than 24 hours ago or whose size exceeds 50MB; Identify and locate the cache data storage path in home appliances, and read the last access time and cache data size of the cache data; Delete cached data that was last accessed more than 7 days ago or whose size exceeds 200MB; Identify and locate redundant information storage paths in home appliances, and delete duplicate file copies; Determine the minimum memory required for the new version of the software based on the processor model and memory resources; allocate memory space for the new version of the software based on the minimum memory required.
6. The method for upgrading the software for controlling the home appliance according to claim 1, wherein, In step S3, the components of the home appliances are upgraded sequentially according to the upgrade task sequence. During the upgrade file transfer process, the signal strength and transmission rate of the communication interface are monitored in real time, including: According to the upgrade task sequence, the components of the home appliance are sequentially upgraded; During the upgrade process, the upgrade status and timestamp of each component are recorded; For each component, the following operations are performed: reading the current version information of the component; comparing the current version with the target version to determine the content that needs to be updated, generating a differential update package, and only transmitting the necessary update content to reduce data volume; applying the differential update package to the component to complete the upgrade, and recording the version information and status after the upgrade; During the upgrade file transmission process, the signal strength and transmission rate of the communication interface are monitored in real time.
7. The method for upgrading the software of a home appliance control according to claim 1, wherein, The dynamic adjustment of the communication protocol in step S3 according to the signal strength and transmission rate includes: For the case where the signal strength is higher than -70 dBm, it is marked as high signal strength; for the case where the signal strength is between -70 dBm and -80 dBm, it is marked as medium signal strength; for the case where the signal strength is lower than -80 dBm, it is marked as low signal strength; For the case where the transmission rate is higher than 100 kbps, it is marked as high transmission rate; for the case where the transmission rate is between 50 kbps and 100 kbps, it is marked as medium transmission rate; for the case where the transmission rate is lower than 50 kbps, it is marked as low transmission rate; If the signal strength is high and the transmission rate is high, the standard Wi-Fi protocol is selected; if the signal strength is medium and the transmission rate is medium, the Bluetooth protocol is selected; if the signal strength is low and the transmission rate is low, the Wi-Fi Direct protocol is selected.
8. The method for upgrading the software of a home appliance control according to claim 1, wherein, Step S4 includes the following steps: Step S41: During the upgrade file transmission process, the checksum of the transmitted data is calculated once per second; the calculated checksum is compared with the checksum fed back by the receiving end; if the checksums are inconsistent, the position and timestamp of the data loss are recorded; Step S42: When data loss is detected, the last successfully transmitted data block number and position are recorded, and the breakpoint information is stored in the temporary storage area of the device; Step S43: From the recorded breakpoint, the remaining data blocks are continued to be transmitted, and each data block is re-verified during the transmission process; Step S44: After each component is upgraded, a cooperative work verification signal is sent to the upgraded component; the response signal of the upgraded component is received to verify the integrity of the communication link and the accuracy of data transmission; Step S45: If the verification fails, the failure information is recorded, and the verification signal is re-sent for a maximum of three times; Step S46: If all three verifications fail, the upgrade process is suspended, and the user is prompted with cooperative work abnormal information.
9. An upgrading system for home appliance control software, characterized by, The upgrade system for the home appliance control software includes: A hardware configuration information acquisition module is configured to acquire the processor model, storage capacity, communication interface type, and sensor state of the device before the device starts the software upgrade process, and form hardware configuration information; The memory resource allocation module is configured to determine whether the device hardware meets the running requirements of the preset new version software based on the hardware configuration information, suspend the upgrading process if the requirements are not met, and prompt the user with hardware incompatibility information; if the requirements are met, evaluate the memory resource of the storage space of the home appliance device according to the hardware configuration information; if the memory resource of the storage space is insufficient, clean up the temporary files, cache data and redundant information in the device, and allocate memory resources according to the processor model and memory resource; The upgrading operation module is configured to determine the functional dependency relationship and the upgrading priority of each component of the home appliance device according to the hardware configuration information, and generate an upgrading task sequence; sequentially perform upgrading operations on the components of the home appliance device according to the upgrading task sequence, and monitor the signal strength and transmission rate of the communication interface in real time during the upgrading file transmission process; and dynamically adjust the communication protocol according to the signal strength and transmission rate; The upgrading communication process detection module is configured to detect data loss during communication, continue to transmit the remaining data from the last successful transmission interruption point if communication interruption or data loss is detected, and verify the communication and cooperative working state with other upgraded components after each component is upgraded.
Citation Information
Patent Citations
OBD terminal upgrading method, system and equipment and storage medium
CN118193015A
Software upgrading method and system of Internet of Things terminal
CN120128469A