Firmware burning method, device and storage medium
Through multiple USB ports of the IPC, multiple terminal devices are connected to multiple terminal devices, and based on the firmware management method of USB instance ID, multiple devices are implemented in parallel writing firmware, solving the problem of low writing efficiency of multi-device firmware in the prior art, improving writing efficiency and reducing costs.
Patent Information
- Application Number
- CN202411894161.X
- 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
In the prior art, the firmware writing efficiency of multiple devices in industrial scenarios is low, and it is impossible to complete the firmware writing of all vehicle network devices in a short time.
Connect to multiple terminal devices through multiple USB ports of IPC, and implements the parallel firing of firmware based on the USB instance ID. The specific steps include determining the target USB instance ID corresponding to the terminal device to be written, determining the target firmware based on the configuration information, and sending the target firmware to the terminal device corresponding to the USB instance ID.
It improves the firmware writing efficiency of multiple devices, is suitable for factory production lines and automated testing, reduces manual intervention, improves work efficiency, and reduces operating costs.
Smart Images

Figure CN119759397A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a firmware burning method, device and storage medium. Background Art
[0002] The method of burning firmware for Cellular Vehicle-to-Everything (C-V2X) devices is to connect the device's Universal Serial Bus (USB) interface to the host computer, power off and restart the device, and trigger the host computer's dedicated software to burn the firmware. With the deep integration of information technology and the automotive industry, vehicle-to-everything (V2X), as a key component of the intelligent transportation system, is accelerating its development worldwide.
[0003] A large number of Internet of Vehicles devices will be deployed in the laboratories of C-V2X equipment suppliers for automated testing. The current method of manually burning device firmware in sequence cannot complete the firmware burning of all vehicle network devices in a short period of time. Summary of the invention
[0004] The present invention provides a firmware burning method, device and storage medium, which are used to solve the technical problem of low efficiency of firmware burning of multiple devices in industrial scenarios in the prior art.
[0005] In a first aspect, the present invention provides a firmware burning method, which is applied to an industrial control computer IPC, and the method comprises the following steps: Determine a target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID.
[0006] In some embodiments, the method further comprises: Receive one or more firmwares and the configuration information sent by the host computer.
[0007] In some embodiments, determining the target USB instance IDs corresponding to the one or more terminal devices to be programmed includes: A target USB instance ID corresponding to each terminal device to be programmed is determined according to a first corresponding relationship; the first corresponding relationship includes a corresponding relationship between each USB instance ID and the terminal device.
[0008] In some embodiments, the method further comprises: Detect whether there is a terminal device that is currently restarting; In the case that there is currently a restarted terminal device, it is determined that the terminal device to be programmed is the restarted one or more terminal devices.
[0009] In a second aspect, the present invention provides a firmware burning method, which is applied to a host computer, and the method comprises: Send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0010] In some embodiments, the method further comprises: Determine one or more terminal devices corresponding to each firmware; Determine the USB instance IDs corresponding to the one or more terminal devices respectively according to the first corresponding relationship, and obtain the association relationship between the firmware and the USB instance ID; The association between the firmware and the USB instance ID is used as configuration information.
[0011] In some embodiments, the method further comprises: Determine a target programmable logic controller (PLC) power port; the target PLC power port is used to supply power to the terminal device to be programmed; Send a restart instruction to the PLC; the restart instruction is used to instruct the target PLC power port to power off and then power on.
[0012] In some embodiments, determining the target PLC power port includes: Determine the terminal device to be burned; The target PLC power port corresponding to the terminal device to be programmed is determined according to a second corresponding relationship; the second corresponding relationship includes a connection relationship between each terminal device and the PLC power port.
[0013] In a third aspect, the present invention provides a firmware burning device, comprising the following modules: The first determination module is used to determine the target universal serial bus USB instance identification IDs corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of the multiple USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; A second determination module is used to determine the target firmware corresponding to the target USB instance ID according to configuration information; the configuration information includes a correspondence between each USB instance ID and the firmware; The first sending module is used to send the target firmware corresponding to the target USB instance ID to the terminal device to be burned corresponding to the target USB instance ID.
[0014] In a fourth aspect, the present invention provides a firmware burning device, comprising the following modules: The second sending module is used to send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0015] In a fifth aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the firmware burning method as described in the first aspect or the second aspect is implemented.
[0016] In a sixth aspect, a non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the firmware burning method as described in the first aspect or the second aspect above.
[0017] In a seventh aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the firmware burning method as described in the first aspect or the second aspect above is implemented.
[0018] The firmware burning method, device and storage medium provided by the present invention determine the target device Universal Serial Bus (USB) instance identification IDs corresponding to one or more terminal devices to be burned; each USB instance ID is used to indicate one of the multiple USB interfaces on the IPC, and the USB interface is used to connect the terminal device; the target firmware corresponding to the target USB instance ID is determined according to the configuration information, and the configuration information includes the corresponding relationship between each USB instance ID and the firmware; the target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID. The connection with multiple terminal devices is realized through multiple USB ports of the IPC, and the firmware management method based on the USB instance ID realizes the parallel burning of firmware for multiple devices, thereby improving the firmware burning efficiency of multiple devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 This is a flowchart of the current method of manually burning C-V2X device firmware.
[0021] Figure 2 This is one of the flow charts of the firmware burning method provided by the present invention.
[0022] Figure 3 It is a flowchart of a specific example of the firmware burning method provided by the present invention.
[0023] Figure 4 This is the second flow chart of the firmware burning method provided by the present invention.
[0024] Figure 5 This is one of the structural schematic diagrams of the firmware burning device provided by the present invention.
[0025] Figure 6 This is the second structural schematic diagram of the firmware burning device provided by the present invention.
[0026] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0027] Figure 1 This is a flowchart of the current method of manually burning C-V2X device firmware, such as Figure 1 As shown, when the version server releases a new firmware, the host computer downloads the firmware file to the host computer through the network, starts the firmware burning software in the host computer, selects the firmware file for configuration, and then connects the C-V2X device to the host computer via a USB cable. The power of the C-V2X device is turned off and then turned on again. At this time, the firmware burning software detects that the device is started, and transfers the firmware file to the C-V2X device via the USB cable for burning. After the burning process is completed, the device is turned off and then turned on again, and the C-V2X device starts and works with the new firmware.
[0028] The current firmware burning method is to burn the firmware version of a single C-V2X device serially through manual operation, which is suitable for manual testing and scenarios with a small number of test devices. There are a large number of C-V2X devices on the automated test line or factory production line, and the firmware burning of all devices needs to be completed in a short time. The current firmware burning method has the following main problems: First, the current host computer generally uses a laptop or desktop computer, which has a limited number of USB interfaces and is not suitable for 24-hour operation throughout the year. New hardware products are needed to replace personal computers or desktop computers, support multiple USB interfaces, and have stable and reliable hardware that supports 24-hour operation throughout the year. The hardware environment for burning needs to be redesigned.
[0029] Second, the current manual power-off method needs to be changed to program-controlled equipment power-off.
[0030] Third, the current firmware burning software only supports the burning of firmware for one device. It needs to be redeveloped according to the hardware environment to support the identification of multiple device USB interfaces and parallel automatic burning, and to support the burning of different device firmware on different USB interfaces.
[0031] Based on the above technical problems, the present invention proposes a firmware burning method, which connects multiple terminal devices through multiple USB ports of an IPC, and realizes parallel firmware burning of multiple devices based on a firmware management method of a USB instance ID. Specifically, the USB instance ID is corresponded to the terminal device one by one, and the target firmware corresponding to the USB instance ID is determined according to the configuration information, and then the target firmware is sent to the terminal device corresponding to the USB instance ID, thereby improving the firmware burning efficiency of multiple devices. The method is suitable for factory production lines and automated testing, has a wider range of applicable scenarios, improves work efficiency, reduces operating costs for enterprises, accelerates product market launch, and achieves more economic benefits.
[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] Figure 2 It is one of the flowcharts of the firmware burning method provided by the present invention, such as Figure 2 As shown, the present invention provides a firmware burning method, and the execution subject can be an industrial personal computer (IPC). The method includes: Step 201: determine target universal serial bus (USB) instance identification IDs corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device.
[0034] Specifically, in the embodiment of the present application, an IPC is used to replace a laptop or desktop computer to perform firmware burning control. An IPC is a computer designed for industrial environments and is used to perform various industrial automation tasks. It has the characteristics of high stability, high reliability, and the ability to work in harsh environments. IPCs are commonly used in manufacturing production lines, telecommunications, power systems, traffic monitoring systems, medical equipment, and other fields.
[0035] In order to achieve parallel burning, multiple Universal Serial Bus (USB) interface cards can be installed in the IPC to support multiple terminal devices connected to the IPC via USB cables. The terminal device can be a C-V2X device. The terminal device to be burned refers to the terminal device that needs to be burned with firmware.
[0036] During the firmware burning stage, it is necessary to determine which UBS interface is connected to the terminal device to be burned, and which firmware is to be burned. First, determine the UBS interfaces to which one or more terminal devices to be burned are connected: USB instance identification IDs can be used to distinguish different USB interfaces. Each USB instance identification ID uniquely indicates a USB interface on the IPC, and determine the target USB instance identification IDs corresponding to one or more terminal devices to be burned.
[0037] The USB instance ID is a unique identifier assigned by the operating system to identify each specific USB device when the USB device (such as the terminal device in the embodiment of the present application) is connected to the computer, and contains information about the device, such as its vendor ID (VID) and product ID (PID), as well as other device parameters. This instance ID ensures that even if multiple devices of the same model are connected to the system, they can be uniquely identified and managed.
[0038] Step 202: Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware.
[0039] Specifically, the configuration information includes the corresponding relationship between each USB instance ID and the firmware, that is, the configuration information includes the association relationship between the USB instance ID and the firmware name, and the firmware associated with the target USB instance ID is matched from the configuration information to obtain the target firmware.
[0040] For example, multiple terminal devices to be programmed are connected to the IPC, such as C-V2X_1, C-V2X_2, and C-V2X_3, and the USB instance IDs corresponding to these C-V2X devices are determined to be USB instance_1, USB instance_2, and USB instance_3. In the configuration information, USB instance_1 and USB instance_2 are associated with firmware 1, and USB instance_3 is associated with firmware 2. Therefore, it can be obtained that the target firmware corresponding to USB instance_1 is firmware 1, the target firmware corresponding to USB instance_2 is firmware 1, and the target firmware corresponding to USB instance_3 is firmware 2.
[0041] Step 203: Send the target firmware corresponding to the target USB instance ID to the terminal device to be burned corresponding to the target USB instance ID.
[0042] Specifically, the target firmware is sent to the terminal device to be burned corresponding to the associated USB instance ID, and the terminal device to be burned performs firmware burning after receiving the target firmware.
[0043] For example, firmware 1 is sent to the terminal device C-V2X_1 to be burned corresponding to USB instance_1 and C-V2X_2 corresponding to USB instance_2, and firmware 2 is sent to C-V2X_3 corresponding to USB instance_3. Firmware burning is performed on each device at the same time, where C-V2X_1 burns firmware 1, C-V2X_2 burns firmware 1, and C-V2X_3 burns firmware 2.
[0044] The firmware burning method provided in the embodiment of the present application connects to multiple terminal devices through multiple USB ports of an IPC, and realizes parallel firmware burning of multiple devices based on the firmware management method of the USB instance ID. Specifically, the USB instance ID is corresponded to the terminal device one by one, and the target firmware corresponding to the USB instance ID is determined according to the configuration information, and then the target firmware is sent to the terminal device corresponding to the USB instance ID, thereby improving the firmware burning efficiency of multiple devices; there is no need to develop special burning hardware, saving development and testing costs, and being able to quickly implement applications; and the use of mature market products such as IPC ensures the stability and reliability of parallel burning.
[0045] In some embodiments, the method further comprises: Receive one or more firmwares and the configuration information sent by the host computer.
[0046] Specifically, in the early configuration stage, the host computer sends one or more firmwares to be burned to the IPC, and sends configuration information including the corresponding relationship between the USB instance ID and the firmware. The IPC receives the one or more firmwares and configuration information sent by the host computer.
[0047] Before sending, the host computer obtains the firmware to be burned from the version server and obtains the configuration information.
[0048] In some embodiments, the step of the host computer obtaining configuration information may include: Determine one or more terminal devices corresponding to each firmware; determine the USB instance IDs corresponding to the one or more terminal devices respectively according to the first corresponding relationship, and obtain the association relationship between the firmware and the USB instance ID; and use the association relationship between the firmware and the USB instance ID as configuration information.
[0049] The first corresponding relationship includes the corresponding relationship between each USB instance ID and the terminal device, and specifically may be the corresponding relationship between each USB instance ID and the terminal device model.
[0050] The firmware burning method provided in the embodiment of the present application uses the configuration information and firmware provided by the host computer, so that the IPC determines the target firmware corresponding to each terminal to be burned based on the configuration information, thereby realizing parallel burning of the firmware of the terminal device and improving the burning efficiency.
[0051] In some embodiments, determining the target USB instance IDs corresponding to the one or more terminal devices to be programmed includes: A target USB instance ID corresponding to each terminal device to be programmed is determined according to a first corresponding relationship; the first corresponding relationship includes a corresponding relationship between each USB instance ID and the terminal device.
[0052] Specifically, the IPC determines a target USB instance ID corresponding to each terminal device to be programmed according to a first corresponding relationship, wherein the first corresponding relationship includes a corresponding relationship between each USB instance ID and a terminal device, and is obtained after each terminal device is connected to each USB interface.
[0053] For example, 16 C-V2X devices are connected to the USB expansion card of the IPC via USB cables, and the 16 USB instance IDs are checked in the IPC, and a corresponding relationship table between the USB instance ID and the C-V2X device model is generated, i.e., the first corresponding relationship. After the host computer obtains each firmware from the version server and sends it to the IPC, the IPC determines one or more C-V2X device models corresponding to each version of the firmware, and then determines the target USB instance ID corresponding to each of the one or more C-V2X device models from the first corresponding relationship.
[0054] The firmware burning method provided in the embodiment of the present application can quickly determine the target USB instance ID corresponding to the terminal device to be burned based on the pre-generated first corresponding relationship, so that the IPC can send the corresponding version of the firmware to the corresponding terminal device through the target USB instance ID in a timely and accurate manner, thereby improving the efficiency of batch firmware burning.
[0055] In some embodiments, the method further comprises: Detect whether there is a terminal device that is currently restarting; In the case that there is currently a restarted terminal device, it is determined that the terminal device to be programmed is the restarted one or more terminal devices.
[0056] Specifically, before determining the target USB instance ID, the IPC first determines which terminal devices are currently to be burned: the IPC detects whether there is a terminal device that is currently restarting, that is, whether a terminal device restart is currently detected. If a terminal device restart is detected, the terminal device is determined to be a terminal device to be burned. Then, the target USB instance ID corresponding to the terminal device to be burned is determined, and the target firmware corresponding to the target USB instance ID is further determined according to the configuration information, and sent to the terminal device for burning.
[0057] In the embodiment of the present application, different power ports of the target programmable logic controller (PLC) are used to power different terminal devices. PLC is a digital electronic device designed for industrial environments and used to control machines and processes. The restart of the terminal device can be controlled by the PLC in combination with a relay, and can be program-controlled by a host computer, which is easy to automate.
[0058] In some embodiments, the step of the upper computer controlling the power supply of the terminal device includes: determining the target PLC power port, which is used to power the terminal device to be burned; sending a restart instruction to the PLC, which is used to instruct the target PLC power port to be powered off and then on.
[0059] Specifically, the host computer first determines the target PLC power port that supplies power to each terminal device to be burned, and then generates a restart instruction, which is used to instruct the PLC to power off and then power on the target PLC power port. The host computer sends the restart instruction to the PLC. After the PLC receives the restart instruction, it controls the relay to power off and then power on the indicated target PLC power port, thereby realizing the restart of the terminal device to be burned.
[0060] In some embodiments, the host computer can determine the target PLC power port based on the second correspondence: determine the terminal device to be burned, and determine the target PLC power port corresponding to the terminal device to be burned according to the second correspondence, and the second correspondence includes the connection relationship between each terminal device and the PLC power port.
[0061] Specifically, a PLC power port is used to power multiple terminal devices, and the PLC power port corresponding to each terminal device is recorded in the host computer, that is, the second corresponding relationship. After the host computer determines the terminal device to be burned, the second corresponding relationship is queried to determine the target PLC power port corresponding to each terminal device to be burned.
[0062] The firmware burning method provided in the embodiment of the present application controls the power supply of each terminal device through the instructions of the PLC and the host computer, realizes automatic power-off of the equipment, and then realizes automatic batch burning of firmware, reduces labor costs, improves work efficiency, and ensures the stability and reliability of parallel burning.
[0063] The information transmission methods provided in the above embodiments are further described below through specific examples: Figure 3 is a flowchart of a specific example of the firmware burning method provided by the present invention, such as Figure 3 As shown in the figure, the firmware update process of the C-V2X device is: Step 1: Use different ports of the PLC power supply to power N C-V2Xs (N is a positive integer), and record the correspondence table between C-V2X device information and PLC power supply port number (i.e., the second correspondence) in the host computer.
[0064] Step 2: Connect 16 C-V2X devices to the USB expansion card of the industrial control computer via USB cables.
[0065] Step 3: View the 16-channel USB instance ID in IPC. The USB instance ID consists of the vendor ID (VID) and product ID (PID), and configure the correspondence table between the USB instance ID and the C-V2X device model (i.e., the first correspondence).
[0066] Step 4: The version server releases the C-V2X device firmware.
[0067] Step 5: The host computer obtains the firmware version from the version server and determines the C-V2X device model corresponding to the firmware. According to the device model, the host computer queries the correspondence table (i.e., the first correspondence) to obtain the corresponding USB instance ID. According to the USB instance ID and the firmware name, the host computer generates a configuration file (i.e., configuration information), and then transfers the configuration file and firmware to the specified directory in the IPC.
[0068] Step 6: The IPC firmware burning automation software detects the configuration files and firmware files in the specified directory, reads the configuration and prepares to burn, and starts to detect whether there is a C-V2X device powered off and restarted.
[0069] Step 7: The host computer queries the correspondence table (i.e., the second correspondence), sends instructions to the PLC, and powers off and then on one or more C-V2X devices that need to be burned with firmware.
[0070] Step 8: After receiving the command, the PLC controls the relay to power off and then power on the specified port.
[0071] Step 9: Power off the C-V2X device and then power it on again to restart the device.
[0072] Step 10: The firmware burning automation software in the IPC detects that the C-V2X device has restarted, queries the restart USB instance ID list, and obtains the firmware file name based on the corresponding relationship according to the configuration file. Different firmware files can be batch-sent and burned at the same time.
[0073] Step 11: C-V2X device flashing is complete.
[0074] Step 12: The host computer detects that the C-V2X device is programmed, queries the corresponding table, obtains the PLC power port number of the C-V2X device, and sends a command to the PLC power supply to power off and then on.
[0075] Step 13: The PLC receives the command and controls the relay again to power off and then power on the specified port.
[0076] Step 14: C-V2X restarts and works with the new firmware.
[0077] After the above steps, the C-V2X devices can be automatically batch-programmed with firmware. The host computer can then communicate with the C-V2X devices through the serial port or network port to obtain information such as the model and SN number (serial number) for recording.
[0078] This application can quickly establish a reliable and stable automatic firmware burning system through common products in the industry. The firmware burning method provided in the embodiment of this application can implement a method based on USB instance ID, without interacting with the device, to complete the parallel firmware burning of C-V2X devices. There is no need to develop special burning hardware, saving development and testing costs, and can be quickly implemented. In addition, this system has been put into use in automated testing and factory production lines. The USB interface is basically a necessary interface in device products. The firmware burning method of this application can be used in the process of new product development to achieve parallel automated burning of products without more manual participation, quickly realize factory production line production of new products and laboratory automated testing, save time for the rapid launch of new products on the market, and reduce operating costs, which can obtain more economic benefits.
[0079] Specifically, the firmware burning method provided in the embodiment of the present application mainly includes the following beneficial effects: First, most current burning technologies use non-USB interfaces and require the development of dedicated burning hardware systems. New hardware development requires debugging and testing before it can be stable. The system of the present invention does not require the development of dedicated hardware, and uses mature products commonly used in the industry, such as IPC, PLC, relays, and USB interface cards, to build the system. It does not require hardware driver development and debugging, and uses mature products in the market, so the system is stable and reliable.
[0080] Second, the firmware burning method of the present invention manages product models and firmware versions through USB instance IDs. There is no need to interact with the device before burning the version, and it can be used for equipment in factory production lines. The production line equipment cannot be started before the factory firmware is burned, so it is impossible to read the device network port MAC address, serial number and other information from the device serial port and other interfaces. This burning system can burn the firmware first, and then read the device information for recording after the device is started.
[0081] Figure 4 This is the second flow chart of the firmware burning method provided by the present invention. Figure 4 As shown, the present invention provides a firmware burning method, and the execution subject can be a host computer. The method includes: Step 401, sending configuration information and one or more firmwares to the IPC; the configuration information includes the correspondence between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0082] In some embodiments, the method further comprises: Determine one or more terminal devices corresponding to each firmware; Determine the USB instance IDs corresponding to the one or more terminal devices respectively according to the first corresponding relationship, and obtain the association relationship between the firmware and the USB instance ID; The association between the firmware and the USB instance ID is used as configuration information.
[0083] In some embodiments, the method further comprises: Determine a target programmable logic controller (PLC) power port; the target PLC power port is used to supply power to the terminal device to be programmed; Send a restart instruction to the PLC; the restart instruction is used to instruct the target PLC power port to power off and then power on.
[0084] In some embodiments, determining the target PLC power port includes: Determine the terminal device to be burned; The target PLC power port corresponding to the terminal device to be programmed is determined according to a second corresponding relationship; the second corresponding relationship includes a connection relationship between each terminal device and the PLC power port.
[0085] Specifically, the firmware burning method provided by the present invention can refer to the above-mentioned firmware burning method embodiment in which the execution subject is IPC, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the above-mentioned corresponding method embodiments will not be described in detail here.
[0086] Figure 5 This is one of the structural diagrams of the firmware burning device provided by the present invention. Figure 5 As shown, the present invention provides a firmware burning device, including a first determining module 501, a second determining module 502 and a first sending module 503.
[0087] The first determination module 501 is used to determine the target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of the multiple USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; The second determination module 502 is used to determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The first sending module 503 is used to send the target firmware corresponding to the target USB instance ID to the terminal device to be burned corresponding to the target USB instance ID.
[0088] In some embodiments, it also includes: The first receiving module is used to receive one or more firmwares and the configuration information sent by the host computer.
[0089] In some embodiments, the first determining module includes: The first determining unit is used to determine a target USB instance ID corresponding to each terminal device to be programmed according to a first corresponding relationship; the first corresponding relationship includes a corresponding relationship between each USB instance ID and the terminal device.
[0090] In some embodiments, it also includes: A detection module is used to detect whether there is a terminal device that is currently restarting; The third determination module is used to determine that the terminal device to be programmed is one or more of the restarted terminal devices when there is currently a restarted terminal device.
[0091] Specifically, the above-mentioned firmware burning device provided by the present invention can implement all the method steps implemented by the above-mentioned firmware burning method embodiment in which the execution subject is IPC, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0092] Figure 6 This is the second structural diagram of the firmware burning device provided by the present invention. Figure 6 As shown, the present invention provides a firmware burning device, including a second sending module 601.
[0093] The second sending module 601 is used to send configuration information and one or more firmwares to the IPC; the configuration information includes the correspondence between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0094] In some embodiments, it also includes: A fourth determination module, used to determine one or more terminal devices corresponding to each firmware; A fifth determining module, configured to determine the USB instance IDs respectively corresponding to the one or more terminal devices according to the first corresponding relationship, and obtain an association relationship between the firmware and the USB instance ID; The sixth determining module is used to use the association between the firmware and the USB instance ID as configuration information.
[0095] In some embodiments, it also includes: A seventh determination module is used to determine a target programmable logic controller (PLC) power port; the target PLC power port is used to supply power to the terminal device to be programmed; The third sending module is used to send a restart instruction to the PLC; the restart instruction is used to instruct the target PLC power port to be powered off and then powered on.
[0096] In some embodiments, the seventh determination module includes: A second determining unit, used to determine the terminal device to be programmed; The third determining unit is used to determine the target PLC power port corresponding to the terminal device to be burned according to the second corresponding relationship; the second corresponding relationship includes the connection relationship between each terminal device and the PLC power port.
[0097] Specifically, the above-mentioned firmware burning device provided by the present invention can implement all the method steps implemented by the above-mentioned firmware burning method embodiment in which the execution subject is the host computer, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0098] It should be noted that the division of units / modules in the above-mentioned embodiments of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0099] Figure 7 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor 701, a communications interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communications interface 702 and the memory 703 communicate with each other via the communication bus 704. The processor 701 may call the logic instructions in the memory 703 to execute the firmware burning method, which includes: Determine a target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID.
[0100] In some embodiments, the method further comprises: Receive one or more firmwares and the configuration information sent by the host computer.
[0101] In some embodiments, determining the target USB instance IDs corresponding to the one or more terminal devices to be programmed includes: A target USB instance ID corresponding to each terminal device to be programmed is determined according to a first corresponding relationship; the first corresponding relationship includes a corresponding relationship between each USB instance ID and the terminal device.
[0102] In some embodiments, the method further comprises: Detect whether there is a terminal device that is currently restarting; In the case that there is currently a restarted terminal device, it is determined that the terminal device to be programmed is the restarted one or more terminal devices.
[0103] Alternatively, the method in which the processor 701 calls the logic instructions in the memory 703 to execute includes: Send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0104] In some embodiments, the method further comprises: Determine one or more terminal devices corresponding to each firmware; Determine the USB instance IDs corresponding to the one or more terminal devices respectively according to the first corresponding relationship, and obtain the association relationship between the firmware and the USB instance ID; The association between the firmware and the USB instance ID is used as configuration information.
[0105] In some embodiments, the method further comprises: Determine a target programmable logic controller (PLC) power port; the target PLC power port is used to supply power to the terminal device to be programmed; Send a restart instruction to the PLC; the restart instruction is used to instruct the target PLC power port to power off and then power on.
[0106] In some embodiments, determining the target PLC power port includes: Determine the terminal device to be burned; The target PLC power port corresponding to the terminal device to be programmed is determined according to a second corresponding relationship; the second corresponding relationship includes a connection relationship between each terminal device and the PLC power port.
[0107] Specifically, the processor 701 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD), and the processor may also adopt a multi-core architecture.
[0108] The logic instructions in the memory 703 can be implemented in the form of software functional units and can be stored in a processor-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0109] In some embodiments, a computer program product is further provided. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the firmware burning method provided by the above-mentioned method embodiments. The method includes: Determine a target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID.
[0110] Or include: Send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0111] Specifically, the above-mentioned computer program product provided in the embodiment of the present application can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0112] In some embodiments, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to enable a computer to execute the firmware burning method provided by the above-mentioned method embodiments, and the method includes: Determine a target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID.
[0113] Or include: Send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
[0114] Specifically, the above-mentioned computer-readable storage medium provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects that are the same as the method embodiments in this embodiment will not be described in detail here.
[0115] It should be noted that the computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0116] It should also be noted that the terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are usually of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0117] In the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar to them.
[0118] In the present invention, "determine B based on A" means that the factor A should be considered when determining B. It is not limited to "B can be determined based on A alone", but should also include: "determine B based on A and C", "determine B based on A, C and E", "determine C based on A, and further determine B based on C", etc. In addition, it can also include taking A as a condition for determining B, for example, "when A meets the first condition, use the first method to determine B"; for another example, "when A meets the second condition, determine B", etc.; for another example, "when A meets the third condition, determine B based on the first parameter", etc. Of course, it can also be a condition that takes A as a factor for determining B, for example, "when A meets the first condition, use the first method to determine C, and further determine B based on C", etc.
[0119] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A firmware burning method, characterized in that: Applied to industrial control computers (IPC), the method includes: Determine a target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to the terminal device; Determine the target firmware corresponding to the target USB instance ID according to the configuration information; the configuration information includes the corresponding relationship between each USB instance ID and the firmware; The target firmware corresponding to the target USB instance ID is sent to the terminal device to be burned corresponding to the target USB instance ID.
2. The firmware burning method according to claim 1, characterized in that: The method further comprises: Receive one or more firmwares and the configuration information sent by the host computer.
3. The firmware burning method according to claim 1, characterized in that: The step of determining the target USB instance IDs corresponding to the one or more terminal devices to be programmed includes: A target USB instance ID corresponding to each terminal device to be programmed is determined according to a first corresponding relationship; the first corresponding relationship includes a corresponding relationship between each USB instance ID and the terminal device.
4. The firmware burning method according to claim 1 or 3, characterized in that: The method further comprises: Detect whether there is a restarted terminal device currently; In the case that there is currently a restarted terminal device, it is determined that the terminal device to be programmed is the restarted one or more terminal devices.
5. A firmware burning method, characterized in that: Applied to a host computer, the method includes: Send configuration information and one or more firmwares to the IPC; the configuration information includes the corresponding relationship between each USB instance ID and the firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
6. The firmware burning method according to claim 5, characterized in that: The method further comprises: Determine one or more terminal devices corresponding to each firmware; Determine the USB instance IDs corresponding to the one or more terminal devices respectively according to the first corresponding relationship, and obtain the association relationship between the firmware and the USB instance ID; The association between the firmware and the USB instance ID is used as configuration information.
7. The firmware burning method according to claim 5, characterized in that: The method further comprises: Determine a target programmable logic controller (PLC) power port; the target PLC power port is used to supply power to the terminal device to be programmed; Send a restart instruction to the PLC; the restart instruction is used to instruct the target PLC power port to power off and then power on.
8. The firmware burning method according to claim 7, characterized in that: The step of determining the target PLC power port includes: Determine the terminal device to be burned; The target PLC power port corresponding to the terminal device to be programmed is determined according to a second corresponding relationship; the second corresponding relationship includes a connection relationship between each terminal device and the PLC power port.
9. A firmware burning device, characterized in that: include: The first determination module is used to determine the target universal serial bus USB instance identification ID corresponding to one or more terminal devices to be programmed; Each USB instance ID is used to indicate one of a plurality of USB interfaces on the IPC, and the USB interface is used to connect to a terminal device; A second determination module is used to determine the target firmware corresponding to the target USB instance ID according to configuration information; the configuration information includes a correspondence between each USB instance ID and the firmware; The first sending module is used to send the target firmware corresponding to the target USB instance ID to the terminal device to be burned corresponding to the target USB instance ID.
10. A firmware burning device, characterized in that: include: A second sending module is used to send configuration information and one or more firmwares to the IPC; The configuration information includes a correspondence between each USB instance ID and firmware, and the configuration information is used to determine the target firmware corresponding to the target USB instance ID associated with the terminal device to be burned.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the firmware burning method according to any one of claims 1 to 4 or the firmware burning method according to any one of claims 5 to 8 is implemented.
12. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the firmware burning method according to any one of claims 1 to 4 or the firmware burning method according to any one of claims 5 to 8 is implemented.