CN113596077A - Program downloading method, device, computer equipment and storage medium - Google Patents

Program downloading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113596077A
CN113596077A CN202110649780.2A CN202110649780A CN113596077A CN 113596077 A CN113596077 A CN 113596077A CN 202110649780 A CN202110649780 A CN 202110649780A CN 113596077 A CN113596077 A CN 113596077A
Authority
CN
China
Prior art keywords
program
target
downloading
downloaded
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110649780.2A
Other languages
Chinese (zh)
Inventor
韦文写
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202110649780.2A priority Critical patent/CN113596077A/en
Publication of CN113596077A publication Critical patent/CN113596077A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a program downloading method, a program downloading device, a computer device and a storage medium. The method comprises the following steps: in response to a selected event for candidate chip identifications, determining a selected target chip identification from the candidate chip identifications; when detecting that the connected target port exists in the port connection state, determining a program to be downloaded and a program downloading flow corresponding to the target chip identification; and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port. By adopting the method, the program downloading requirements of different devices on different chip identifiers can be met, the switching of downloading tools is not needed, the program to be downloaded is directly downloaded to the device connected with the target port, and the corresponding program downloading to the device is quickly and efficiently realized.

Description

Program downloading method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a program downloading method and apparatus, a computer device, and a storage medium.
Background
With the development of electronic technology, in the process of generating and testing the electronic device, program downloading needs to be performed on the electronic device, for example, after the chip is attached, firmware needs to be downloaded to the electronic device, where the firmware is an operating system software program of a chip corresponding to the electronic device.
The traditional program downloading is realized by downloading tool software of a computer end, firmware is downloaded and burned into electronic equipment through a port according to a set communication protocol, the tool software provided by a chip manufacturer is the tool software correspondingly set according to a chip, the tool software for program downloading of the chip manufacturer can only download a chip of an appointed type, and the traditional program downloading mode has the problem of low downloading efficiency for program downloading scenes with diversified requirements.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for downloading a software program, which can efficiently download the software program.
A program download method, the method comprising:
in response to a selected event for candidate chip identifications, determining a selected target chip identification from the candidate chip identifications;
when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to the target chip identification;
and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
In one embodiment, the executing the program downloading process corresponding to the target chip identifier and downloading the program to be downloaded to the device connected to the target port includes:
and when the number of the target ports is not less than 2, executing a program downloading flow corresponding to the target chip identification, and synchronously downloading the program to be downloaded to the equipment connected with the target ports respectively.
In one embodiment, the executing the program downloading process corresponding to the target chip identifier and downloading the program to be downloaded to the device connected to the target port includes:
when the number of the target ports is not less than 2, determining target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads;
and respectively executing a program downloading flow corresponding to the target chip identification by adopting a corresponding target thread aiming at each target port, and respectively downloading the program to be downloaded to the equipment connected with the target ports.
In one embodiment, the determining, when it is detected that there is a target port whose port connection state is connected, a program to be downloaded and a program download flow corresponding to the target chip identifier, where the program to be downloaded and the program download flow correspond to the target chip identifier, includes:
and when detecting that a target port with a connected port connection state exists, acquiring a program downloading flow corresponding to the target chip identifier and a program storage path of a program to be downloaded from the configuration data corresponding to the target chip identifier.
In one embodiment, the method further comprises:
acquiring a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier;
the executing the program downloading process corresponding to the target chip identifier and downloading the program to be downloaded to the device connected with the target port includes:
and executing a program downloading flow corresponding to the target chip identification according to the downloading flow parameters, and downloading the program to be downloaded stored according to the program storage path to equipment connected with the target port.
In one embodiment, the download flow parameters include data erasure parameters;
executing a program downloading flow corresponding to the target chip identifier according to the downloading flow parameters, and downloading the program to be downloaded to equipment connected with the target port, wherein the program downloading flow comprises the following steps:
and based on the data erasing parameters, erasing the initial data of the equipment connected with the target port to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
In one embodiment, the download flow parameters include device start-up parameters;
executing a program downloading flow corresponding to the target chip identifier according to the downloading flow parameters, and downloading the program to be downloaded to equipment connected with the target port, wherein the program downloading flow comprises the following steps:
and downloading the program to be downloaded to equipment connected with the target port, and sending a starting instruction to the equipment based on the equipment starting parameter when the downloading is completed.
In one embodiment, the method further comprises:
determining to update the chip identity in response to a reselection operation for the candidate chip identity;
acquiring the latest downloading flow parameter and the latest program to be downloaded from the configuration data corresponding to the updating chip identification;
and when detecting that the port connection state is switched from unconnected state to the connected latest target port, executing a program downloading flow corresponding to the updated target chip identification according to the latest downloading flow parameter, and downloading the latest program to be downloaded to the equipment connected with the latest target port.
A program downloading apparatus, the apparatus comprising:
a chip identification selection module for determining a target chip identification selected from the candidate chip identifications in response to a selected event for the candidate chip identifications;
the program determining module is used for determining a program to be downloaded and a program downloading flow corresponding to the target chip identification when detecting that a target port with a connected port connection state exists;
and the program downloading module is used for executing a program downloading flow corresponding to the target chip identifier and downloading the program to be downloaded to equipment connected with the target port.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
in response to a selected event for candidate chip identifications, determining a selected target chip identification from the candidate chip identifications;
when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to the target chip identification;
and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
in response to a selected event for candidate chip identifications, determining a selected target chip identification from the candidate chip identifications;
when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to the target chip identification;
and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
According to the program downloading method, the device, the computer equipment and the storage medium, the target chip identification selected from the candidate chip identifications is determined in response to the selected event aiming at the candidate chip identification, when the target port with the connected port connection state is detected, the program to be downloaded and the program downloading flow corresponding to the target chip identification are determined, the program downloading requirements of different equipment on different chip identifications can be met, switching of downloading tools is not needed, the program to be downloaded and the program downloading flow corresponding to the target chip identification are directly executed on the basis of the selection of the target chip identification and the program downloading flow corresponding to the target chip identification, the program to be downloaded is downloaded to the equipment connected with the target port, and the corresponding program downloading of the equipment is quickly and efficiently realized.
Drawings
FIG. 1 is a diagram of an application environment of a program download method according to an embodiment;
FIG. 2 is a flowchart illustrating a program downloading method according to an embodiment;
FIG. 3 is a flowchart illustrating a program downloading method according to another embodiment;
FIG. 4 is a flowchart illustrating a program downloading method according to another embodiment;
FIG. 5 is a flowchart illustrating a program downloading method according to still another embodiment;
FIG. 6 is a flowchart illustrating a program downloading method according to an embodiment;
FIG. 7 is a block diagram showing the structure of a program downloading apparatus according to an embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The program downloading method provided by the application can be applied to the application environment shown in fig. 1. Wherein the computer device 102 determines a target chip identification selected from the candidate chip identifications in response to a selected event for the candidate chip identifications; when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to a target chip identifier; and executing a program downloading flow corresponding to the target chip identifier, and downloading the program to be downloaded to the device 104 connected with the target port. The computer device 102 may be a terminal, a server, or a system composed of a terminal and a server, and is used to implement the program downloading method. The terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a program downloading method is provided, which is exemplified by the method applied to the computer device in fig. 1, and includes the following steps:
in step 202, in response to a selected event for the candidate chip identifications, a target chip identification selected from the candidate chip identifications is determined.
The candidate chip identifiers refer to at least two chip identifiers which can be selected, and the chip identifiers are used for representing chip brands, and specifically can be chip models or chip model series. The target chip identification is one of the candidate chip identifications. The selected event for the candidate chip identification may be the selection of the computer device in response to a manual operation by a user, or the automatic matching selection of the computer device based on specific parameters. For example, the user manual operation may specifically be that the computer device determines a triggered target chip identifier in response to a triggering operation of the user for one of the candidate chip identifiers displayed on the display interface. The automatic matching and selection based on the specific parameters may be that the computer device obtains a chip identifier by identifying a chip model or a chip model series of a chip to be subjected to program downloading, the chip identifier is matched with the candidate chip identifier, and the selection of a target chip identifier in the candidate chip identifier is triggered based on a matching result.
Step 204, when detecting that the port connection state is the connected target port, determining the program to be downloaded and the program downloading flow corresponding to the target chip identification.
The port connection state is used to indicate whether a physical port of the computer device has a connection device, where the physical port is an interface that can directly connect with the device and interact data on the computer device, such as a USB (Universal Serial Bus) interface, a com (communications) port, a UART (Universal Asynchronous Receiver/Transmitter) interface, and the like. The port connection state includes a connected state and an unconnected state, the connected state refers to that the port is connected with a corresponding device, and the unconnected state refers to that the port is not connected with a corresponding device. The target port is a physical interface on the computer device with a connected port connection state. The program to be downloaded is a program for downloading into a chip of a device connected to the target port. The program to be downloaded may specifically be an operating system software of the chip, that is, a chip firmware, or a driver of the chip. The program downloading process is a downloading process for downloading a program to be downloaded, and may specifically include each step of the downloading process, for example, first downloading the first part of data, and then downloading the second part of data. In other embodiments, the downloading process flow may further include downloading condition determination, for example, when the chip satisfies the set condition, the downloading of the data is allowed. The program to be downloaded and the program downloading flow corresponding to each different chip identifier are different, and the program to be downloaded and the program downloading flow can be configured in advance and stored in the computer equipment.
Specifically, the computer device detects the port connection state of each physical port in real time or periodically, and determines that a physical port is a target interface when detecting that the port connection state of the physical port is changed from an unconnected state to a connected state. After determining that the target interface exists, the computer device acquires the program to be downloaded and the program downloading flow corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier.
The method has the advantages that the real-time detection mode is adopted, so that the method can quickly respond to the connection of the equipment, the program downloading efficiency is improved, and the method is suitable for scenes with high requirements on response speed. By adopting a periodic detection mode, such as a detection mode which meets specific scene requirements, such as once detection in 1s and once detection in 2s, the computer data processing resources occupied by the detection of the port connection state can be saved on the premise of meeting the scene requirements, and the resource utilization rate is improved. Specifically, whether the unconnected state is changed into the connected state can be determined by comparing results of the two adjacent port connection states, and only one program downloading process can be ensured for one connection operation of the equipment by limiting the change of the port connection state, so that a redundant program downloading process is avoided.
And step 206, executing a program downloading flow corresponding to the target chip identifier, and downloading the program to be downloaded to the device connected with the target port.
Specifically, the computer device executes a program downloading process corresponding to the target chip identifier, and downloads the program to be downloaded to the device connected to the target port. In a specific application, the computer device executes a program downloading flow corresponding to the target chip identifier through a thread bound to the target port, so as to download the program to be downloaded to the device connected to the target port.
According to the program downloading method, the target chip identification selected from the candidate chip identifications is determined in response to the selected event aiming at the candidate chip identification, when the target port with the connected port connection state is detected, the program to be downloaded and the program downloading flow corresponding to the target chip identification are determined, the program downloading requirements of different devices on different chip identifications can be met, the switching of downloading tools is not needed, the program to be downloaded and the program downloading flow corresponding to the target chip identification are directly executed on the basis of the selection of the target chip identification, the program to be downloaded is downloaded to the device connected with the target port, and the corresponding program downloading to the device is quickly and efficiently realized.
In one embodiment, executing a program downloading process corresponding to a target chip identifier, and downloading a program to be downloaded to a device connected to a target port includes:
and when the number of the target ports is not less than 2, executing a program downloading flow corresponding to the target chip identification, and synchronously downloading the program to be downloaded to the equipment respectively connected with the target ports.
The number of the target ports is not less than 2, and when the computer equipment detects the port connection state of each physical port, the computer equipment detects that the port connection state of two or more physical ports is connected. At this time, the computer device synchronously downloads the program to be downloaded to the devices respectively connected to the target ports by executing the program downloading flow corresponding to the target chip identifier, so as to realize multi-path synchronous downloading of a plurality of devices, thereby improving the program downloading efficiency.
In one embodiment, as shown in fig. 3, executing a program downloading process corresponding to a target chip identifier, and downloading a program to be downloaded to a device connected to a target port includes:
step 302, when the number of the target ports is not less than 2, determining the target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads.
And step 304, for each target port, adopting a corresponding target thread to respectively execute a program downloading flow corresponding to the target chip identifier, and respectively downloading the program to be downloaded to the devices respectively connected with the plurality of target ports.
A thread is the smallest unit that a computer device can perform arithmetic scheduling. It is included in the process and is the actual unit of operation in the process. One thread refers to a single sequential control flow in a process, a plurality of threads can be simultaneously transmitted in one process, and each thread executes different tasks in parallel without mutual influence.
Specifically, the computer device binds with a corresponding number of threads one by one based on the port identifier of each physical port, thereby constructing a binding relationship between the ports and the threads, so that each thread executes a program downloading process of the corresponding port. For example, thread 1 is assigned to use the current port, and after such assignment, the computer recognizes that thread 1 is enabled for program download when it detects that a device is connected to the port. The Port identification may specifically be a Port name, such as a USB DL Port; port numbers such as COM1, COM 2; or PID/VID information of the port. When the number of the target ports is not less than 2, the computer equipment determines the target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads. And aiming at each target port, corresponding target threads are adopted to respectively execute program downloading flows corresponding to the target chip identifiers, and the programs to be downloaded are respectively downloaded to the devices respectively connected with the target ports, so that the programs are respectively downloaded to the devices based on multiple paths of processes, and the program downloading efficiency is improved. It should be noted that, the respective program downloads of the multiple threads may be synchronous or asynchronous, and may be determined according to the time when the device is connected to the port or the time when the computer device detects that the port is connected to the device. For example, in a real-time detection scenario, the downloading of the programs by the multiple threads is asynchronous with a high probability, and the response speed can be increased by asynchronous downloading. Under the scene of periodic detection, the downloading of the programs by the multiple threads respectively can be synchronous, the programs of all the devices can be basically and synchronously downloaded through synchronous downloading, the connected devices can be conveniently and completely replaced by the workers, and the workers can conveniently manage the devices without downloading the programs.
In one embodiment, as shown in fig. 4, when it is detected that there is a target port whose port connection status is connected, determining the program to be downloaded and the program downloading flow corresponding to the target chip identifier, which correspond to the target chip identifier, includes:
step 402, when detecting that there is a target port with a connected port connection status, obtaining a program downloading flow corresponding to the target chip identifier and a program storage path of the program to be downloaded from the configuration data corresponding to the target chip identifier.
The configuration data is data required in a process of downloading a program for a chip identifier, and may be obtained by configuring according to actual scene requirements, where the configuration data specifically includes a program storage path and a program downloading flow of the program to be downloaded corresponding to the chip identifier, and each chip platform corresponds to one set of configuration data. The program storage path of the program to be downloaded is used for representing the position of a file or a folder for storing the program to be downloaded.
Specifically, when detecting that a target port with a connected port connection state exists, the computer device searches for configuration data corresponding to a target chip identifier from a configuration data set in which the chip identifiers are stored, based on identification information carried by the configuration data, and obtains a program downloading flow and a program storage path of a program to be downloaded from the configuration data corresponding to the target chip identifier.
In this embodiment, compared with a processing mode of directly adding the program to be downloaded to the configuration file, a program storage path and a program downloading flow of the program to be downloaded are obtained based on the configuration data, and a storage position of the program to be downloaded is represented in a program storage path mode, so that space occupied by the configuration data and operation time required by configuration can be saved, and reasonable distribution of the storage space and efficient configuration of the configuration data are realized.
In one embodiment, as shown in fig. 5, the program downloading method further includes step 502:
step 502, acquiring a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier;
executing the program downloading process corresponding to the target chip identifier, and downloading the program to be downloaded to the device connected to the target port, including step 504:
and step 504, executing a program downloading flow corresponding to the target chip identifier according to the downloading flow parameters, and downloading the program to be downloaded stored according to the program storage path to the device connected with the target port.
The download process parameter refers to a parameter corresponding to the execution of the program download process, and the download process parameter corresponds to the chip identifier, and may specifically include a parameter that defines each step of the download processing process, such as downloading the first part of data first and then downloading the second part of data, and the like, and may further include a condition that each download step needs to satisfy, and the like, such as allowing the download of data only when the chip satisfies a set condition, and the like, and may further include at least one of a processing parameter before the download and a processing parameter after the download is completed.
In this embodiment, the computer device extracts a download process parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier, executes a program download process corresponding to the target chip identifier according to the download process parameter, and downloads a program to be downloaded, which is stored according to a program storage path, to a device connected to the target port, so that personalized download can be realized based on each chip identifier, and download requirements of different scenes are met. In a specific application, by updating the download process parameters corresponding to the chip identifier, personalized program downloading can be realized on the premise of not changing the program to be downloaded corresponding to the chip identifier, and the requirements of different scenes are met.
In one embodiment, the download flow parameters include data erasure parameters; according to the download process parameter, executing the program download process corresponding to the target chip identification, and downloading the program to be downloaded to the device connected with the target port, including: and based on the data erasing parameters, erasing initial data of equipment connected with the target port to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
The data erasing parameters are used for indicating to erase the existing downloaded data in the connected equipment and initializing the equipment, and the data erasing parameters are suitable for the program to be downloaded which needs to be downloaded to the initialized equipment.
Specifically, by configuring data erasing parameters and integrating a data erasing function in a program downloading flow corresponding to a target chip identifier, the computer equipment can erase initial data of equipment connected with a target port based on the data erasing parameters, realize equipment initialization and download a program to be downloaded to initialization equipment, so that preprocessing operation of the equipment needing equipment initialization processing can be simplified, the data processing amount of workers is effectively reduced, and the working efficiency is improved.
In one embodiment, the download flow parameters include device start-up parameters; according to the download process parameter, executing the program download process corresponding to the target chip identification, and downloading the program to be downloaded to the device connected with the target port, including: and downloading the program to be downloaded to equipment connected with the target port, and sending a starting instruction to the equipment based on the equipment starting parameters when the downloading is completed.
The equipment starting parameter is used for indicating equipment which is connected to be started, specifically, the equipment starting function is integrated in a program downloading flow corresponding to a target chip identification through configuring an equipment starting instruction, the computer equipment can download a program to be downloaded to the equipment which is connected with a target port, and when downloading is completed, a starting instruction is sent to the equipment based on the equipment starting parameter, so that subsequent processing operation on the equipment which is completed by downloading can be simplified, subsequent further data processing is facilitated, the data processing amount of workers is effectively reduced, and the working efficiency is improved.
In one embodiment, the method further comprises: determining to update the chip identity in response to a reselection operation for the candidate chip identity; acquiring the latest downloading flow parameter and the latest program to be downloaded from the configuration data corresponding to the updated chip identifier; and when detecting that the port connection state is switched from unconnected state to the connected latest target port, executing a program downloading flow corresponding to the updated target chip identifier according to the latest downloading flow parameter, and downloading the latest program to be downloaded to the equipment connected with the latest target port.
And the re-selection operation is used for replacing the selected target chip identifier, so that program downloading corresponding to different chip identifiers is realized. Specifically, the computer device determines to update the chip identifier in response to a reselection operation for the candidate chip identifier; acquiring the latest downloading flow parameter and the latest program to be downloaded from the configuration data corresponding to the updated chip identifier; when the computer equipment detects that the port connection state is switched from unconnected state to the connected latest target port, the program downloading process corresponding to the updated target chip identification is executed according to the latest downloading process parameter, the latest program to be downloaded is downloaded to the equipment connected with the latest target port, and the program downloading corresponding to different chip identifications can be quickly and conveniently realized by reselecting the target chip identification.
In a specific application, a program downloading method is provided, and the method is described below by taking an application scenario in which firmware (corresponding to operating system software of a chip) corresponding to a patch of an electronic device is downloaded as an example.
In the production test process of the electronic equipment, after the chip is attached, the first station needs to download the firmware to the electronic equipment, and the firmware is burnt into the electronic equipment through the USB or the UART according to the established communication protocol through the tool software at the computer end. Chip manufacturers generally provide original downloading tool software, and downstream customers, such as individuals or groups purchasing chips, need to develop the downloading tools again and add some customized functions. At present, the downloading flows of firmware of different chip brands are different, and the chip brands need to be distinguished when the firmware is downloaded. The original downloading tool software of different chip brands, namely different chip platforms, is different, the difference of code structure, development environment and the like is also large, secondary development and maintenance workload is large, maintenance cost is high and the use experience of a factory is poor for downstream customers using various chip platforms at the same time.
The program downloading method applicable to multi-channel downloading by various chip platforms is provided in the present solution, as shown in fig. 6, the method specifically includes the following processing procedures:
the first step is parameter setting: setting parameters of tool software, including a chip platform, a firmware version path and a downloading option which are currently used, wherein the chip platform refers to a specific chip model or a chip model series; the firmware version path is a path for the firmware version to exist on the computer equipment, because the firmware is downloaded by burning the firmware version on the computer equipment into the chip; the download options refer to other parameters besides the version path, such as whether to erase before downloading, whether to automatically start up after downloading, and the like.
The second step is port binding: the terminal equipment connected with the thread 1 is used for automatically identifying port information by software and binding the port information with the thread 1; and according to the same steps, binding the ports of other threads in sequence.
The third step is to detect the port state in real time: and detecting the port state of each thread in real time, and continuing the next operation based on the thread bound by the port when detecting that the terminal equipment is connected.
The fourth step is to download the firmware: and executing a downloading flow corresponding to the chip platform according to the type of the chip platform set in the first step, and burning the firmware into the electronic equipment connected with the port, thereby finishing the downloading of the firmware.
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided a program downloading device including: a chip identification selection module 702, a program determination module 704, and a program download module 706, wherein:
a chip identity selection module 702 for determining a target chip identity selected from the candidate chip identities in response to a selected event for the candidate chip identities;
a program determining module 704, configured to determine, when it is detected that there is a target port whose port connection status is connected, a program to be downloaded and a program downloading flow corresponding to a target chip identifier;
and the program downloading module 706 is configured to execute a program downloading process corresponding to the target chip identifier, and download the program to be downloaded to the device connected to the target port.
In one embodiment, the program downloading module is further configured to, when the number of the target ports is not less than 2, execute a program downloading process corresponding to the target chip identifier, and synchronously download the program to be downloaded to devices connected to the target ports respectively.
In one embodiment, the program downloading module is further configured to determine, when the number of the target ports is not less than 2, target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads; and aiming at each target port, respectively executing a program downloading flow corresponding to the target chip identification by adopting a corresponding target thread, and respectively downloading the program to be downloaded to equipment respectively connected with the plurality of target ports.
In an embodiment, the program determining module is further configured to, when it is detected that there is a target port whose port connection status is connected, obtain, from the configuration data corresponding to the target chip identifier, a program downloading flow corresponding to the target chip identifier and a program storage path of the program to be downloaded.
In one embodiment, the program downloading device further includes a downloading flow parameter obtaining module, configured to obtain a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier; the program downloading module is further configured to execute a program downloading flow corresponding to the target chip identifier according to the downloading flow parameter, and download the program to be downloaded stored according to the program storage path to the device connected to the target port.
In one embodiment, the download flow parameters include data erasure parameters; the program downloading module is further used for erasing initial data of the equipment connected with the target port based on the data erasing parameters to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
In one embodiment, the download flow parameters include device start-up parameters; the program downloading module is also used for downloading the program to be downloaded to the equipment connected with the target port, and when the downloading is completed, a starting instruction is sent to the equipment based on the equipment starting parameter.
In one embodiment, the program downloading device further comprises a chip identifier updating module for determining to update the chip identifier in response to the reselection operation for the candidate chip identifier; acquiring the latest downloading flow parameter and the latest program to be downloaded from the configuration data corresponding to the updated chip identifier; and when detecting that the port connection state is switched from unconnected state to the connected latest target port, executing a program downloading flow corresponding to the updated target chip identifier according to the latest downloading flow parameter, and downloading the latest program to be downloaded to the equipment connected with the latest target port.
According to the program downloading device, the target chip identification selected from the candidate chip identifications is determined in response to the selected event aiming at the candidate chip identification, when the connected target port in the port connection state is detected, the program to be downloaded and the program downloading flow corresponding to the target chip identification are determined, the program downloading flow corresponding to the target chip identification is executed, the program to be downloaded is downloaded to the equipment connected with the target port, the program downloading requirements of different equipment on different chip identifications can be met, based on the selection of the target chip identification, the program to be downloaded and the program downloading flow corresponding to the target chip identification are directly downloaded, and the corresponding program downloading is rapidly and efficiently realized.
For the specific limitation of the program downloading device, reference may be made to the above limitation of the program downloading method, which is not described herein again. The respective modules in the above program downloading device may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a program download method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
determining a target chip identification selected from the candidate chip identifications in response to a selected event for the candidate chip identifications; when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to a target chip identifier; and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and when the number of the target ports is not less than 2, executing a program downloading flow corresponding to the target chip identification, and synchronously downloading the program to be downloaded to the equipment respectively connected with the target ports.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the number of the target ports is not less than 2, determining target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads; and aiming at each target port, respectively executing a program downloading flow corresponding to the target chip identification by adopting a corresponding target thread, and respectively downloading the program to be downloaded to equipment respectively connected with the plurality of target ports.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and when detecting that the connected target port exists in the port connection state, acquiring a program downloading flow corresponding to the target chip identifier and a program storage path of the program to be downloaded from the configuration data corresponding to the target chip identifier.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier; and executing a program downloading flow corresponding to the target chip identification according to the downloading flow parameters, and downloading the program to be downloaded stored according to the program storage path to equipment connected with the target port.
In one embodiment, the download flow parameters include data erasure parameters; the processor, when executing the computer program, further performs the steps of:
and based on the data erasing parameters, erasing initial data of equipment connected with the target port to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
In one embodiment, the download flow parameters include device start-up parameters; the processor, when executing the computer program, further performs the steps of:
and downloading the program to be downloaded to equipment connected with the target port, and sending a starting instruction to the equipment based on the equipment starting parameters when the downloading is completed.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
determining a target chip identification selected from the candidate chip identifications in response to a selected event for the candidate chip identifications; when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to a target chip identifier; and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when the number of the target ports is not less than 2, executing a program downloading flow corresponding to the target chip identification, and synchronously downloading the program to be downloaded to the equipment respectively connected with the target ports.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the number of the target ports is not less than 2, determining target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads; and aiming at each target port, respectively executing a program downloading flow corresponding to the target chip identification by adopting a corresponding target thread, and respectively downloading the program to be downloaded to equipment respectively connected with the plurality of target ports.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when detecting that the connected target port exists in the port connection state, acquiring a program downloading flow corresponding to the target chip identifier and a program storage path of the program to be downloaded from the configuration data corresponding to the target chip identifier.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier; and executing a program downloading flow corresponding to the target chip identification according to the downloading flow parameters, and downloading the program to be downloaded stored according to the program storage path to equipment connected with the target port.
In one embodiment, the download flow parameters include data erasure parameters; the computer program when executed by the processor further realizes the steps of:
and based on the data erasing parameters, erasing initial data of equipment connected with the target port to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
In one embodiment, the download flow parameters include device start-up parameters; the computer program when executed by the processor further realizes the steps of:
and downloading the program to be downloaded to equipment connected with the target port, and sending a starting instruction to the equipment based on the equipment starting parameters when the downloading is completed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A program downloading method, characterized in that the method comprises:
in response to a selected event for candidate chip identifications, determining a selected target chip identification from the candidate chip identifications;
when detecting that a target port with a connected port connection state exists, determining a program to be downloaded and a program downloading flow corresponding to the target chip identification;
and executing a program downloading flow corresponding to the target chip identification, and downloading the program to be downloaded to equipment connected with the target port.
2. The method according to claim 1, wherein the executing the program downloading process corresponding to the target chip identifier to download the program to be downloaded to the device connected to the target port comprises:
and when the number of the target ports is not less than 2, executing a program downloading flow corresponding to the target chip identification, and synchronously downloading the program to be downloaded to the equipment connected with the target ports respectively.
3. The method according to claim 1, wherein the executing the program downloading process corresponding to the target chip identifier to download the program to be downloaded to the device connected to the target port comprises:
when the number of the target ports is not less than 2, determining target threads corresponding to the target ports respectively based on the binding relationship between the ports and the threads;
and respectively executing a program downloading flow corresponding to the target chip identification by adopting a corresponding target thread aiming at each target port, and respectively downloading the program to be downloaded to the equipment connected with the target ports.
4. The method of claim 1, wherein determining, when it is detected that there is a target port with a port connection status of connected, a program to be downloaded and a program download flow corresponding to the target chip identifier, which are determined to correspond to the target chip identifier, comprise:
and when detecting that a target port with a connected port connection state exists, acquiring a program downloading flow corresponding to the target chip identifier and a program storage path of a program to be downloaded from the configuration data corresponding to the target chip identifier.
5. The method of claim 4, further comprising:
acquiring a downloading flow parameter corresponding to the target chip identifier from the configuration data corresponding to the target chip identifier;
the executing the program downloading process corresponding to the target chip identifier and downloading the program to be downloaded to the device connected with the target port includes:
and executing a program downloading flow corresponding to the target chip identification according to the downloading flow parameters, and downloading the program to be downloaded stored according to the program storage path to equipment connected with the target port.
6. The method of claim 5, wherein the download flow parameters comprise data erasure parameters;
executing a program downloading flow corresponding to the target chip identifier according to the downloading flow parameters, and downloading the program to be downloaded to equipment connected with the target port, wherein the program downloading flow comprises the following steps:
and based on the data erasing parameters, erasing the initial data of the equipment connected with the target port to obtain initialization equipment, and downloading the program to be downloaded to the initialization equipment.
7. The method of claim 5, wherein the download flow parameters comprise device start-up parameters;
executing a program downloading flow corresponding to the target chip identifier according to the downloading flow parameters, and downloading the program to be downloaded to equipment connected with the target port, wherein the program downloading flow comprises the following steps:
and downloading the program to be downloaded to equipment connected with the target port, and sending a starting instruction to the equipment based on the equipment starting parameter when the downloading is completed.
8. A program downloading apparatus, characterized in that the apparatus comprises:
a chip identification selection module for determining a target chip identification selected from the candidate chip identifications in response to a selected event for the candidate chip identifications;
the program determining module is used for determining a program to be downloaded and a program downloading flow corresponding to the target chip identification when detecting that a target port with a connected port connection state exists;
and the program downloading module is used for executing a program downloading flow corresponding to the target chip identifier and downloading the program to be downloaded to equipment connected with the target port.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110649780.2A 2021-06-10 2021-06-10 Program downloading method, device, computer equipment and storage medium Pending CN113596077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110649780.2A CN113596077A (en) 2021-06-10 2021-06-10 Program downloading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110649780.2A CN113596077A (en) 2021-06-10 2021-06-10 Program downloading method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113596077A true CN113596077A (en) 2021-11-02

Family

ID=78243680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110649780.2A Pending CN113596077A (en) 2021-06-10 2021-06-10 Program downloading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113596077A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064143A (en) * 2021-11-08 2022-02-18 宁波波导软件有限公司 Compatible processing method of multi-chip software
CN114296754A (en) * 2021-11-30 2022-04-08 深圳市广和通无线股份有限公司 Chip platform upgrading method and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934735B1 (en) * 2000-07-07 2005-08-23 International Business Machines Corporation Software and method for controlling the timing of delayed downloads
CN101692217A (en) * 2009-09-16 2010-04-07 东莞市步步高教育电子产品有限公司 Method and device for burning chip
CN104050005A (en) * 2014-06-30 2014-09-17 广州视源电子科技股份有限公司 Recording method and system
CN104090789A (en) * 2014-06-27 2014-10-08 国家电网公司 FLASH programming device allowing connection with multiple modules
CN203966105U (en) * 2014-06-30 2014-11-26 南通国芯微电子有限公司 A kind of program off line download apparatus
CN107643896A (en) * 2016-07-21 2018-01-30 常州星诺斯达电子科技有限公司 A kind of method for burning chip and its device
CN111399926A (en) * 2018-12-13 2020-07-10 北汽福田汽车股份有限公司 Method and device for downloading starting program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934735B1 (en) * 2000-07-07 2005-08-23 International Business Machines Corporation Software and method for controlling the timing of delayed downloads
CN101692217A (en) * 2009-09-16 2010-04-07 东莞市步步高教育电子产品有限公司 Method and device for burning chip
CN104090789A (en) * 2014-06-27 2014-10-08 国家电网公司 FLASH programming device allowing connection with multiple modules
CN104050005A (en) * 2014-06-30 2014-09-17 广州视源电子科技股份有限公司 Recording method and system
CN203966105U (en) * 2014-06-30 2014-11-26 南通国芯微电子有限公司 A kind of program off line download apparatus
CN107643896A (en) * 2016-07-21 2018-01-30 常州星诺斯达电子科技有限公司 A kind of method for burning chip and its device
CN111399926A (en) * 2018-12-13 2020-07-10 北汽福田汽车股份有限公司 Method and device for downloading starting program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王璐;: "双DSP嵌入式系统远程SCI通信烧写技术", 电子技术与软件工程, no. 05 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064143A (en) * 2021-11-08 2022-02-18 宁波波导软件有限公司 Compatible processing method of multi-chip software
CN114296754A (en) * 2021-11-30 2022-04-08 深圳市广和通无线股份有限公司 Chip platform upgrading method and related device

Similar Documents

Publication Publication Date Title
CN104915224B (en) A kind of processing method and processing device of affiliate application
CN111984163B (en) Application icon display method and device and electronic equipment
CN106020875B (en) Firmware update management method and device of embedded terminal
CN102650968B (en) Environment construction method and apparatus and the terminal system of terminal system
CN113596077A (en) Program downloading method, device, computer equipment and storage medium
CN112612214B (en) Method and system for generating functional interface and electronic equipment
CN106959927B (en) Method and device for acquiring position information of logical partitions in virtual machine
CN110635944A (en) Cluster network configuration method and device, electronic equipment and storage medium
CN111565112B (en) Method and device for creating group, electronic equipment and readable storage medium
CN105468405A (en) Installation processing method and device of application program
CN112364266A (en) Seamless navigation method, device, electronic equipment and medium for applet and host application
CN112256348B (en) Cloud service platform creation method and system, electronic equipment and storage medium
CN104679900A (en) Application program searching method and device
CN111045893A (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN115184764A (en) Chip testing method and device, electronic equipment and storage medium
CN116166525A (en) Method and device for generating test script
CN111054060A (en) Game control method, device, computer equipment and storage medium
CN109002305A (en) A kind of update method and its system of device program
CN111949529B (en) System debugging method, device, computer equipment and storage medium
EP3499365A1 (en) Method and device for use in accessing container
CN106527979B (en) Data migration method and device
JP2019191957A (en) Information processor, device, failure analysis system, failure analysis method, and program
CN112463199A (en) System upgrading method and terminal
CN112558833B (en) Application running method and device and electronic equipment
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination