Firmware data processing method, device and flying car

By monitoring device connection events and creating flag files, combined with the location information feedback from the target device, accurate identification of multiple devices and parallel firmware upgrades are achieved, solving the problem of low upgrade efficiency in traditional methods and reducing production costs.

CN119759391APending Publication Date: 2025-04-04GUANGDONG HUITIAN AEROSPACE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411895940.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

When multiple devices are upgraded simultaneously, the traditional embedded device firmware cannot accurately distinguish the mapping relationship between the USB flash drive and the host, resulting in low upgrade efficiency and inability to upgrade in parallel, affecting production costs.

Method used

By listening to device connection events, starting a pre-registered callback event, creating a flag file corresponding to the target device, and sending query instructions to obtain target location information, building a mapping relationship based on the flag file and target location information, and realizing parallel firmware upgrades.

Benefits of technology

It realizes accurate identification and positioning of multiple devices, solves the problem of inability to distinguish the mapping relationship between the USB flash drive and the host in traditional methods, improves firmware upgrade efficiency, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759391A_ABST
    Figure CN119759391A_ABST
Patent Text Reader

Abstract

The present application relates to a firmware data processing method, device and flying car. The method comprises: after monitoring the connection of at least one target device, starting a pre-registered callback event; creating a flag file corresponding to the at least one target device according to the callback event, and sending a query instruction to the at least one target device; receiving the target location information fed back by the at least one target device according to the query instruction, and performing corresponding firmware upgrade processing according to the flag file and the target location information. The solution provided by the present application can effectively realize the accurate identification and positioning of multiple devices, and realize the parallel processing of firmware upgrades of multiple target devices, improve the efficiency of firmware upgrades, and thus reduce production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of device firmware data processing, and in particular to a firmware data processing method, device and flying car. Background Art

[0002] In the traditional embedded device firmware upgrade method, it is usually necessary to connect the USB to an external computer and automatically upgrade the host by copying the firmware to the upgrade disk. However, when multiple embedded device hosts are connected to the computer, multiple USB flash drives will be mapped, making it impossible to distinguish the mapping relationship between the USB flash drive and the host, affecting the correct copying of the corresponding firmware to the corresponding USB flash drive to achieve the correct embedded device firmware upgrade.

[0003] In the related art, a serial upgrade method is generally used to upgrade the firmware of one embedded device at a time to ensure unique mapping; although the above method is convenient, the upgrade efficiency is low and parallel upgrades are not possible, which affects production costs. Summary of the invention

[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a firmware data processing method, device and flying car, which can effectively realize the accurate identification and positioning of multiple devices, and realize the parallel processing of firmware upgrades of multiple target devices, thereby improving the efficiency of firmware upgrades and reducing production costs.

[0005] The first aspect of the present application provides a firmware data processing method, comprising: After listening to at least one target device connection, start the pre-registered callback event; Creating a flag file corresponding to the at least one target device according to the callback event, and sending a query instruction to the at least one target device; Receive the target location information fed back by the at least one target device according to the query instruction, and perform corresponding firmware upgrade processing according to the flag file and the target location information.

[0006] In some implementations, after monitoring at least one target device connection, starting a pre-registered callback event includes: After monitoring a message event generated by at least one target device connected through a preset port, a pre-registered callback event is started.

[0007] In some implementations, creating a flag file corresponding to the at least one target device according to the callback event includes: The identifier information of at least one target device is acquired according to the callback event, and a marker file associated with the identifier information is created in a storage space corresponding to the at least one target device.

[0008] In some implementations, the target location information is obtained by: The at least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information.

[0009] In some implementations, performing corresponding firmware upgrade processing according to the flag file and the target location information includes: A mapping relationship is constructed according to the flag file and the target location information, and corresponding firmware data and firmware upgrade instructions are sent to the at least one target device according to the mapping relationship, so that the at least one target device can perform firmware upgrade according to the corresponding firmware data.

[0010] In some embodiments, the method further comprises: After receiving a feedback signal indicating that the at least one target device has completed upgrading, the data trace of the at least one target device that has completed upgrading is cleared.

[0011] A second aspect of the present application provides a firmware data processing device, comprising: A connection monitoring module, used to start a pre-registered callback event after monitoring at least one target device connection; A callback event response module, used to create a flag file corresponding to the at least one target device according to the callback event, and send a query instruction to the at least one target device; The upgrade execution module is used to receive the target location information fed back by the at least one target device according to the query instruction, and execute corresponding firmware upgrade processing according to the flag file and the target location information.

[0012] In some implementations, the target location information is obtained by: The at least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information. In some embodiments, the device further comprises: The data clearing module is used to clear the data trace of the at least one target device that has completed the upgrade after receiving a feedback signal that the at least one target device has completed the upgrade.

[0013] A third aspect of the present application provides a flying car, comprising: Processor; and The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0014] The technical solution provided by this application may have the following beneficial effects: The technical solution of the present application starts a pre-registered callback event after monitoring the connection of at least one target device; creates a flag file corresponding to at least one target device according to the callback event, and sends a query instruction to at least one target device; receives the target location information fed back by at least one target device according to the query instruction, and performs corresponding firmware upgrade processing according to the flag file and the target location information. The technical solution of the present application utilizes the system monitoring mechanism. After monitoring the connection of the target device that needs to be upgraded, it can accurately perform the firmware upgrade by creating a flag file corresponding to the target device and combining the target location information fed back by the target device, effectively realizing accurate identification and positioning of multiple devices, thereby solving the problem that the traditional method cannot distinguish the mapping relationship between the USB flash drive and the host, and can realize parallel processing of the firmware upgrade of multiple target devices, so that more devices can be upgraded in the same time, improving the efficiency of firmware upgrade, and thus reducing production costs.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0017] Figure 1 It is a flowchart of a firmware data processing method shown in an embodiment of the present application; Figure 2 is another flowchart of the firmware data processing method shown in an embodiment of the present application; Figure 3 is another flowchart of the firmware data processing method shown in an embodiment of the present application; Figure 4 is a schematic diagram of the structure of a firmware data processing device shown in an embodiment of the present application; Figure 5 is another structural schematic diagram of a firmware data processing device shown in an embodiment of the present application; Figure 6 It is a schematic diagram of the structure of a flying car shown in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0019] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0020] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0021] In the traditional embedded device firmware upgrade process, it is usually necessary to connect the USB to an external computer and automatically upgrade the host by copying the firmware to the upgrade disk. However, when multiple embedded device hosts are connected at the same time, multiple USB disk mappings will appear, making it impossible to accurately distinguish the corresponding relationship between the USB disk and the host.

[0022] In the related art, in order to improve the accuracy of the upgrade process, when upgrading the embedded device firmware, a serial upgrade method is generally adopted, upgrading the firmware of one embedded device at a time to ensure unique mapping. Although the above method is convenient, the upgrade efficiency is low and parallel upgrades are not possible, which affects production costs.

[0023] For example, on a large automated production line, hundreds of embedded control devices are used to manage various production links. When the firmware of these devices needs to be upgraded, the system will display a large number of USB flash drive mappings because multiple devices are connected for upgrade at the same time. If the upgrade is performed by connecting the devices one by one, it will obviously take a lot of time and affect the operation of the entire production line, seriously affecting production efficiency.

[0024] In response to the above problems, an embodiment of the present application provides a firmware data processing method that can effectively realize accurate identification and positioning of multiple devices, and realize parallel processing of firmware upgrades of multiple target devices, thereby improving firmware upgrade efficiency and reducing production costs.

[0025] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0026] The firmware data processing method of the present application is mainly used for upgrading the firmware of the embedded device through the external intelligent terminal after the embedded device is connected to the external intelligent terminal. Specifically, the method of the present application can be automatically executed by the test software set on the external intelligent terminal. Among them, the external intelligent terminal may include but is not limited to a smart computer. It should be understood that the embedded device is connected to the external intelligent terminal through its host, and when the embedded device host is connected to the external intelligent terminal, multiple U disks (i.e. storage space, such as D disk) will be mapped on the system of the external intelligent terminal. Among them, the number of embedded devices in the present application is at least one, that is, there can be at least one embedded device that is connected to the external intelligent terminal at the same time and performs a firmware upgrade.

[0027] Figure 1 It is a flowchart of a firmware data processing method shown in an embodiment of the present application.

[0028] See also Figure 1 , the firmware data processing method of the present application includes: S110, after monitoring at least one target device connection, start a pre-registered callback event.

[0029] In this step, the monitoring mechanism of the external intelligent terminal system (eg, Windows system) is utilized to monitor at least one target device to complete the connection, and then start the pre-registered callback event.

[0030] The target device may refer to an embedded device with a firmware upgrade requirement. For example, the target device in this application may be various types of embedded devices such as vehicle-mounted devices, aircraft devices, smart home appliances, industrial control devices, etc. It should be understood that the above-mentioned embedded devices have built-in operating systems, such as Linux systems or Windows systems, and the above-mentioned embedded devices can be connected via data. The callback event may refer to a predefined function that is automatically triggered when a specific condition is met or a program that performs a corresponding operation.

[0031] S120: Create a flag file corresponding to at least one target device according to the callback event, and send a query instruction to the at least one target device.

[0032] In this step, a marker file corresponding to the target device is automatically created according to the callback event, and a query instruction is sent to the target device to complete the creation of the marker file.

[0033] There is a unique identification relationship between the marker file and the target device, that is, different target devices may have different marker files. Specifically, the marker file may be implemented as a text file or a binary file containing a unique identifier of the target device.

[0034] The query instruction is used to instruct the target device to perform corresponding information query and feedback processing. Specifically, the query instruction can be implemented using a custom communication protocol or a standard device query command.

[0035] S130, receiving target location information fed back by at least one target device according to the query instruction, and performing corresponding firmware upgrade processing according to the flag file and the target location information.

[0036] In this step, after receiving the query instruction, the target device performs the corresponding query processing and feeds back its corresponding target location information. After receiving the target location information fed back by the target device, the corresponding firmware upgrade processing is performed on the corresponding target device according to the flag file and the target location information.

[0037] The firmware upgrade process includes but is not limited to: sending firmware data and sending firmware upgrade instructions. The target location information may include root directory path information in the target device for storing firmware files or performing firmware upgrades.

[0038] The firmware data processing method of the present application is that the system continuously monitors the target device connection event through a monitoring mechanism. When the target device is detected to be connected, a pre-registered callback event is immediately triggered, a unique marker file is created for the connected target device, and a query instruction is sent to the connected target device. After the target device returns the specific location information in its system according to the query instruction, the target location information is associated with the previously created marker file, such as establishing a mapping relationship, so as to accurately execute the corresponding firmware upgrade processing on the target device. It should be understood that since each target device has a unique identifier and clear location information, it is possible to process the upgrade requests of multiple target devices at the same time, and realize parallel upgrades of multiple target devices.

[0039] In this embodiment, the firmware data processing method of the present application utilizes a system monitoring mechanism. After monitoring the connection of a target device that needs to be upgraded, the firmware upgrade can be accurately performed by creating a marker file corresponding to the target device and combining the target location information fed back by the target device. This effectively realizes accurate identification and positioning of multiple devices, thereby solving the problem that the traditional method cannot distinguish the mapping relationship between the USB flash drive and the host. It can also realize parallel processing of firmware upgrades for multiple target devices, so that more devices can be upgraded in the same time, thereby improving the efficiency of firmware upgrades and reducing production costs.

[0040] Figure 2 It is another flowchart diagram of the firmware data processing method shown in an embodiment of the present application.

[0041] See also Figure 2 , the firmware data processing method of the present application includes: S210, starting a pre-registered callback event after monitoring a message event generated after at least one target device is connected through a preset port.

[0042] In this step, the monitoring mechanism of the external intelligent terminal system monitors the message event generated after at least one target device is connected through the preset port, thereby starting the pre-registered callback event.

[0043] The preset port may include but is not limited to: a USB port. It should be understood that the target device can be connected to the USB port of the external intelligent terminal through a USB interface. Further, the preset port can also be a designated USB port. That is, the pre-registered callback event can be triggered only when the target device is connected through the designated USB port.

[0044] The message event may include, but is not limited to, feedback information of successful connection to the target device.

[0045] For example, after the target device A is connected via the USB port, a message is generated in the external intelligent terminal system indicating that the USB disk (such as the P disk) has been successfully recognized and popped up. Specifically, the generation of the message event can be achieved through the system's message queue mechanism or through a custom event processing system.

[0046] The pre-registered callback event may be pre-registered before the firmware of the target device is upgraded, that is, the corresponding callback event may be pre-selected and registered according to the message event generated by the connected target device.

[0047] The callback event may include: a pre-registered callback function; when the callback event is triggered, the system will automatically call the pre-registered callback function, and execute a series of related operations through the callback function, such as creating a logo file, sending a query instruction, etc.

[0048] As an example, using a USB port as a preset port, the system continuously monitors the connection events of the USB port. When the target device is detected to be connected through the USB port, the system will generate a message event, which may include feedback information of successful identification of the USB flash drive. The system then searches for a pre-registered callback function based on the feedback information of successful identification of the USB flash drive and executes the function. Specifically, the message event may also include: the USB flash drive identifier information (such as P disk, K disk) assigned by the target device after the connection is completed.

[0049] 220 , obtaining identifier information of at least one target device according to the callback event, creating a marker file associated with the identifier information in a storage space corresponding to the at least one target device, and sending a query instruction to the at least one target device.

[0050] In this step, the identifier information of the target device is obtained according to the callback event, and then a marker file is created in the storage space corresponding to the target device, wherein the identifier information is associated with the marker file, and a query instruction is sent to the target device to complete the creation of the marker file.

[0051] Specifically, associating the identifier information with the marker file may include writing the identifier information into the marker file, or associating the identifier information with a file attribute of the marker file.

[0052] The identifier information may include, but is not limited to: one of the target device's USB flash drive identifier, device serial number, MAC address, and device instance ID. Of course, the identifier information may also include other unique identifiers associated with the target device, which are not limited here.

[0053] For example, after the target device A is connected, the storage space mapped on the system is the P disk, then the USB disk identifier of the target device A is the P disk, and the marker file created in the P disk of the system is "upgrade_K".

[0054] The storage space may be a storage area inside the target device, or may be an external storage space associated with the target device. It should be understood that the storage space is used to store firmware files related to firmware upgrade, and the storage space corresponds to read and write permissions.

[0055] S230, receiving target location information fed back by at least one target device according to the query instruction.

[0056] In this step, after receiving the query instruction, the target device performs corresponding query processing and feeds back its corresponding target location information.

[0057] The target location information is obtained in the following ways: At least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information.

[0058] In the above steps, after receiving the query instruction, the target device can actively query the root directory information of the storage space mapped on the external intelligent terminal system in its own system. Among them, the target device can obtain the root directory information of the corresponding storage space by running the preset root directory query instruction. It should be understood that the preset root directory query instruction can match the embedded device's own system. In this way, the target location information obtained by the target device itself can be more suitable for multiple target devices with different system structures.

[0059] For example, the operating system of the embedded device host is the Linux system, and the directory of the U disk of the connected external intelligent terminal system mapped by the embedded device in the Linux system is the / upgrade_fw directory. The embedded device host can actively execute and send the shell command ls / upgrade_fw, and obtain the root directory information through the return value. If upgrade_P is returned, it means that the U disk of the connected external intelligent terminal system mapped by the embedded device is mapped as the P disk in its own system, that is, the Linux system. In other words, the root directory information obtained by the embedded device according to the query instruction is the P disk, that is, the U disk of the embedded device connected to the external intelligent terminal system is the P disk of its own system.

[0060] After obtaining the root directory information, the target device can perform corresponding conversion processing, including but not limited to: extracting key fields, formatting data, and data conversion, so that the target device can generate a standardized target location information based on the processed root directory information, so that the external intelligent terminal can identify the location of the storage space corresponding to the target device image in the target device's own system through the target location information. Further, the root directory information can refer to the storage location of the marker file in the target device's own system.

[0061] S240, constructing a mapping relationship according to the marker file and the target location information, and sending corresponding firmware data and a firmware upgrade instruction to at least one target device according to the mapping relationship, so that the at least one target device can perform a firmware upgrade according to the corresponding firmware data.

[0062] In this step, a mapping relationship is constructed based on the marker file that has been created and the target location information fed back by the target device that has completed the creation of the marker file, so as to establish a correspondence between the target device and its upgrade path. Then, based on the mapping relationship, the system can accurately send the corresponding firmware data and upgrade instructions to the correct target device, so that the target device can perform the firmware upgrade.

[0063] The firmware upgrade process can be executed by the system controlling the corresponding target device or automatically executed by the target device after receiving the upgrade instruction.

[0064] The mapping relationship constructed based on the marker file and the target location information can be implemented in the form of a mapping table, wherein the mapping table includes a unique correspondence between the target device and the target location information. Specifically, the mapping table can be implemented using a variety of data structures, including but not limited to a hash table, a two-dimensional array or a linked list.

[0065] When an embedded device is connected to the USB port of an external intelligent terminal in the form of a USB flash drive, the external intelligent terminal system (such as the Windows system) will automatically detect the new device and load the corresponding driver to make it accessible and usable. The external intelligent terminal system is generally equipped with a database of hardware devices, including information traces of all connected devices. In other words, as more and more embedded devices are connected, the database of the above hardware devices will become larger and larger, resulting in the weakening of the USB flash drive capability when a new embedded device is connected, affecting loading efficiency and normal use.

[0066] In order to ensure the normal use of the system's connection to the embedded device and the loading efficiency, in some embodiments, the method of the present application may further include the following steps after step S240: S250, after receiving a feedback signal indicating that the at least one target device has completed upgrading, clearing the data trace of the at least one target device that has completed upgrading.

[0067] In this step, a feedback signal indicating that the upgrade of the target device is completed is received, which ensures that the upgrade process of the corresponding target device has been completed, and clears the data traces of the target device in the system. After the firmware upgrade is completed, by clearing the data traces, storage space can be effectively released to ensure the upgrade efficiency of the target device.

[0068] When the target device completes the upgrade, the target device may actively send a corresponding feedback signal, or the external intelligent terminal system may periodically query the connected target device to obtain the upgrade status of the target device.

[0069] Wherein, clearing data traces may include all upgraded device information traces. Further, device information traces may include but are not limited to: temporary files, log files, and cached data generated by the target device during the upgrade process.

[0070] Among them, data traces can be completed through preset data clearing system instructions.

[0071] For example, the external intelligent terminal system is a Windows system, in which the preset data clearing system instruction can be a Powershell command, as follows: # Find all target devices that are no longer connected $nonPresentDevices = Get-PnpDevice | Where-Object { $_.Status -eq 'Error'} # Traverse the devices and remove them foreach ($device in $nonPresentDevices) { # Display device information Write-Host "Removing device:" $device.FriendlyName # Remove device Remove-PnpDevice -InstanceId $device.InstanceId -Confirm:$false } Through the above-mentioned preset data clearing system instructions, it is possible to clear the relevant data traces of the target device that has completed the upgrade and is no longer connected.

[0072] In this embodiment, the firmware data processing method of the present application utilizes the system monitoring mechanism, starts the pre-registered callback time by monitoring the message time generated by the connection of the target device, executes the marker file creation process, realizes a quick response to the target device after connection, and starts the firmware upgrade process in time; utilizes the mapping relationship constructed by the marker file and the target location information to send the corresponding firmware data and firmware upgrade instructions to the correct target device, ensuring the accuracy and reliability of the upgrade process, while realizing parallel upgrades of multiple devices, greatly improving the upgrade efficiency.

[0073] In order to further understand the solution of the present application, the firmware data processing method of the present application is further described below by taking an external intelligent terminal (hereinafter referred to as the main control terminal) as an example of concurrently upgrading the firmware of N embedded devices. The main control terminal is configured with a Windows system.

[0074] Figure 3 It is another flowchart diagram of the firmware data processing method shown in an embodiment of the present application.

[0075] See also Figure 3 , the firmware data processing method of the present application includes: S310, the main control terminal registers a USB device connection callback event through the test software.

[0076] The callback event corresponds to the message event generated by N embedded devices connected via USB.

[0077] S320, connect N embedded devices to the main control terminal in sequence via USB.

[0078] S330: triggering a callback event based on successful identification and ejection of the USB flash drive.

[0079] S340: Create a logo file corresponding to the USB flash drive according to the callback event.

[0080] Among them, the IO operation of the Windows system is used to automatically create a logo file in the U disk, such as creating upgrade_K in the K disk.

[0081] S350, establishing a mapping relationship between the root directory information and the logo file of the U disk mapped in the Linux system fed back by the embedded device, and copying the corresponding firmware data to the U disk according to the mapping relationship.

[0082] The embedded device queries the directory mapped to the U disk in the Linux system, such as the / upgrade_fw directory, and sends the shell command ls / upgrade_fw to check the return value. If it returns upgrade_P, it means that the U disk mapped to the Windows system of the main control terminal is the P disk of the embedded device.

[0083] S360, controlling the embedded device that copies the firmware data to perform firmware upgrade.

[0084] S370: After any embedded device is upgraded, clear its device traces on the master device.

[0085] Among them, the device traces can be cleaned up through the Powershell command of the Windows system of the main control terminal.

[0086] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a firmware data processing device, a flying car and corresponding embodiments.

[0087] The firmware data processing device of the present application is mainly used for upgrading the firmware of the embedded device through the external intelligent terminal after the embedded device is connected to the external intelligent terminal. Among them, the external intelligent terminal may include but is not limited to a smart computer. It should be understood that the embedded device is connected to the external intelligent terminal through its host, and when the embedded device host is connected to the external intelligent terminal, multiple U disks (i.e. storage space, such as D disk) will be mapped on the system of the external intelligent terminal. Among them, the number of embedded devices in the present application is at least one, that is, there can be at least one embedded device that is connected to the external intelligent terminal at the same time and performs firmware upgrade.

[0088] Figure 4It is a structural diagram of a firmware data processing device shown in an embodiment of the present application.

[0089] See also Figure 4 The firmware data processing device 300 of the present application includes: a connection monitoring module 310, a callback event response module 320, and an upgrade execution module 330.

[0090] The connection monitoring module 310 is used to start a pre-registered callback event after monitoring at least one target device connection.

[0091] The connection monitoring module 310 may also start a pre-registered callback event after monitoring a message event generated by at least one target device being connected through a preset port.

[0092] The callback event response module 320 is used to create a flag file corresponding to at least one target device according to the callback event, and send a query instruction to the at least one target device.

[0093] The callback event response module 320 may also obtain identifier information of at least one target device according to the callback event, and create a marker file associated with the identifier information in a storage space corresponding to the at least one target device.

[0094] The upgrade execution module 330 is used to receive the target location information fed back by at least one target device according to the query instruction, and execute the corresponding firmware upgrade process according to the flag file and the target location information.

[0095] The target location information may be obtained in the following manner: at least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information.

[0096] Among them, the upgrade execution module 330 can also build a mapping relationship according to the marker file and the target location information, and send corresponding firmware data and firmware upgrade instructions to at least one target device according to the mapping relationship, so that at least one target device can perform firmware upgrade according to the corresponding firmware data.

[0097] Figure 5 It is another structural schematic diagram of the firmware data processing device shown in an embodiment of the present application.

[0098] See also Figure 5 In some implementations, the firmware data processing device 300 of the present application may further include: The data clearing module 340 is used to clear the data trace of the at least one target device that has completed the upgrade after receiving a feedback signal indicating that the at least one target device has completed the upgrade.

[0099] In this embodiment, the firmware data processing device of the present application starts a pre-registered callback event after monitoring the connection of at least one target device; creates a flag file corresponding to at least one target device according to the callback event, and sends a query instruction to at least one target device; receives the target location information fed back by at least one target device according to the query instruction, and performs corresponding firmware upgrade processing according to the flag file and the target location information. The technical solution of the present application utilizes the system monitoring mechanism. After monitoring the connection of the target device that needs to be upgraded, it can accurately perform the firmware upgrade by creating a flag file corresponding to the target device and combining the target location information fed back by the target device, effectively realizing accurate identification and positioning of multiple devices, thereby solving the problem that the traditional method cannot distinguish the mapping relationship between the USB flash drive and the host, and can realize parallel processing of the firmware upgrade of multiple target devices, so that more devices can be upgraded in the same time, improving the efficiency of firmware upgrade, and thus reducing production costs.

[0100] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0101] Figure 6 It is a schematic diagram of the structure of a flying car shown in an embodiment of the present application.

[0102] See also Figure 6 , the flying car 1000 includes a memory 1010 and a processor 1020 .

[0103] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0104] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0105] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.

[0106] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0107] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0108] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A firmware data processing method, characterized in that: include: After listening to at least one target device connection, start the pre-registered callback event; Creating a flag file corresponding to the at least one target device according to the callback event, and sending a query instruction to the at least one target device; Receive the target location information fed back by the at least one target device according to the query instruction, and perform corresponding firmware upgrade processing according to the flag file and the target location information.

2. The method according to claim 1, characterized in that After monitoring at least one target device connection, starting a pre-registered callback event includes: After monitoring a message event generated by at least one target device connected through a preset port, a pre-registered callback event is started.

3. The method according to claim 1, characterized in that The step of creating a flag file corresponding to the at least one target device according to the callback event includes: The identifier information of at least one target device is acquired according to the callback event, and a marker file associated with the identifier information is created in a storage space corresponding to the at least one target device.

4. The method according to claim 3, characterized in that The target location information is obtained by: The at least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information.

5. The method according to claim 1, characterized in that The performing corresponding firmware upgrade processing according to the flag file and the target location information includes: A mapping relationship is constructed according to the flag file and the target location information, and corresponding firmware data and firmware upgrade instructions are sent to the at least one target device according to the mapping relationship, so that the at least one target device can perform firmware upgrade according to the corresponding firmware data.

6. The method according to claim 1, characterized in that The method further includes: After receiving a feedback signal indicating that the at least one target device has completed upgrading, the data trace of the at least one target device that has completed upgrading is cleared.

7. A firmware data processing device, characterized in that: include: A connection monitoring module, used to start a pre-registered callback event after monitoring at least one target device connection; A callback event response module, used to create a flag file corresponding to the at least one target device according to the callback event, and send a query instruction to the at least one target device; The upgrade execution module is used to receive the target location information fed back by the at least one target device according to the query instruction, and execute corresponding firmware upgrade processing according to the flag file and the target location information.

8. The device according to claim 7, characterized in that The target location information is obtained by: The at least one target device queries the root directory information of the storage space corresponding to the at least one target device in its own system according to the received query instruction, and determines the target location information of the at least one target device according to the root directory information.

9. The device according to claim 7, characterized in that The device also includes: The data clearing module is used to clear the data trace of the at least one target device that has completed the upgrade after receiving a feedback signal that the at least one target device has completed the upgrade.

10. A flying car, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.