Data processing method, device and system and related equipment
By running the application program and bootloader in the embedded device processor, the upgrade task is automatically determined and executed, which solves the problem of manual operation dependence in the existing technology, realizes efficient automated upgrade testing, and reduces costs.
Patent Information
- Application Number
- CN202411157337.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the existing technology, the upgrade test of embedded devices relies on manual operation, which is inefficient and costly, and cannot fully utilize the characteristics of the device for automated testing.
By running the application program and boot loader in the processor of the embedded device, it is judged whether the device meets the upgrade conditions, and when the conditions are met, the upgrade data sent by the host computer is received for automatic upgrade until the test completion standards are met.
It realizes automated upgrade testing without manual operation, reduces manual operation links, improves testing efficiency and reduces testing costs.
Smart Images

Figure CN118689518A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of embedded device upgrade testing, and in particular to a data processing method, device, system and related equipment. Background Art
[0002] Whether the upgrade process of embedded devices is stable is the key factor for the success of their firmware upgrades. However, in the relevant technologies, upgrade tests of embedded devices are usually tested and recorded manually, which consumes a lot of manpower and has low testing efficiency. It is unable to fully utilize the inherent characteristics of embedded devices for upgrade testing. Summary of the invention
[0003] The present application provides a data processing method, apparatus, system and related equipment, aiming to make full use of the characteristics of embedded devices to perform upgrade tests, improve test efficiency and reduce test costs.
[0004] In a first aspect, the present application provides a data processing method, which is applied to a processor of an embedded device, wherein the processor includes a storage area, the storage area includes an application area, a boot loading area, and a fixed address area, the application area stores an application, and the boot loading area stores a boot loader; the method includes: Running the application to determine whether the embedded device meets the start condition of the upgrade task; If yes, receiving the upgrade data for the application sent by the host computer, and writing the startup data reflecting the upgrade task into the fixed address area; Running the boot loader to determine whether the embedded device meets the upgrade condition of the upgrade task; If yes, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written into the fixed address area after the upgrade is completed; The application program and the bootloader are run in a loop until the written startup data and / or the completion data meet a test completion criterion.
[0005] In a second aspect, the present application provides a data processing system, comprising an embedded device and a host computer, wherein the embedded device is connected to the host computer, the embedded device comprises a processor, the processor comprises a storage area, the storage area comprises an application area, a boot loading area and a fixed address area, the application area stores an application, and the boot loading area stores a boot loader; The host computer is used to periodically detect whether the embedded device is in an idle state, and send upgrade data to the embedded device when the embedded device is in an idle state; The processor is used to run the application program and 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 in the fixed address area; The processor is also used to run the boot loader to determine whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrade the application based on the upgrade data, and write completion data reflecting the upgrade task into the fixed address area after the upgrade is completed; The processor is further configured to run the application program and the boot loader program in a loop until the written startup data and / or the completion data meet a test completion criterion.
[0006] In a third aspect, the present application provides a data processing device, applied to an embedded device, comprising: An application module, used to determine whether the embedded device meets the start-up conditions of the upgrade task, and if so, receive the upgrade data for the application sent by the host computer, and write the start-up data reflecting the upgrade task into the fixed address module; A boot loading module, used to determine whether the embedded device meets the upgrade conditions of the upgrade task, and if so, upgrade the application based on the upgrade data, and write completion data reflecting the upgrade task into the fixed address module after the upgrade is completed; A fixed address module, used for recording the startup data and the completion data; A loop module is used to cyclically start the application module and the boot loader module until the written startup data and / or the completion data meet the test completion standard.
[0007] In a fourth aspect, the present application further provides an embedded device, the embedded device comprising: processor; as well as 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.
[0008] In a fifth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the data processing method.
[0009] In a sixth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program or instructions, and the steps in the data processing method when the computer program or instructions are executed by a processor.
[0010] In an embodiment of the present application, a processor cyclically runs an application stored in an application area and a boot loader stored in a boot loading area. Specifically, the application is run to determine whether the embedded device meets the start-up conditions of the upgrade task, and when the start-up conditions of the upgrade task are met, upgrade data for the application sent by the host computer is received, and startup data reflecting the upgrade task is written in a fixed address area; the boot loader is run 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, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written in a fixed address area after the upgrade is completed; until the startup data and / or completion data written by it meet the test completion standard, it is achieved that the embedded device can perform automated upgrade testing without manual operation, and fully utilize the characteristics of the embedded device itself, thereby reducing manual operation links, improving test efficiency, and reducing test costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 is a scenario schematic diagram of a data processing system provided in an embodiment of the present application; Figure 2 It is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application; Figure 3 is a schematic diagram of the structure of an embodiment of a data processing device provided in an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an embodiment of an embedded device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0014] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on 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 number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0015] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0016] The embodiments of the present application provide a data processing method, apparatus, system and related equipment, which are described in detail below.
[0017] like Figure 1 As shown, Figure 1 1 is a schematic diagram of a scenario of a data processing system provided in 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. The processor includes a storage area. The storage area includes an application area, a boot loading area, and a fixed address area. The application area stores an application program, and the boot loading area stores a boot loader. The host computer 200 is used to periodically detect whether the embedded device is in an idle state, and send upgrade data to the embedded device when the embedded device is in an idle state; The processor is used to run the application program and 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 in the fixed address area; Running the boot loader to determine whether the embedded device meets the upgrade condition of the upgrade task; if so, upgrading the application based on the upgrade data, and writing completion data reflecting the upgrade task into the fixed address area after the upgrade is completed; The application program and the bootloader are run in a loop until the written startup data and / or the completion data meet a test completion criterion.
[0018] Among them, the host computer 200 generally refers to a computer system used to control or monitor the 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.). In the process of firmware upgrade, the host computer 200 is responsible for sending upgrade data (including firmware) to the embedded device 100 and ensuring that the firmware is correctly received and executed. The embedded device 100 refers to a dedicated hardware device that integrates an operating system and an application. 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 whose firmware needs to be updated to improve functionality or fix known problems.
[0019] In actual operation, the host computer 200 can communicate with the embedded device 100 in a wired or wireless manner to achieve firmware transmission.
[0020] The starting condition of the upgrade task is the main basis for judging whether the embedded device can normally enter the upgrade process. Specifically, the starting condition of the upgrade task may be that the processor (Central Processing Unit, CPU) of the embedded device is in an "idle state".
[0021] Specifically, when the processor of an 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 the operating frequency or voltage to reduce energy consumption; the processor may stop executing instructions, but still maintain the ability to monitor external events or interrupts, and once there is a new task to be processed, it will quickly return to normal working state; the processor may enter a deeper low-power mode (such as sleep mode), in which most of the processor's functions are suspended, and only a few key functions remain active for quick recovery.
[0022] Therefore, when the embedded device 100 is in an idle state, that is, when the embedded device meets the start conditions 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 to ensure that the device can perform firmware updates without affecting its key functions.
[0023] In addition, the embedded device 100 also has the functions of the following data processing method, which can be found in the following specific embodiments and will not be described in detail here.
[0024] The embodiment of the present application cyclically runs the application stored in the application area and the boot loader stored in the boot loading area through the processor. Specifically, the application is run to determine whether the embedded device meets the start-up conditions of the upgrade task, and when the start-up 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; the boot loader is run 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, 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 startup data and / or completion data written by it meet the test completion standard, it is achieved that the embedded device can perform automatic upgrade testing without manual operation, and fully utilize the characteristics of the embedded device itself, thereby reducing manual operation links, improving test efficiency, and reducing test costs.
[0025] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution, and is not intended to limit the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer host computers and / or embedded devices as shown in, for example Figure 1 Only one host computer and one embedded device are shown. It can be understood that the data processing system may also include one or more other embedded devices, which are not specifically limited here.
[0026] It should be noted that Figure 1 The scenario diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of the data processing system and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
[0027] Next, the data processing method provided by the embodiment of the present application is introduced.
[0028] In the embodiment of the data processing method of the present embodiment, an embedded processor is used as an execution subject. For the sake of simplicity and ease 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 boot loading area and a fixed address area, wherein the application area stores an application, and the boot loading area stores a boot loader. The method includes: running the application to determine 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 boot loader to determine 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; looping the application and the boot loader until the written startup data and / or the completion data meet the test completion standard.
[0029] The data processing method described in the present application is described in detail below in conjunction with the accompanying drawings. Although the present application provides method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method can be executed in the order of the method shown in the embodiments or drawings or in parallel (such as a parallel processor or a multi-threaded processing environment) during the actual object processing process or when the device is executed.
[0030] For details, please refer to Figures 2 to 4 , Figure 2 The following is a flow chart of an embodiment of a data processing method provided in an embodiment of the present application. Specifically, the data processing method includes steps 201 to 203: 201. Run the application program to determine whether the embedded device meets the starting condition of the upgrade task.
[0031] Among them, application refers to the program code designed and written to perform specific functions in a specific hardware and software environment. These program codes are optimized to take advantage of the architecture and performance characteristics of the processor to achieve efficient data processing, computing operations and other tasks. Therefore, the application in the processor can be understood as the software running on the processor, which can include but is not limited to the following types: embedded application, where the embedded processor is mainly used to run special programs for specific fields, such as mobile phones, DVDs, set-top boxes and other fields.
[0032] In one embodiment, when the application is in the running state, it will be judged whether the embedded device meets the starting conditions of the upgrade task. Specifically, the step of judging whether the embedded device meets the starting conditions of the upgrade task may specifically include: judging whether the processor of the embedded device is in an "idle state". If so, it is determined that the embedded device meets the starting conditions of the upgrade task; if not, it is determined that the embedded device does not meet the starting conditions of the upgrade task.
[0033] 202. If yes, receive the upgrade data for the application sent by the host computer, and write the startup data reflecting the upgrade task into the fixed address area.
[0034] The upgrade data may include the same version of firmware, so that the processor receives the firmware repeatedly sent by the host computer.
[0035] In addition, the upgrade data may also include multiple copies of firmware of different versions, so that the processor can receive the firmware that is sent down multiple times by the host computer. The selection of specific upgrade data can be selected according to actual needs. For example, in order to evaluate the upgradability of an embedded device to a certain version of firmware, the host computer can be used to send down the firmware of this version multiple times in a time sequence, so that the embedded device is upgraded multiple times according to the firmware of this version, and then the upgradability of the version is evaluated. For example, in order to evaluate the upgrade adaptability of an embedded device to different versions of firmware, the host computer can be used to send down multiple copies of firmware of different versions in a time sequence, so that the embedded device is upgraded multiple times according to different versions of firmware, so that the upgrade adaptability of the embedded device to different firmware can be evaluated.
[0036] The process of writing startup data reflecting the upgrade task in the fixed address area refers to the process of increasing the startup times in the fixed address area. For example, if the current is the first upgrade task, the startup times in the fixed address area will be changed from 0 to 1, that is, +1.
[0037] In some embodiments, the storage area also includes an upgrade area; the step of receiving upgrade data for the application sent by the host computer and writing startup 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, writing startup data reflecting the upgrade task in the fixed address area.
[0038] It can be understood that the startup data +1 only needs to start receiving the upgrade data for the application sent by the host computer. Whether the subsequent upgrade is successful will not affect the startup data +1.
[0039] 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, the startup data reflecting the upgrade task is written into the fixed address area, that is, +1 is added to the original startup data. For example, the original startup data is 100, and the updated startup data is 101.
[0040] 203. Run the boot loader to determine whether the embedded device meets the upgrade condition of the upgrade task.
[0041] Among them, the boot loader (BootLoader) is the first to run after the embedded device hardware is powered on or restarted. It is responsible for starting and managing the system's hardware and software environment in order to prepare the correct environment for the final call to the operating system kernel.
[0042] In addition, the boot loader can also have the following roles in embedded devices: Initialize hardware: The boot loader first needs to complete the initialization of the processor and related hardware. This includes setting the clock frequency, configuring the memory map, initializing peripherals, etc. Load the operating system: The boot loader reads the operating system kernel from the storage medium (such as a solid-state drive) into RAM and jumps to the kernel's entry point to start the operating system. Intermediary role: The boot loader acts as an intermediary between the hardware and the operating system to ensure that the two can be smoothly handed over.
[0043] In some embodiments, the step of determining whether the embedded device meets the upgrade conditions of the upgrade task may specifically include: determining whether the upgrade data is stored in the upgrade area; if the upgrade data is stored in the upgrade area, determining that the embedded device meets the upgrade conditions of the upgrade task; if the upgrade data is not stored in the upgrade area, determining that the embedded device does not meet the upgrade conditions of the upgrade task.
[0044] 204. If yes, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written into the fixed address area after the upgrade is completed.
[0045] Among them, the step of upgrading the application 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 and migrating the upgrade data to the application area; if the upgrade data is successfully migrated to the application area, then writing the completion data reflecting the upgrade task in the fixed address area after the upgrade is completed.
[0046] In a specific embodiment, the processor erases the original application stored in the application area and migrates the upgrade data from the upgrade area to the application area; if the upgrade data is successfully migrated to the application area, completion data reflecting the upgrade task is written into the fixed address area after the upgrade is completed.
[0047] Specifically, writing the completion data reflecting the upgrade task into the fixed address area can be understood as the processor adding 1 to the original completion count to obtain updated completion data.
[0048] For example, the original completion count is 100 times, and the updated completion count is 101 times.
[0049] 205 . Run the application program and the boot loader program in a loop until the written startup data and / or the completion data meet a test completion criterion.
[0050] Among them, the standard for test completion can be the requirement for the number of startup data, and the specific value of the number can be set according to the actual needs of the test, and is not limited here. For example, the standard for test completion can be set to the number of startup data reaching 10 times, 100 times, 200 times, 500 times and 1000 times.
[0051] Optionally, the standard for test completion can be a requirement for the number of times the data is completed, and the specific value of the number can be set according to the actual needs of the test and is not limited here. For example, the standard for test completion can be set to the number of times the data is completed reaching 10 times, 100 times, 200 times, 500 times and 1000 times.
[0052] Optionally, the standard for test completion can be the requirement for the number of startup data and completion data at the same time, and the specific value of the number can be set according to the actual needs of the test, and is not limited here. For example, the standard for test completion can be set as: the number of startups needs to reach or exceed 10 times, and the completion data needs to reach no less than 6 times; or, the number of startups needs to reach or exceed 100 times, and the completion data needs to reach no less than 60 times; or, the number of startups needs to reach or exceed 200 times, and the completion number needs to reach no less than 120 times; or, the number of startups needs to reach or exceed 500 times, and the completion number needs to reach no less than 300 times; or, the number of startups needs to reach or exceed 1000 times, and the completion number needs to reach no less than 600 times.
[0053] When the written startup data and / or the completion data meet the test completion criteria, the looping operation of the application program and the boot loader can be stopped.
[0054] In an embodiment of the present application, a processor cyclically runs an application stored in an application area and a boot loader stored in a boot loading area. Specifically, the application is run to determine whether the embedded device meets the start-up conditions of the upgrade task, and when the start-up conditions of the upgrade task are met, upgrade data for the application sent by the host computer is received, and startup data reflecting the upgrade task is written in a fixed address area; the boot loader is run 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, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written in a fixed address area after the upgrade is completed; until the startup data and / or completion data written by it meet the test completion standard, it is achieved that the embedded device can perform automated upgrade testing without manual operation, and fully utilize the characteristics of the embedded device itself, thereby reducing manual operation links, improving test efficiency, and reducing test costs.
[0055] After the test is completed, when the tester needs to view the parameters in the upgrade test, it can be achieved in the following way.
[0056] In some embodiments, the test data may be presented in a passive manner, which may specifically include: after the test is completed, receiving a query instruction issued by the host computer; and reading the startup data and the completion data from the fixed address area.
[0057] In the embodiment of the present application, through the communication between the host computer and the embedded device, the startup data and completion data stored in the fixed address area after the test is completed can be queried by the host computer, thereby improving the convenience of obtaining test data.
[0058] Furthermore, the test data that needs to be calculated can also be presented in an active manner, which can specifically include: after the test is completed, obtaining the startup data and the completion data from the fixed address area; calculating the upgrade success rate of the upgrade data based on the startup data and the completion data; and uploading the upgrade success rate of the upgrade data to the host computer.
[0059] 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.
[0060] In some embodiments, the step of calculating the upgrade success rate of the upgrade data according to the startup data and the completion data may specifically include: comparing the completion data with the startup data to obtain the upgrade success rate. For example, assuming the upgrade success rate is a, then a=(b / c)*100%, where b is the completion data (i.e., the number of successful upgrades) and c is the startup data (i.e., the number of upgrade startups).
[0061] During the entire upgrade test process, there may be exceptions. How to automatically analyze the causes of the exceptions can effectively improve the upgrade test efficiency and reduce the test cost. The following methods can be used specifically.
[0062] In some embodiments, after the step of calculating the upgrade success rate of the upgrade data according to the startup data and the completion data, the method may further include: Steps 206 to 207: 206. 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; 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.
[0063] 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%, or 90%.
[0064] In a specific embodiment, when the target upgrade success rate (70%) is lower than a preset upgrade success rate threshold (85%), it is determined that an abnormality exists in the upgrade process of the embedded device within the preset time period.
[0065] 207. If yes, obtain the device information, upgrade process information and upgrade data of the relevant devices during the upgrade process within the preset time period, and determine the abnormality analysis data causing the abnormality in the upgrade process based on the device information, the upgrade process information and the upgrade data.
[0066] The upgrade process of embedded devices involves multiple key components and technologies, including processors, bootloaders, network connections, user interfaces, security mechanisms, and differential upgrade technologies. Together, these components and technologies ensure that embedded devices can perform remote software updates stably and efficiently.
[0067] Optionally, the step of determining the abnormal analysis data causing the abnormality in the upgrade process based on the device information, the upgrade process information and the upgrade data includes: extracting upgrade abnormality feature data from the device information, the upgrade process information and the upgrade data; inputting the upgrade abnormality feature data into a pre-trained network prediction model for upgrade abnormality analysis to obtain a model prediction result; and determining the abnormal analysis data causing the abnormality in the upgrade process based on the model prediction result.
[0068] Specifically, extracting the upgrade abnormality feature data from the device information, the upgrade process information, and the upgrade data may be implemented in the following manner: First, the equipment operation data needs to be collected and preprocessed, which includes steps such as cleaning data, filling missing values, standardization and normalization to ensure data quality.
[0069] Before performing anomaly detection, useful features need to be extracted from the raw data. These features can help better describe the state and behavior of the device. Common feature extraction methods include algorithms based on artificial construction, self-supervised learning methods, and various transformation methods. For example, the signal can be feature extracted through methods such as Fourier transform and wavelet transform to obtain a large number of features.
[0070] By analyzing the relationship between different features and recognition rate, we can select the features that are most important for anomaly detection. In addition, we can also use automatic multivariate closed-loop identification technology to improve the recognition efficiency and quality of the model.
[0071] Using the extracted and optimized features, we train traditional supervised machine learning models or deep learning models, extract features from the equipment to be identified, and determine whether there are abnormalities based on the model output. We analyze the feature data and output whether the monitored object is abnormal. If an abnormality is detected, we can further combine historical annotation information and prior information to issue a fault warning.
[0072] In the closed-loop control process of the predictive model, the model can be continuously updated to adapt to changes in the equipment operating environment. This helps to improve the accuracy and robustness of the model.
[0073] Finally, the extracted abnormal feature data is combined with model prediction technology to continuously predict future device operations under the current operating data, and the predicted values are compared with the set target values. Finally, new control actions are calculated to reduce the fluctuations of key variables in the process and operate the device in the optimal state.
[0074] Through the above steps, abnormal feature data for model prediction can be effectively extracted from device information, upgrade process and upgrade data, thereby achieving efficient anomaly detection and fault warning.
[0075] In a specific embodiment of the present application, in order to realize automatic abnormality analysis, Model Predictive Control (MPC) may be used to perform abnormality analysis on the upgrade of embedded devices.
[0076] The MPC used in this application is able to explicitly handle constraints. This capability comes from its optimization-based approach, making its application in embedded systems more flexible and reliable.
[0077] Efficient algorithms and implementation strategies for embedded implementations of predictive control help reduce hardware platform requirements, reduce construction and maintenance costs, and thus better suit the underlying control system.
[0078] Optionally, the present application may also adopt other network prediction models, such as automated anomaly detection based on meta-learning, One-class SVM model, etc.
[0079] In the solution disclosed in the embodiment of the present application, automatic abnormality analysis of embedded devices is performed to help optimize the upgrade process and improve the efficiency of upgrade testing.
[0080] In order to better implement the data processing method in the embodiment of the present application, based on the data processing method, a data processing device is also provided in the embodiment of the present application, which is applied to a processor of an embedded device, wherein the processor includes a storage area, wherein the storage area includes an application area, a boot loading area, and a fixed address area, wherein the application area stores an application, and the boot loading area stores a boot loader, such as Figure 3 As shown, the data processing device 300 includes: The application module 301 is used to determine whether the embedded device meets the start condition of the upgrade task. If so, it receives the upgrade data for the application sent by the host computer and writes the start data reflecting the upgrade task into the fixed address module; The boot loading module 302 is used to determine whether the embedded device meets the upgrade condition of the upgrade task, and if so, upgrade the application based on the upgrade data, and write completion data reflecting the upgrade task into the fixed address module after the upgrade is completed; A fixed address module 303, used for recording the startup data and the completion data; The loop module 304 is used to cyclically start the application module and the boot loader module until the written startup data and / or the completion data meet the test completion standard.
[0081] In some embodiments, the storage area further includes an upgrade module; The application module 301 further includes: A first writing module, configured to write the upgrade data into the upgrade module when receiving the upgrade data; A second writing module, configured to write startup data reflecting the upgrade task into the fixed address area if the upgrade data is successfully written into the upgrade module; The boot loading module 302 further includes: A migration module, used for erasing the original application and migrating the upgrade data to the application area; The third writing module is used for writing completion data reflecting the upgrade task into the fixed address area after the upgrade is completed if the upgrade data is successfully migrated to the application area.
[0082] In some embodiments, the boot loading module 302 further includes: The first judging module is used to judge whether the upgrading module stores the upgrading data.
[0083] In some embodiments, the apparatus further comprises: A receiving module, used for receiving the query instruction sent by the host computer after the test is completed; A reading module is used to read the startup data and the completion data from the fixed address area.
[0084] In some embodiments, the apparatus further comprises: An acquisition module, used for acquiring the startup data and the completion data from the fixed address area after the test is completed; A calculation module is used to calculate the upgrade success rate of the upgrade data according to the startup data and the completion data.
[0085] The uploading module is used to upload the upgrade success rate of the upgrade data to the host computer.
[0086] In some embodiments, the apparatus further comprises: A second judgment module is used to 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; The first determination module is used to obtain the device information, upgrade process information and upgrade data of the relevant devices in the upgrade process within the preset time period, and determine 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.
[0087] In some embodiments, the first determining module further includes: An extraction module, used to extract upgrade abnormality feature data from the device information, the upgrade process information and the upgrade data; An input module, used for inputting the upgrade anomaly feature data into a pre-trained network prediction model for upgrade anomaly analysis to obtain a model prediction result; The second determination module is used to determine the abnormal analysis data causing the abnormality in the upgrade process based on the model prediction result.
[0088] In some embodiments, the upgrade data includes firmware of the same version, so that the processor receives the firmware repeatedly sent down by the host computer for multiple times. In some embodiments, the upgrade data includes multiple firmwares of different versions, so that the processor receives the firmware sent down by the host computer multiple times.
[0089] In an embodiment of the present application, a processor cyclically runs an application stored in an application area and a boot loader stored in a boot loading area. Specifically, the application is run to determine whether the embedded device meets the start-up conditions of the upgrade task, and when the start-up conditions of the upgrade task are met, upgrade data for the application sent by the host computer is received, and startup data reflecting the upgrade task is written in a fixed address area; the boot loader is run 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, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written in a fixed address area after the upgrade is completed; until the startup data and / or completion data written by it meet the test completion standard, it is achieved that the embedded device can perform automated upgrade testing without manual operation, and fully utilize the characteristics of the embedded device itself, thereby reducing manual operation links, improving test efficiency, and reducing test costs.
[0090] In addition to the above-described data processing method and device, the embodiment of the present application further provides an embedded device, which integrates any data processing device provided in the embodiment of the present application, and the embedded device includes: processor; as well as One or more applications, wherein 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 method described in any of the above data processing method embodiments.
[0091] The embedded device integrates any data processing device provided in the embodiments of the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the embedded device involved in the embodiment of the present application, specifically: 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 will appreciate that Figure 4 The embedded device structure shown in the figure does not constitute a limitation on the embedded device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them: The processor 401 is the control center of the embedded device. It uses various interfaces and lines to connect various parts of the entire embedded device. By running or executing software programs and / or modules stored in the processor 401 and calling data stored in the processor 401, it executes 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, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0092] The processor 401 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the processor 401. The processor 401 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the embedded device, etc.
[0093] The embedded device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0094] The embedded device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0095] Although not shown, the embedded device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiment of the present application, the processor 401 in the embedded device will load the executable file corresponding to the process of one or more application programs into the corresponding application program area according to the following instructions, and the processor 401 will run the application program stored in the application program area, thereby realizing various functions, as follows: Run the application to determine whether the embedded device meets the start-up conditions of the upgrade task; if so, receive the upgrade data for the application sent by the host computer, and write the start-up data reflecting the upgrade task in the fixed address area; run the boot loader to determine whether the embedded device meets the upgrade conditions of 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; run the application and the boot loader in a loop until the written start-up data and / or the completion data meet the test completion standard.
[0096] In an embodiment of the present application, a processor cyclically runs an application stored in an application area and a boot loader stored in a boot loading area. Specifically, the application is run to determine whether the embedded device meets the start-up conditions of the upgrade task, and when the start-up conditions of the upgrade task are met, upgrade data for the application sent by the host computer is received, and startup data reflecting the upgrade task is written in a fixed address area; the boot loader is run 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, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written in a fixed address area after the upgrade is completed; until the startup data and / or completion data written by it meet the test completion standard, it is achieved that the embedded device can perform automated upgrade testing without manual operation, and fully utilize the characteristics of the embedded device itself, thereby reducing manual operation links, improving test efficiency, and reducing test costs.
[0097] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a plurality of instructions, which can be loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the instruction can execute the following steps: Run the application to determine whether the embedded device meets the start-up conditions of the upgrade task; if so, receive the upgrade data for the application sent by the host computer, and write the start-up data reflecting the upgrade task in the fixed address area; run the boot loader to determine whether the embedded device meets the upgrade conditions of 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; run the application and the boot loader in a loop until the written start-up data and / or the completion data meet the test completion standard.
[0098] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the embedded device reads the computer instruction from the computer-readable storage medium and executes the computer instruction, so that the embedded device executes the method provided in various optional implementations in the above embodiments.
[0099] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0100] The above is a detailed introduction to a data processing method, device, system and related equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: A processor applied to an embedded device, the processor comprising a storage area, the storage area comprising an application area, a boot loading area and a fixed address area, the application area storing an application, the boot loading area storing a boot loader; the method comprising: Running the application to determine whether the embedded device meets the start condition of the upgrade task; If yes, receiving the upgrade data for the application sent by the host computer, and writing the startup data reflecting the upgrade task into the fixed address area; Running the boot loader to determine whether the embedded device meets the upgrade condition of the upgrade task; If yes, the application is upgraded based on the upgrade data, and completion data reflecting the upgrade task is written into the fixed address area after the upgrade is completed; The application program and the bootloader are run in a loop until the written startup data and / or the completion data meet a test completion criterion.
2. The data processing method according to claim 1, characterized in that: The storage area also includes an upgrade area; The step of receiving the upgrade data for the application 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, writing the upgrade data into the upgrade area; If the upgrade data is successfully written into the upgrade area, then writing startup data reflecting the upgrade task into the fixed address area; The step of upgrading the application based on the upgrade data and writing completion data reflecting the upgrade task into the fixed address area after the upgrade is completed specifically includes: Erasing the original application and migrating the upgrade data to the application area; If the upgrade data is successfully migrated to the application area, completion data reflecting the upgrade task is written into the fixed address area after the upgrade is completed.
3. The data processing method according to claim 2, characterized in that: The step of determining whether the embedded device meets the upgrade condition of the upgrade task includes: It is determined whether the upgrade area stores the upgrade data.
4. The data processing method according to claim 1, characterized in that: The method further comprises: After the test is completed, receiving the query instruction sent by the host computer; The startup data and the completion data are read from the fixed address area.
5. The data processing method according to claim 1, characterized in that: The method further comprises: After the test is completed, obtaining the startup data and the completion data from the fixed address area; Calculating an upgrade success rate of the upgrade data according to the startup data and the completion data; The upgrade success rate of the upgrade data is uploaded to the host computer.
6. The data processing method according to claim 5, characterized in that: 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: According to the upgrade success rate and a preset upgrade success rate threshold, determining whether there is an abnormality in the upgrade process of the embedded device; If so, obtain the device information, upgrade process information and upgrade data of the relevant devices during the upgrade process within the preset time period, and determine 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.
7. The data processing method according to claim 6, characterized in that: The step of determining the abnormal analysis data causing the abnormality in the upgrade process based on the device information, the upgrade process information and the upgrade data includes: Extracting upgrade abnormality feature data from the device information, the upgrade process information, and the upgrade data; Inputting the upgrade anomaly feature data into a pre-trained network prediction model for upgrade anomaly analysis to obtain a model prediction result; Based on the model prediction result, abnormal analysis data causing abnormality in the upgrade process is determined.
8. The data processing method according to claim 1, characterized in that: The upgrade data includes the same version of firmware, so that the processor receives the firmware repeatedly sent by the host computer.
9. The data processing method according to claim 1, characterized in that: The upgrade data includes multiple firmwares of different versions, so that the processor receives the firmwares sent down by the host computer multiple times.
10. A data processing system, characterized in that: The embedded device comprises an embedded device and a host computer, wherein the embedded device is connected to the host computer, the embedded device comprises a processor, the processor comprises a storage area, the storage area comprises an application area, a boot loading area and a fixed address area, the application area stores an application, and the boot loading area stores a boot loader; The host computer is used to periodically detect whether the embedded device is in an idle state, and send upgrade data to the embedded device when the embedded device is in an idle state; The processor is used to run the application program and determine whether the embedded device meets the starting condition of the upgrade task; If yes, receiving the upgrade data for the application sent by the host computer, and writing the startup data reflecting the upgrade task into the fixed address area; The processor is also used to run the boot loader to determine whether the embedded device meets the upgrade conditions of the upgrade task; if so, upgrade the application based on the upgrade data, and write completion data reflecting the upgrade task into the fixed address area after the upgrade is completed; The processor is further configured to run the application program and the boot loader program in a loop until the written startup data and / or the completion data meet a test completion criterion.
11. A data processing device, characterized in that: Applications in embedded devices, including: An application module, used to determine whether the embedded device meets the start condition of the upgrade task, and if so, receive the upgrade data for the application sent by the host computer, and write the start data reflecting the upgrade task into the fixed address module; A boot loading module, used to determine whether the embedded device meets the upgrade conditions of the upgrade task, and if so, upgrade the application based on the upgrade data, and write completion data reflecting the upgrade task into the fixed address module after the upgrade is completed; A fixed address module, used for recording the startup data and the completion data; A loop module is used to cyclically start the application module and the boot loader module until the written startup data and / or the completion data meet the test completion standard.
12. An embedded device, characterized in that: The embedded device comprises: processor; as well as 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 9.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
System and method for pressure testing of firmware update
CN104424068A
Doubly-fed fan fault ride-through method and system based on explicit model predictive control
CN110635513A
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
Camera SD card firmware automatic upgrading and pressure testing method
CN115033258A
