Data processing method, device, system and related equipment

Through the automated upgrade test method of embedded device processor, the high cost and low efficiency problems caused by manual operations are solved, and the automated upgrade test of embedded devices is realized, which improves testing efficiency and reduces costs.

CN118689518BActive Publication Date: 2025-07-25APUTURE IMAGING IND CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411157337.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-07-25
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

In the prior art, the upgrade testing of embedded devices relies on manual methods, resulting in large labor consumption and low testing efficiency, and the inability to fully utilize the characteristics of the equipment itself.

Method used

The processor of the embedded device runs the application and boot loader cycle through the processor, judges the startup and upgrade conditions of the upgrade task, and writes upgrade data in the fixed address area to realize automated upgrade testing.

Benefits of technology

It realizes automated upgrade testing without manual operation, reduces manual operation links, improves testing efficiency and reduces testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689518B_ABST
    Figure CN118689518B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, apparatus, system and related devices. The method is applied to a processor, which includes a storage area. The storage area includes an application area, a bootloader area and a fixed address area. The application area stores an application, and the bootloader area stores a bootloader; specifically, it includes: running the application, and determining whether the embedded device meets the startup conditions of the upgrade task; if so, receiving upgrade data for the application sent by the host computer, and writing startup data reflecting the upgrade task in the fixed address area; running the bootloader, and determining whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrading the application based on the upgrade data, and writing completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; repeatedly running the application and the bootloader until the written startup data and / or completion data meet the test completion criteria.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of embedded device upgrade testing, and particularly relates to a data processing method, apparatus, system, and related devices. Background Art

[0002] Whether the upgrade process of an embedded device is stable is a key factor for the successful upgrade of its firmware. For the upgrade testing of embedded devices, in related technologies, it is usually tested and recorded manually, which consumes a large amount of manpower and has low testing efficiency, and cannot make full use of the characteristics of the embedded device itself for upgrade testing. Summary of the Invention

[0003] This application provides a data processing method, apparatus, system, and related devices, aiming to make full use of the characteristics of the embedded device itself for upgrade testing, improve testing efficiency, and reduce testing costs.

[0004] In a first aspect, this application provides a data processing method, which is applied to a processor of an embedded device. The processor includes a storage area, and the storage area includes an application program area, a bootloader area, and a fixed address area. The application program area stores an application program, and the bootloader area stores a bootloader program. The method includes:

[0005] Run the application program, and determine whether the embedded device meets the startup conditions of the upgrade task;

[0006] If so, receive the upgrade data for the application program sent by the host computer, and write startup data reflecting the upgrade task in the fixed address area;

[0007] Run the bootloader program, and determine whether the embedded device meets the upgrade conditions of the upgrade task;

[0008] If so, upgrade the application program based on the upgrade data, and write completion data reflecting the upgrade task in the fixed address area after the upgrade is completed;

[0009] Loop to run the application program and the bootloader program until the written startup data and / or completion data meet the test completion criteria.

[0010] In a second aspect, this application provides a data processing system, including an embedded device and a host computer. The embedded device is connected to the host computer. The embedded device includes a processor, and the processor includes a storage area. The storage area includes an application program area, a bootloader area, and a fixed address area. The application program area stores an application program, and the bootloader area stores a bootloader program;

[0011] The host computer is used to periodically detect whether the embedded device is in an idle state, and when the embedded device is in an idle state, send upgrade data to the embedded device;

[0012] The processor is used to run the application program, and determine whether the embedded device meets the startup condition of the upgrade task; if so, receive the upgrade data for the application program sent by the host computer, and write startup data reflecting the upgrade task in the fixed address area;

[0013] The processor is also used to run the bootloader, and determine whether the embedded device meets the upgrade condition of the upgrade task; if so, upgrade the application program based on the upgrade data, and write completion data reflecting the upgrade task in the fixed address area after the upgrade is completed;

[0014] The processor is also used to loop and run the application program and the bootloader until the written startup data and / or completion data meet the test completion standard.

[0015] In a third aspect, the present application provides a data processing device, which is applied to an embedded device and includes:

[0016] An application program module, which is used to determine whether the embedded device meets the startup condition of the upgrade task; if so, receive the upgrade data for the application program sent by the host computer, and write startup data reflecting the upgrade task in the fixed address module;

[0017] A bootloader module, which is used to determine whether the embedded device meets the upgrade condition of the upgrade task; if so, upgrade the application program based on the upgrade data, and write completion data reflecting the upgrade task in the fixed address module after the upgrade is completed;

[0018] A fixed address module, which is used to record the startup data and the completion data;

[0019] A loop module, which is used to loop and start the application program module and the bootloader module until the written startup data and / or completion data meet the test completion standard.

[0020] In a fourth aspect, the present application further provides an embedded device, and the embedded device includes:

[0021] A processor;

[0022] And

[0023] One or more computer programs, wherein the one or more computer programs are stored in the processor and configured to be executed by the processor to implement a data processing method.

[0024] In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is loaded by a processor to execute steps in the data processing method.

[0025] In a sixth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, steps in the data processing method are performed.

[0026] In the embodiments of the present application, by the processor running in a loop the application program stored in the application program area and the bootloader stored in the bootloader area. Specifically, by running the application program to determine whether the embedded device meets the startup conditions for the upgrade task, and when the startup conditions for the upgrade task are met, receiving the upgrade data for the application program sent by the host computer, and writing the startup data reflecting the upgrade task in the fixed address area; by running the bootloader to determine whether the embedded device meets the upgrade conditions for the upgrade task, and when the upgrade conditions for the upgrade task are met, upgrading the application program based on the upgrade data, and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; until the written startup data and / or completion data meet the criteria for test completion, it realizes that the embedded device can perform automated upgrade testing without manual operation, making full use of the characteristics of the embedded device itself. Therefore, it reduces the manual operation link, improves the test efficiency, and reduces the test cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0028] Figure 1 is a schematic diagram of the scenario of the data processing system provided by the embodiment of the present application;

[0029] Figure 2 is a schematic flowchart of an embodiment of the data processing method provided by the embodiment of the present application;

[0030] Figure 3 is a schematic structural diagram of an embodiment of the data processing device provided by the embodiment of the present application;

[0031] Figure 4It is a schematic structural diagram of an embodiment of an embedded device provided in an embodiment of the present application. Detailed implementation manners

[0032] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a 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 those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0033] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation to the present application. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more, unless otherwise specifically defined.

[0034] In the present application, the term "exemplary" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "exemplary" in the present application is not necessarily to be construed as more preferred or more advantageous than other embodiments. In order for any person skilled in the art to implement and use the present application, the following description is given. In the following description, details are set forth for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can be implemented without the use of these specific details. In other instances, well-known structures and processes are not described in detail to avoid unnecessary details from obscuring the description of the present application. Therefore, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the present application.

[0035] The embodiments of the present application provide a data processing method, device, system and related equipment, which will be described in detail below respectively.

[0036] As Figure 1 shown, Figure 1It is a schematic diagram of the scenario of the data processing system provided by an embodiment of the present application. The data processing system may include an embedded device 100 and a host computer 200. The embedded device 100 is connected to the host computer 200. The embedded device includes a processor, and the processor includes a storage area. The storage area includes an application area, a bootloader area, and a fixed address area. The application area stores an application program, and the bootloader area stores a bootloader program;

[0037] The host computer 200 is used to periodically detect whether the embedded device is in an idle state, and when the embedded device is in an idle state, send upgrade data to the embedded device;

[0038] The processor is used to run the application program and determine whether the embedded device meets the startup conditions of the upgrade task; if so, receive the upgrade data for the application program sent by the host computer, and write startup data reflecting the upgrade task in the fixed address area;

[0039] Run the bootloader program and determine whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrade the application program based on the upgrade data, and write completion data reflecting the upgrade task in the fixed address area after the upgrade is completed;

[0040] Loop to run the application program and the bootloader program until the written startup data and / or completion data meet the criteria for test completion.

[0041] Among them, the host computer 200 generally refers to a computer system used to control or monitor a lower computer (such as the embedded device 100). It can exchange data with the lower computer through various communication protocols (such as serial port, CAN bus, USB, etc.). During the firmware upgrade process, the host computer 200 is responsible for sending upgrade data (including firmware) to the embedded device 100 and ensuring that these firmware are correctly received and executed. The embedded device 100 refers to a dedicated hardware device integrated with an operating system and an application program. They are usually used to perform specific tasks, such as controlling other devices, processing sensor data, etc. In the scenario of firmware upgrade, the embedded device 100 refers to a processor or other type of dedicated hardware device that needs to update its firmware to improve functions or fix known problems.

[0042] In actual operation, the host computer 200 can communicate with the embedded device 100 in a wired or wireless manner to achieve the transmission of firmware.

[0043] Among them, the start condition of the upgrade task is the main judgment basis for whether the embedded device can enter the upgrade process normally. Specifically, the start condition of this upgrade task can be that the processor (Central Processing Unit, CPU) of the embedded device is in an "idle state".

[0044] Specifically, when the processor of the embedded device is in an idle state, it usually means that the processor has no tasks or workloads to process temporarily, so it is in a state of waiting for new tasks to arrive or be executed. In this state, the processor may reduce its working frequency or voltage to reduce power consumption; the processor may stop executing instructions, but still maintain the ability to monitor external events or interrupts. Once there is a new task to process, it will quickly return to the normal working state; the processor may enter a deeper low-power mode (such as sleep mode), in which most of the functions of the processor will pause, and only a few key functions remain active for quick recovery.

[0045] Therefore, when the embedded device 100 is in an idle state, that is, when the embedded device meets the start condition of the upgrade task, the host computer 200 can use this opportunity to send upgrade data to trigger the upgrade task of the embedded device, so as to ensure that the device can perform firmware update without affecting its key functions.

[0046] In addition, the embedded device 100 also has the functions in the data processing method as follows. For specific details, please refer to the following specific embodiments and will not be elaborated here.

[0047] In the embodiment of the present application, the processor runs the application program stored in the application program area and the bootloader stored in the bootloader area in a loop. Specifically, by running the application program to determine whether the embedded device meets the start condition of the upgrade task, and when the start condition of the upgrade task is met, receiving the upgrade data for the application program sent by the host computer, and writing the start data reflecting the upgrade task in the fixed address area; by running the bootloader to determine whether the embedded device meets the upgrade condition of the upgrade task, and when the upgrade condition of the upgrade task is met, upgrading the application program based on the upgrade data, and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; until the written start data and / or completion data meet the test completion standard, the automatic upgrade test of the embedded device can be realized without manual operation, making full use of the characteristics of the embedded device itself. Therefore, the manual operation link is reduced, the test efficiency is improved, and the test cost is reduced.

[0048] Those skilled in the art can understand, Figure 1The application environment shown is merely one application scenario of the solution of this application, and does not constitute a limitation on the application scenario of the solution of this application. Other application environments may also include more or fewer host computers and / or embedded devices than those shown in Figure 1 For example, there may be more or fewer host computers and / or embedded devices than those shown in Figure 1 Only 1 host computer and embedded device are shown in . It can be understood that this data processing system may also include one or more other embedded devices, which are not specifically limited here.

[0049] It should be noted that Figure 1 The schematic diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of this application are for more clearly explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art know that with the evolution of the data processing system and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.

[0050] Next, the data processing method provided by the embodiments of this application will be introduced.

[0051] In the embodiments of the data processing method of this application, an embedded processor is used as the execution subject. For the sake of simplicity and convenience of description, the execution subject will be omitted in the subsequent method embodiments. The processor includes a storage area, which includes an application area, a bootloader area, and a fixed address area. Among them, the application area stores an application, and the bootloader area stores a bootloader. The method includes: running the application, and determining whether the embedded device meets the startup conditions of the upgrade task; if so, receiving the upgrade data for the application sent by the host computer, and writing startup data reflecting the upgrade task in the fixed address area; running the bootloader, and determining whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrading the application based on the upgrade data, and writing completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; running the application and the bootloader in a loop until the written startup data and / or completion data meet the criteria for test completion.

[0052] The data processing method described in this application will be described in detail below with reference to the accompanying drawings. Although the method operations steps provided in this application are as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. When the method is actually processing objects or executed by a device, it can be executed in the method order shown in the embodiments or drawings or in parallel (such as in an environment of parallel processors or multi-threaded processing).

[0053] Specifically, please refer to Figures 2 to 4 , Figure 2 which is a schematic flowchart of an embodiment of the data processing method provided in the embodiment of this application. Specifically, this data processing method includes steps 201 to 203:

[0054] 201. Run the application program and determine whether the embedded device meets the startup conditions for the upgrade task.

[0055] Among them, the application program refers to program code designed and written to perform specific functions under a specific software and hardware environment. This program code is optimized to utilize the architecture and performance characteristics of the processor to achieve tasks such as efficient data processing and computing operations. Therefore, the application program in the processor can be understood as software running on the processor, and it can include but is not limited to the following types: embedded application programs, where the embedded processor is mainly used to run dedicated programs for specific fields, such as in the fields of mobile phones, DVDs, set-top boxes, etc.

[0056] In one embodiment, when the application program is in a running state, it will determine whether the embedded device meets the startup conditions for the upgrade task. Specifically, in the step of determining whether the embedded device meets the startup conditions for the upgrade task, it can specifically include: determining whether the processor of the embedded device is in an "idle state". If so, it is determined that the embedded device meets the startup conditions for the upgrade task. If not, it is determined that the embedded device does not meet the startup conditions for the upgrade task.

[0057] 202. If so, receive the upgrade data for the application program sent by the host computer and write the startup data reflecting the upgrade task in the fixed address area.

[0058] Among them, the upgrade data may include firmware of the same version to receive the firmware repeatedly sent by the host computer through the processor.

[0059] In addition, the upgrade data may further include multiple copies of firmware of different versions to receive the firmware repeatedly sent by the host computer through the processor. The selection of specific upgrade data can be made according to actual requirements. For example, in order to evaluate the upgradability of an embedded device to a certain version of firmware, the host computer can send the firmware of this version multiple times in sequence so that the embedded device can be upgraded according to the firmware of this version multiple times, thereby evaluating the upgradability of this version. For example, in order to evaluate the upgrade adaptability of an embedded device to firmware of different versions, the host computer can send multiple copies of firmware of different versions in sequence so that the embedded device can be upgraded according to the firmware of different versions multiple times, thus evaluating the upgrade adaptability of the embedded device to different firmware.

[0060] The process of writing the start data reflecting the upgrade task in the fixed address area refers to the process of increasing the start times in the fixed address area. For example, if it is the first upgrade task currently, then the start times in the fixed address area change from 0 to 1, that is, the process of +1.

[0061] In some embodiments, the storage area further includes an upgrade area; the step of receiving the upgrade data for the application program sent by the host computer and writing the start data reflecting the upgrade task in the fixed address area specifically includes: when receiving the upgrade data, writing the upgrade data into the upgrade area; if the upgrade data is successfully written into the upgrade area, then writing the start data reflecting the upgrade task in the fixed address area.

[0062] It can be understood that for the start data +1, it only needs to start receiving the upgrade data for the application program sent by the host computer. Regarding whether the subsequent upgrade is successful or not, it will not affect the start data +1.

[0063] In a specific embodiment, when the processor of the embedded device receives the upgrade data and successfully writes the upgrade data into the upgrade area, then write the start data reflecting the upgrade task in the fixed address area, that is, +1 on the basis of the original start data. For example, the original start data is 100, and the updated start data is 101.

[0064] 203. Run the bootloader and determine whether the embedded device meets the upgrade conditions of the upgrade task.

[0065] Among them, the bootloader runs earliest after the embedded device hardware is powered on or restarted, and is responsible for starting and managing the software and hardware environment of the system to prepare the correct environment for finally calling the operating system kernel.

[0066] In addition, the bootloader in an embedded device can also have the following functions: Initialize hardware: The bootloader first needs to complete the initialization of the processor and related hardware. This includes setting the clock frequency, configuring the memory mapping, initializing peripherals, etc. Load the operating system: The bootloader reads the operating system kernel from a storage medium (such as a solid-state drive) into RAM and jumps to the entry point of the kernel to start the operating system. Intermediate role: The bootloader acts as an intermediary between the hardware and the operating system to ensure a smooth handover between the two.

[0067] In some embodiments, in the step of determining whether the embedded device meets the upgrade conditions for the upgrade task, it may specifically include: determining whether the upgrade data is stored in the upgrade area. If the upgrade data is stored in the upgrade area, it is determined that the embedded device meets the upgrade conditions for the upgrade task. If the upgrade data is not stored in the upgrade area, it is determined that the embedded device does not meet the upgrade conditions for the upgrade task.

[0068] 204. If so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed.

[0069] Among them, the step of upgrading the application program based on the upgrade data and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed specifically includes: erasing the original application program and migrating the upgrade data to the application program area; if the upgrade data is successfully migrated to the application program area, write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed.

[0070] In a specific embodiment, the processor erases the original application program stored in the application program area and migrates the upgrade data from the upgrade area to the application program area; if the upgrade data is successfully migrated to the application program area, write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed.

[0071] Specifically, writing the completion data reflecting the upgrade task in the fixed address area can be understood as the processor adding 1 to the original number of completion times to obtain the updated completion data.

[0072] For example, if the original number of completion times is 100 times, the updated number of completion times is 101 times.

[0073] 205. Run the application program and the bootloader in a loop until the written startup data and / or completion data meet the test completion standard.

[0074] Among them, the standard for completing the test can be the requirement for the number of times of startup data, and the specific value of the number of times can be set according to the actual needs of the test, which is not limited here. For example, the standard for completing the test can be set such that the number of times of startup data needs to reach 10 times, 100 times, 200 times, 500 times, and 1000 times.

[0075] Optionally, the standard for completing the test can be the requirement for the number of times of completion data, and the specific value of the number of times can be set according to the actual needs of the test, which is not limited here. For example, the standard for completing the test can be set such that the number of times of completion data needs to reach 10 times, 100 times, 200 times, 500 times, and 1000 times.

[0076] Optionally, the standard for completing the test can be the requirement for the number of times of both startup data and completion data, and the specific value of the number of times can be set according to the actual needs of the test, which is not limited here. For example, the standard for completing the test can be set as follows: the number of startup times needs to reach or exceed 10 times, and at the same time, the completion data needs to reach at least 6 times; or, the number of startup times needs to reach or exceed 100 times, and at the same time, the completion data needs to reach at least 60 times; or, the number of startup times needs to reach or exceed 200 times, and at the same time, the number of completion times needs to reach at least 120 times; or, the number of startup times needs to reach or exceed 500 times, and at the same time, the number of completion times needs to reach at least 300 times; or, the number of startup times needs to reach or exceed 1000 times, and at the same time, the number of completion times needs to reach at least 600 times.

[0077] When the written startup data and / or the completion data meet the standard for completing the test, the loop operation of the application program and the bootloader can be stopped.

[0078] In the embodiment of the present application, the application program stored in the application program area and the bootloader stored in the bootloader area are cyclically run by the processor. Specifically, by running the application program to determine whether the embedded device meets the startup conditions of the upgrade task, and when the startup conditions of the upgrade task are met, receiving the upgrade data of the application program sent by the host computer, and writing the startup data reflecting the upgrade task in the fixed address area; by running the bootloader to determine whether the embedded device meets the upgrade conditions of the upgrade task, and when the upgrade conditions of the upgrade task are met, upgrading the application program based on the upgrade data, and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; until the written startup data and / or completion data meet the standard for completing the test, the automated upgrade test of the embedded device can be realized without manual operation, making full use of the characteristics of the embedded device itself. Therefore, the manual operation link is reduced, the test efficiency is improved, and the test cost is reduced.

[0079] After the test is completed, when testers need to view the parameters in the upgrade test, it can be achieved in the following ways.

[0080] In some embodiments, the test data can be presented in a passive manner, which specifically includes: after the test is completed, receiving the query instruction sent by the host computer; reading the start data and the completion data from the fixed address area.

[0081] In the embodiment of the present application, through the communication between the host computer and the embedded device, the start data and the completion data stored in the fixed address area after the test is completed can be queried by the host computer, improving the convenience of obtaining test data.

[0082] Further, the test data that needs to be calculated can also be presented in an active manner, which specifically includes: after the test is completed, obtaining the start data and the completion data from the fixed address area; calculating the upgrade success rate of the upgrade data according to the start data and the completion data; uploading the upgrade success rate of the upgrade data to the host computer.

[0083] In the embodiment of the present application, through the communication between the host computer and the embedded device, the embedded device can actively present the required upgrade success rate, further improving the convenience of obtaining test data.

[0084] In some embodiments, the step of calculating the upgrade success rate of the upgrade data according to the start data and the completion data may specifically include: comparing the completion data with the start data to obtain the upgrade success rate. For example, let the upgrade success rate be a, then a = (b / c) * 100%, where b is the completion data (i.e., the number of successful upgrades), and c is the start data (i.e., the number of upgrade starts).

[0085] During the entire upgrade test process, there may be exceptions, and how to automatically analyze the reasons for the exceptions can effectively improve the upgrade test efficiency and reduce the test cost. Specifically, the following methods can be adopted.

[0086] In some embodiments, after the step of calculating the upgrade success rate of the upgrade data according to the start data and the completion data, the method may further include: steps 206 to 207:

[0087] 206. Determine whether there is an exception during the upgrade process of the embedded device according to the upgrade success rate and a preset upgrade success rate threshold;

[0088] In one embodiment, if the upgrade success rate is lower than a preset upgrade success rate threshold, it is determined that there is an abnormality in the upgrade process of the embedded device within the preset time period. If the upgrade success rate is not lower than the preset upgrade success rate threshold, it is determined that the upgrade process of the embedded device within the preset time period is normal.

[0089] Among them, the preset upgrade success rate threshold can be set according to actual needs. For example, the upgrade success rate threshold can be set to 50%, 60%, 70%, 80%, 85%, 90%.

[0090] In a specific embodiment, when the target upgrade success rate (70%) is lower than the preset upgrade success rate threshold (85%), it is determined that there is an abnormality in the upgrade process of the embedded device within the preset time period.

[0091] 207. If so, obtain the device information, upgrade process information, and the upgrade data of relevant devices during the upgrade process within the preset time period, and based on the device information, the upgrade process information, and the upgrade data, determine the abnormal analysis data that causes the abnormality in the upgrade process.

[0092] The upgrade process of the embedded device involves multiple key components and technologies, including the processor, Bootloader, network connection, user interface, security mechanism, and differential upgrade technology. These components and technologies together ensure that the embedded device can perform remote software updates stably and efficiently.

[0093] Optionally, the step of determining the abnormal analysis data that causes the abnormality in the upgrade process based on the device information, the upgrade process information, and the upgrade data includes: extracting upgrade abnormal feature data from the device information, the upgrade process information, and the upgrade data; inputting the upgrade abnormal feature data into a pre-trained network prediction model for upgrade abnormal analysis to obtain a model prediction result; and based on the model prediction result, determining the abnormal analysis data that causes the abnormality in the upgrade process.

[0094] Specifically, extracting the upgrade abnormal feature data from the device information, the upgrade process information, and the upgrade data can be specifically implemented in the following ways:

[0095] First, it is necessary to collect and preprocess the operation data of the device. This includes steps such as data cleaning, filling missing values, standardization, and normalization to ensure data quality.

[0096] Before performing anomaly detection, it is necessary to extract useful features from the original data. These features can help better describe the state and behavior of the device. Common feature extraction methods include algorithms based on manual construction, self-supervised learning methods, and various transformation methods. For example, methods such as Fourier transform and wavelet transform can be used to extract features from signals, thereby obtaining a large number of features.

[0097] The relationship between different features and the recognition rate can be analyzed to select those features that are most important for anomaly detection. In addition, automatic multivariable closed-loop identification technology can be used to improve the identification efficiency and quality of the model.

[0098] Using the extracted and optimized features, train traditional supervised machine learning models or deep learning models to extract features from the device to be recognized and determine whether there is an anomaly based on the model output. Analyze on the feature data and output whether the monitored object is abnormal. If an anomaly is detected, fault warning can be further combined with historical annotation information and prior information.

[0099] During the closed-loop control process of the prediction model, the model can be continuously updated to adapt to changes in the device operating environment. This helps to improve the accuracy and robustness of the model.

[0100] Finally, combine the extracted anomaly feature data with model prediction technology to continuously predict future device operations under the current operating data, compare the predicted values with the set target values, and finally calculate new control actions to reduce the fluctuations of key variables in the process and operate the device in the best state.

[0101] Through the above steps, it is possible to effectively extract anomaly feature data for model prediction from device information, upgrade processes, and upgrade data, thereby achieving efficient anomaly detection and fault warning.

[0102] In a specific embodiment of the present application, in order to achieve automated anomaly analysis, model predictive control (MPC for short) can be used to perform anomaly analysis on the upgrade of embedded devices.

[0103] The MPC adopted in this application can explicitly handle constraints, and this ability comes from its optimization-based method, making its application in embedded systems more flexible and reliable.

[0104] The efficient algorithms and implementation strategies for the embedded implementation of predictive control help to reduce the requirements for the hardware platform, reduce the construction cost and maintenance cost, and thus better apply to the underlying control system.

[0105] Optionally, other network prediction models can also be adopted in this application, such as automated anomaly detection based on meta-learning, One-class SVM model, etc.

[0106] In the solution disclosed in the embodiments of this application, through automated anomaly analysis of the embedded device, it helps to optimize the upgrade process and improve the upgrade test efficiency.

[0107] To better implement the data processing method in the embodiments of this application, based on the data processing method, a data processing device is further provided in the embodiments of this application. It is applied to the processor of the embedded device. The processor includes a storage area, and the storage area includes an application program area, a bootloader area, and a fixed address area. The application program area stores an application program, and the bootloader area stores a bootloader program, such as Figure 3 As shown, the data processing device 300 includes:

[0108] An application program module 301, configured to determine whether the embedded device meets the startup condition of the upgrade task. If so, receive the upgrade data of the application program sent by the host computer, and write the startup data reflecting the upgrade task into the fixed address module;

[0109] A bootloader module 302, configured to determine whether the embedded device meets the upgrade condition of the upgrade task. If so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task into the fixed address module after the upgrade is completed;

[0110] A fixed address module 303, configured to record the startup data and the completion data;

[0111] A loop module 304, configured to loop to start the application program module and the bootloader program module until the written startup data and / or completion data meet the test completion standard.

[0112] In some embodiments, the storage area further includes an upgrade module;

[0113] The application program module 301 further includes:

[0114] A first writing module, configured to write the upgrade data into the upgrade module when receiving the upgrade data;

[0115] A second writing module, configured to write the startup data reflecting the upgrade task into the fixed address area if the upgrade data is successfully written into the upgrade module;

[0116] The bootloader module 302 further includes:

[0117] A migration module, configured to erase the original application program and migrate the upgrade data to the application program area;

[0118] A third writing module, configured to, if the upgrade data is successfully migrated to the application program area, write completion data reflecting the completion of the upgrade task in the fixed address area after the upgrade is completed.

[0119] In some embodiments, the boot loading module 302 further includes:

[0120] A first determination module, configured to determine whether the upgrade data is stored in the upgrade module.

[0121] In some embodiments, the device further includes:

[0122] A receiving module, configured to receive a query instruction sent by the host computer after the test is completed;

[0123] A reading module, configured to read the startup data and the completion data from the fixed address area.

[0124] In some embodiments, the device further includes:

[0125] An obtaining module, configured to obtain the startup data and the completion data from the fixed address area after the test is completed;

[0126] A calculation module, configured to calculate the upgrade success rate of the upgrade data according to the startup data and the completion data.

[0127] An uploading module, configured to upload the upgrade success rate of the upgrade data to the host computer.

[0128] In some embodiments, the device further includes:

[0129] A second determination module, configured to determine whether there is an abnormality in the upgrade process of the embedded device according to the upgrade success rate and a preset upgrade success rate threshold;

[0130] A first determination module, configured to, if so, obtain the device information, the upgrade process information, and the upgrade data of relevant devices during the upgrade process within the preset time period, and determine abnormal analysis data that causes the abnormality in the upgrade process based on the device information, the upgrade process information, and the upgrade data.

[0131] In some embodiments, the first determination module further includes:

[0132] An extraction module, configured to extract upgrade abnormal feature data from the device information, the upgrade process information, and the upgrade data;

[0133] An input module, configured to input the upgrade anomaly feature data into a pre-trained network prediction model for upgrade anomaly analysis to obtain a model prediction result;

[0134] A second determination module, configured to determine, based on the model prediction result, anomaly analysis data that causes an anomaly in the upgrade process.

[0135] In some embodiments, the upgrade data includes firmware of the same version, and the processor is configured to receive the firmware repeatedly sent by the host computer.

[0136] In some embodiments, the upgrade data includes multiple copies of firmware of different versions, and the processor is configured to receive the firmware sent by the host computer multiple times.

[0137] In the embodiments of the present application, the processor runs the application stored in the application area and the bootloader stored in the bootloader area in a loop. Specifically, by running the application, it is determined whether the embedded device meets the startup conditions of the upgrade task. When the startup conditions of the upgrade task are met, the upgrade data for the application sent by the host computer is received, and the startup data reflecting the upgrade task is written in the fixed address area. By running the bootloader, it is determined whether the embedded device meets the upgrade conditions of the upgrade task. When the upgrade conditions of the upgrade task are met, the application is upgraded based on the upgrade data, and after the upgrade is completed, the completion data reflecting the upgrade task is written in the fixed address area; until the written startup data and / or completion data meet the standard of test completion, the automated upgrade test of the embedded device can be realized without manual operation, making full use of the characteristics of the embedded device itself. Therefore, the manual operation link is reduced, the test efficiency is improved, and the test cost is reduced.

[0138] In addition to the above-described data processing method and device, the embodiments of the present application further provide an embedded device, which integrates any one of the data processing devices provided in the embodiments of the present application. The embedded device includes:

[0139] A processor;

[0140] And

[0141] One or more applications, where the one or more applications are stored in the processor and are configured to be executed by the processor to perform the operations of any one of the methods in any one of the embodiments of the above data processing method.

[0142] This embedded device integrates any one of the data processing devices provided in the embodiments of the present application. As Figure 4 shown, it shows a schematic structural diagram of the embedded device involved in the embodiments of the present application. Specifically:

[0143] The embedded device may include components such as a processor 401 with one or more processing cores, a power supply 403, and an input unit 404. Those skilled in the art can understand that Figure 4 the structure of the embedded device shown in

[0144] does not limit the embedded device. It may include more or fewer components than shown, combine certain components, or have different component arrangements. Among them:

[0145] The processor 401 is the control center of the embedded device, connecting various parts of the entire embedded device through various interfaces and lines. By running or executing software programs and / or modules stored in the processor 401, and calling data stored in the processor 401, it performs various functions of the embedded device and processes data, thereby monitoring the embedded device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may not be integrated into the processor 401.

[0146] The embedded device further includes a power supply 403 that powers each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0147] The embedded device may further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0148] Although not shown, the embedded device may further include a display unit and the like, which will not be elaborated herein. Specifically, in the embodiment of the present application, the processor 401 in the embedded device will load the executable files corresponding to the processes of one or more application programs into the corresponding application areas according to the following instructions, and the processor 401 will run the application programs stored in the application areas to implement various functions as follows:

[0149] Run the application program, and determine whether the embedded device meets the startup conditions for the upgrade task; if so, receive the upgrade data for the application program sent by the host computer, and write the startup data reflecting the upgrade task in the fixed address area; run the bootloader, and determine whether the embedded device meets the upgrade conditions for the upgrade task; if so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; loop to run the application program and the bootloader until the written startup data and / or completion data meet the criteria for test completion.

[0150] In the embodiment of the present application, by the processor looping to run the application program stored in the application area and the bootloader stored in the bootloader area. Specifically, by running the application program to determine whether the embedded device meets the startup conditions for the upgrade task, and when the startup conditions for the upgrade task are met, receiving the upgrade data for the application program sent by the host computer, and writing the startup data reflecting the upgrade task in the fixed address area; by running the bootloader to determine whether the embedded device meets the upgrade conditions for the upgrade task, and when the upgrade conditions for the upgrade task are met, upgrading the application program based on the upgrade data, and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; until the written startup data and / or completion data meet the criteria for test completion, it realizes that the embedded device can perform automated upgrade testing without manual operation, making full use of the characteristics of the embedded device itself. Therefore, it reduces the manual operation link, improves the test efficiency, and reduces the test cost.

[0151] Therefore, the embodiment of the present application provides a computer-readable storage medium, which may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk or an optical disc, etc. Multiple instructions are stored in the computer-readable storage medium, and these instructions can be loaded by the processor to execute the steps in any of the data processing methods provided by the embodiment of the present application. For example, the instructions may execute the following steps:

[0152] Run the application program, and determine whether the embedded device meets the startup conditions of the upgrade task; if so, receive the upgrade data for the application program sent by the host computer, and write the startup data reflecting the upgrade task in the fixed address area; run the bootloader, and determine whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed; loop to run the application program and the bootloader until the written startup data and / or the completion data meet the criteria for test completion.

[0153] According to one aspect of the present application, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the embedded device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the embedded device executes the methods provided in the various optional implementation manners in the above embodiments.

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

[0155] The above has introduced in detail a data processing method, device, system and related equipment provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A data processing method, characterized in that, A processor applied to an embedded device, the processor includes a storage area, the storage area includes an application area, a boot loader area, and a fixed address area, the application area stores an application program, and the boot loader area stores a boot loader; The method includes: Run the application program and determine whether the embedded device meets the startup conditions of the upgrade task; If so, receive the upgrade data for the application program sent by the host computer, and write the startup data reflecting the upgrade task in the fixed address area to increase the upgrade startup times in the fixed address area; Run the boot loader and determine whether the embedded device meets the upgrade conditions of the upgrade task; If so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed to increase the upgrade success times in the fixed address area; Loop to run the application program and the boot loader until the written startup data and / or the completion data meet the test completion criteria; After the test is completed, obtain the startup data and the completion data from the fixed address area; Calculate the upgrade success rate of the upgrade data according to the upgrade startup times corresponding to the startup data and the upgrade success times corresponding to the completion data; Upload the upgrade success rate of the upgrade data to the host computer; After the step of calculating the upgrade success rate of the upgrade data according to the startup data and the completion data, the method further includes: Judge whether there is an abnormality during the upgrade process of the embedded device according to the upgrade success rate and a preset upgrade success rate threshold; If so, obtain the device information, upgrade process information, and the upgrade data of the relevant devices during the upgrade process within a preset time period, and based on the device information, the upgrade process information, and the upgrade data, use model predictive control to determine the abnormal analysis data that causes the abnormality in the upgrade process.

2. The data processing method according to claim 1, wherein The storage area further includes an upgrade area; The step of receiving the upgrade data for the application program sent by the host computer and writing the startup data reflecting the upgrade task in the fixed address area specifically includes: When receiving the upgrade data, write the upgrade data into the upgrade area; If the upgrade data is successfully written into the upgrade area, write the startup data reflecting the upgrade task in the fixed address area; The step of upgrading the application program based on the upgrade data and writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed specifically includes: Erase the original application program and migrate the upgrade data to the application area; If the upgrade data is successfully migrated to the application area, write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed.

3. The data processing method according to claim 2, wherein In the step of determining whether the embedded device meets the upgrade conditions of the upgrade task, it includes: Judge whether the upgrade data is stored in the upgrade area.

4. The data processing method according to claim 1, wherein The method further includes: After the test is completed, receive the query instruction sent by the host computer; Read the startup data and the completion data from the fixed address area.

5. The data processing method according to claim 1, wherein The step of determining the abnormal analysis data that causes the abnormality in the upgrade process by using model predictive control based on the device information, the upgrade process information, and the upgrade data includes: Extract the upgrade abnormal feature data from the device information, the upgrade process information, and the upgrade data; Input the upgrade abnormal feature data into a pre-trained network prediction model for upgrade abnormal analysis to obtain a model prediction result; Based on the model prediction result, determine the abnormal analysis data that causes the abnormality in the upgrade process.

6. The data processing method according to claim 1, wherein The upgrade data includes firmware of the same version, so that the processor receives the firmware repeatedly sent by the host computer.

7. The data processing method according to claim 1, characterized in that The upgrade data includes multiple copies of firmware of different versions, so that the processor receives the firmware sent by the host computer multiple times.

8. A data processing system, characterized in that, It includes an embedded device and a host computer. The embedded device is connected to the host computer. The embedded device includes a processor. The processor includes a storage area. The storage area includes an application area, a bootloader area, and a fixed address area. The application area stores an application, and the bootloader area stores a bootloader; The host computer is used to periodically detect whether the embedded device is in an idle state, and when the embedded device is in an idle state, send upgrade data to the embedded device; The processor is used to run the application and determine whether the embedded device meets the startup conditions for the upgrade task; If so, receive the upgrade data for the application sent by the host computer, and write the startup data reflecting the upgrade task in the fixed address area to increase the upgrade startup times in the fixed address area; The processor is also used to run the bootloader and determine whether the embedded device meets the upgrade conditions for the upgrade task; if so, upgrade the application based on the upgrade data, and write the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed to increase the upgrade success times in the fixed address area; The processor is also used to repeatedly run the application and the bootloader until the written startup data and / or completion data meet the test completion criteria; After the test is completed, obtain the startup data and the completion data from the fixed address area; Calculate the upgrade success rate of the upgrade data according to the upgrade startup times corresponding to the startup data and the upgrade success times corresponding to the completion data; Upload the upgrade success rate of the upgrade data to the host computer; After the step of calculating the upgrade success rate of the upgrade data according to the startup data and the completion data, it further includes: Judge whether there is an abnormality in the upgrade process of the embedded device according to the upgrade success rate and a preset upgrade success rate threshold; If so, obtain the device information, upgrade process information, and the upgrade data of the relevant devices during the upgrade within a preset time period, and based on the device information, the upgrade process information, and the upgrade data, use model predictive control to determine the abnormal analysis data that causes the abnormality in the upgrade process.

9. A data processing device, characterized in that, Applied to an embedded device, including: An application program module, configured to determine whether the embedded device meets the start condition of the upgrade task. If so, receive the upgrade data for the application program sent by the host computer, and write the start data reflecting the upgrade task into the fixed address module to increase the start times in the fixed address area; A bootloader module, configured to determine whether the embedded device meets the upgrade condition of the upgrade task. If so, upgrade the application program based on the upgrade data, and write the completion data reflecting the upgrade task into the fixed address module after the upgrade is completed; A fixed address module, configured to record the start data and the completion data to increase the completion times in the fixed address area; A loop module, configured to loop and start the application program module and the bootloader module until the written start data and / or the completion data meet the test completion criteria; An acquisition module, configured to obtain the start data and the completion data from the fixed address area after the test is completed; A calculation module, configured to calculate the upgrade success rate of the upgrade data according to the upgrade start times corresponding to the start data and the upgrade success times corresponding to the completion data; An upload module, configured to upload the upgrade success rate of the upgrade data to the host computer; A second judgment module, configured to judge whether there is an abnormality during the upgrade of the embedded device according to the upgrade success rate and a preset upgrade success rate threshold; A first determination module, configured to if so, obtain the device information, upgrade process information, and the upgrade data of the relevant devices during the upgrade within a preset time period, and based on the device information, the upgrade process information, and the upgrade data, use model predictive control to determine the abnormal analysis data that causes the abnormality in the upgrade process.

10. An embedded device, characterized in that, The embedded device includes: A processor; And One or more computer programs, wherein the one or more computer programs are stored in the processor and configured to be executed by the processor to implement the data processing method according to any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is loaded by the processor to execute the steps in the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • System and method for pressure testing of firmware update

    CN104424068A

  • Remote upgrading method and device for Internet of Things equipment

    CN113282316A

  • Server power supply firmware updating method and device, computer equipment and storage medium

    CN113568632A

  • Power grid anomaly detection method based on AI technology

    CN117520984A