CN113448630A - Driver processing method and device, electronic equipment and medium - Google Patents

Driver processing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113448630A
CN113448630A CN202110316371.0A CN202110316371A CN113448630A CN 113448630 A CN113448630 A CN 113448630A CN 202110316371 A CN202110316371 A CN 202110316371A CN 113448630 A CN113448630 A CN 113448630A
Authority
CN
China
Prior art keywords
interface
driver
equipment
installation data
matched
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
CN202110316371.0A
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.)
Shenzhen Yihua Computer Technology Co ltd
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Original Assignee
Shenzhen Yihua Computer Technology Co ltd
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
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 Shenzhen Yihua Computer Technology Co ltd, Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd filed Critical Shenzhen Yihua Computer Technology Co ltd
Priority to CN202110316371.0A priority Critical patent/CN113448630A/en
Publication of CN113448630A publication Critical patent/CN113448630A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Abstract

The embodiment of the invention provides a driver processing method, a driver processing device, electronic equipment and a driver processing medium, wherein the method is applied to first equipment, the first equipment is connected with second equipment, and the second equipment is provided with a first interface and a second interface; the method comprises the following steps: acquiring first identification information sent by a first interface; judging whether a driver matched with the second equipment is installed locally or not according to the first identification information; if not, sending a preset installation data acquisition request to the second interface; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver; deploying a driver matched with the second equipment by adopting the installation data; wherein, the first interface is a USB interface. The embodiment of the invention can automatically acquire the installation data previously stored by the second equipment through the second interface different from the USB interface, and adopts the installation data to deploy the driver program, thereby avoiding selecting the installation data of the second equipment in a manual mode.

Description

Driver processing method and device, electronic equipment and medium
Technical Field
The present invention relates to the field of software technologies, and in particular, to a driver processing method, a driver processing apparatus, an electronic device, and a medium.
Background
USB, an acronym for Universal Serial Bus (Universal Serial Bus), is an external Bus standard.
The lower computer can be connected with the upper computer in a communication mode of USB communication for data interaction, such as a scanner, a cash recycling machine core and other equipment.
The equipment supporting USB communication can normally communicate only by installing corresponding USB equipment drivers when being connected with an upper computer for the first time. When the USB device driver is installed on most of the existing upper computers, manually-assigned unidentified devices are needed, then the corresponding USB device driver installation package is manually selected for installation, the operation of driver installation is completed, the operation process is complex, the user experience is influenced, and when the names of the driver installation packages are similar, the mode of manual installation can be confused due to the selection of the installation packages, so that the installation fails, unnecessary workload is increased, and the working efficiency is influenced. In addition, the USB information of the conventional device is all solidified in the program code, and thus when the USB related configuration information is modified, the device needs to be returned to the factory for processing, and the maintenance workload is increased.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a driver processing method and a corresponding driver processing apparatus, electronic device, medium that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a driver processing method, which is applied to a first device, where the first device is connected to a second device, and the second device is provided with a first interface and a second interface; the method comprises the following steps:
acquiring first identification information sent by the first interface;
judging whether a driver matched with the second equipment is installed locally or not according to the first identification information;
if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
deploying the driver matched with the second equipment by adopting the installation data;
wherein, the first interface is a USB interface.
Optionally, the first device is provided with at least one third interface; the step of sending a preset installation data acquisition request to the second interface includes:
generating authentication information based on the first identification information;
determining a third interface connected with the second interface as a target interface according to the authentication information;
and sending a preset installation data acquisition request to the target interface so as to send the installation data acquisition request to the second interface.
Optionally, the step of determining, according to the authentication information, that a third interface connected to the second interface is a target interface includes:
traversing the third interface;
sending authentication information to the third interface;
receiving an authentication result returned by the third interface;
if the authentication result is that the authentication is successful, determining that the third interface is a target interface connected with the first interface;
and the authentication result received from the target interface is checked by the first equipment according to the authentication information and the local second identification information.
Optionally, the second device is configured to, in response to the installation data obtaining request, read locally stored installation data that matches the driver, and send the installation data to the target interface.
Optionally, the step of deploying the driver matched with the second device by using the installation data includes:
and performing data deployment on the installation data by adopting the preset processing script to obtain a driving program matched with the second equipment.
Optionally, the method further comprises:
modifying based on the installation data to generate update data;
sending the update data to the second device using the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
The embodiment of the invention also discloses another drive program processing method which is applied to second equipment, wherein the second equipment is connected with the first equipment and is provided with a first interface and a second interface; the method comprises the following steps:
sending preset first identification information to the first equipment by adopting the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if not, sending a preset installation data acquisition request to the second interface;
responding to the installation data acquisition request, and sending installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
The embodiment of the invention also discloses a driver processing device, which is positioned on the first equipment; the first equipment is connected with second equipment, and the second equipment is provided with a first interface and a second interface; the device comprises:
the first identification information acquisition module is used for acquiring first identification information sent by the first interface;
the driver detection module is used for judging whether a driver matched with the second equipment is installed locally or not according to the first identification information;
the installation data request sending module is used for sending a preset installation data acquisition request to the second interface if the driver matched with the second device is not installed locally; the first device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
the driver deployment module is used for deploying the driver matched with the second equipment by adopting the installation data;
wherein, the first interface is a USB interface.
The embodiment of the invention also discloses another driver processing device, which is positioned on the second equipment; the second equipment is connected with the first equipment and is provided with a first interface and a second interface; the device comprises:
the first identification information sending module is used for sending preset first identification information to the first equipment by adopting the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if not, sending a preset installation data acquisition request to the second interface;
the installation data sending module is used for responding to the installation data acquisition request and sending installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
The embodiment of the invention also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which computer program, when executed by the processor, implements the steps of the driver processing method as described above.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the driver processing method are realized.
The embodiment of the invention has the following advantages:
when the first device is connected with a second device with a USB interface, whether a driver matched with the second device is locally installed or not is detected according to first identification information sent by the USB interface, if the driver matched with the second device is not installed, an installation data acquisition request is sent to the second device through the second interface, installation data sent by the second interface is received, the driver matched with the second device is deployed by adopting the installation data, so that after the driver is deployed, the first device can control the first device to perform corresponding operation through the USB interface, and when the first device is connected with the second device under the condition that the driver of the second device is not installed, the installation data stored in the second device in advance can be automatically obtained through the second interface different from the USB interface, and the driver is deployed by adopting the installation data, so that the installation data of the second device is prevented from being manually selected, the step of installing the driver is simplified, and meanwhile, the driver with a wrong installation is prevented from being installed, so that the first equipment cannot normally control the second equipment.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a driver processing method of the present invention;
FIG. 2 is a block diagram of an embodiment of a driver processing method according to the present invention;
FIG. 3 is a flow chart of a driver processing method according to the present invention;
fig. 4 is a serial port authentication processing flow in a driver processing method flow;
FIG. 5 is a flow of automatic installation of USB device drivers in the flow of a driver processing method;
FIG. 6 is a USB device driver installation package update download flow of a driver processing method flow;
FIG. 7 is a flowchart illustrating the steps of another embodiment of a driver handling method of the present invention;
FIG. 8 is a block diagram of an embodiment of a driver processing apparatus according to the present invention;
fig. 9 is a block diagram of another driver processing apparatus according to another embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The embodiment of the invention relates to a first device and a second device, wherein the second device is provided with a USB interface, when the first device is connected with the USB interface of the second device, the first device and the second device can carry out data transmission in a USB communication mode, when the first device is provided with a driving program of the second device, a control instruction can be sent to the second device through the USB interface, and the second device can respond to the received control instruction and execute corresponding operation.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a driver processing method according to the present invention is shown, and is applied to a first device, where the first device is connected to a second device, and the second device is provided with a first interface and a second interface;
the first device may be, but is not limited to, a computer, a server. The first interface and the second interface are physical interfaces, wherein the first interface is a USB interface, and the second interface is a physical interface different from a communication mode of the first interface. The second Interface includes but is not limited to a serial Interface (e.g., UART, Universal Asynchronous Receiver/Transmitter), a CAN Interface, a General Purpose Interface Bus (GPIB) Interface, and an Ethernet Interface.
Referring to fig. 2, a framework diagram of an embodiment of a driver processing method of the present invention is shown. Embodiments of the present invention relate to a first device 21 and a second device 22.
The first device is deployed with an application 211 and a device driver library 212. The application program can realize man-machine interaction and realize the scheduling of command tasks by calling the device driving library according to the needs of users. The device driver library encapsulates the processing interface for accessing the bottom layer device, and the main functions are as follows: the USB interface driver, the serial interface driver, and the USB/serial interface driver based service command execution processing interface (such as device control command, firmware upgrade, USB device driver installation package update, acquisition, and installation), and provides part of the interface to the outside for application call.
The second device is provided with a USB interface 221, a UART interface 222, and a Flash223 (i.e., Flash Memory).
The USB interface 221 is used for USB communication with the first device or other USB devices, such as firmware upgrade, sending of service commands, and transmission of interactive data such as receiving of response \ notification data.
The UART interface 222 is configured to send a command for acquiring data of a second device dynamic installation package through serial port communication when the USB driver is not installed, read out a USB device driver installation package stored in the Flash chip on the second device and transmit the USB device driver installation package to the first device, and automatically install the USB device driver according to the read USB device driver installation package file by the program of the first device. The UART is also used for receiving USB equipment driver installation updating data, updating the received data to a corresponding position on Flash and returning a result.
The Flash223 is used for BootLoader programs, application layers and USB device driver installation package files of the power-down storage device, and the files are burned into a Flash chip through a Flash burner installation partition table when leaving a factory. And in the later stage, the upgrading program can be designed according to requirements, and the application program and the USB equipment driver installation package file can be updated through USB or serial port communication.
The embodiment of the invention specifically comprises the following steps:
step 101, acquiring first identification information sent by the first interface; the first interface is a USB interface;
when the first device is connected with the first interface of the second device, the first device can receive first identification information which is sent by the first device through the first interface and matched with the second device. The first interface is a USB interface, that is, when the first device is connected to the USB interface of the second device for communication, the first identifier information sent by the USB interface is received, and the first identifier information is matched with the second device.
Step 102, judging whether a driver matched with the second equipment is installed locally or not according to the first identification information;
and the first equipment judges whether a driving program matched with the second equipment is installed locally or not by adopting the first identification information. Specifically, the first device may read the content of the system registry based on the first identification information, and detect whether a driver matching the second device is installed.
103, if the driver matched with the second device is not installed locally, sending a preset installation data acquisition request to the second interface; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
and if the first equipment determines that the driver matched with the second equipment is not installed locally, sending an installation data acquisition request to a second interface of the second equipment. And when receiving the installation data acquisition request through the second interface, the second device reads the installation data which is stored in the FLASH and used for deploying the driver of the second device, and sends the installation data to the first device through the second interface.
In an optional embodiment of the invention, the first device is provided with at least one third interface; the step of sending a preset installation data acquisition request to the second interface may include:
a substep S11 of generating authentication information based on the first identification information;
a substep S12, determining a third interface connected to the second interface as a target interface according to the authentication information;
and a substep S13, sending a preset installation data obtaining request to the target interface, so as to send the installation data obtaining request to the second interface.
The first device may be provided with one or more third interfaces, which are adapted to the second interfaces, different third interfaces being connectable to different devices.
And generating authentication information based on the first identifier, so as to verify one of the third interfaces connected with the second equipment, determine that the third interface connected with the second equipment is a target interface, and transmit a preset installation data acquisition request to the target interface, so that the installation data acquisition request is transmitted to the second equipment through the second interface.
The third interface is adapted to the second interface, and the target interface is one of the third interfaces connected to the second interface, and the third interface and the target interface may include but are not limited to one of UART, CAN interface, universal interface bus interface, and ethernet interface. For example: when the second interface is a UART, the target interface is a third interface connected to the second interface, and the target interface is also a UART.
In the embodiment of the invention, the target interface in the third interface of the first device is determined through the authentication information obtained based on the first identification information, so that the device connected with the target interface can be determined to be the second device matched with the first identification information, and the installation data acquisition request can be accurately sent to the second device.
In an alternative embodiment of the present invention, the sub-step S12 may include:
substep S121, traversing the third interface;
the first device may store third identification information in one-to-one correspondence with the third interface, and the third identification information may be a serial port number, taking the third interface as a serial port interface as an example. The first device traverses the third interface by traversing the third identification information.
In an example, the traversed third interface is an interface currently connected with the external device, so that traversing of the third interface currently in an idle state is avoided, and efficiency of determining the target interface is improved.
Substep S122, sending authentication information to the third interface;
and the first equipment sends authentication information to the currently traversed third interface.
Substep S123, receiving an authentication result returned by the third interface;
and receiving an authentication result corresponding to the authentication information returned by the third interface.
Substep S124, if the authentication result is that the authentication is successful, determining that the third interface is a target interface connected with the first interface; and the authentication result received from the target interface is checked by the first equipment according to the authentication information and the local second identification information.
Because the authentication information is obtained by the first identification information matched with the second equipment, if the second equipment receives the first identification information, the second equipment can check the second identification information locally stored by the second equipment, judge whether the authentication information is matched with the authentication information, and if the authentication information is matched with the second identification information, generate a corresponding authentication result.
And when the first equipment obtains an authentication result used for indicating successful authentication from the third interface, determining that the currently traversed third interface is connected with the second equipment, and further determining that the third interface is a target interface.
By adopting the first identifier as the authentication information, one of the third interfaces connected with the second device matched with the first identifier information is determined as the target interface, so that the installation data acquisition request can be sent through the determined target interface subsequently, and the second device can be ensured to receive the installation data acquisition request.
In an optional embodiment of the present invention, the second device is configured to, in response to the installation data obtaining request, read locally stored installation data that matches the driver, and send the installation data to the target interface.
When the second device receives the installation data acquisition request, the installation data stored in the local FLASH and used for deploying the driver can be read, and the installation data is sent to the target interface.
The first equipment receives the installation data of the second equipment through the target interface, so that accurate installation data can be automatically acquired, manual selection of the installation data in the prior art is avoided, and the accuracy and convenience of acquisition of the installation data are improved.
In an optional embodiment of the present invention, the deploying, by using the installation data, the driver matched to the second device includes:
and performing data deployment on the installation data by adopting the preset processing script to obtain a driving program matched with the second equipment.
When the first device receives the installation data, the first device can extract a corresponding installation tool in the installation data by using the processing script, and deploy by using the installation tool to obtain a driver of the second device.
And automatically completing data deployment by adopting the processing script, so that a driver matched with the second equipment is installed in the first equipment. Because the script automatically processes the installation data, the installation process of the driver is not required to be manually intervened, so that the acquisition of the installation data and the installation of the driver are not required to be manually operated, and the efficiency and the accuracy of the acquisition of the installation data and the installation of the driver are effectively ensured.
In an optional embodiment of the invention, the first identification information comprises: a manufacturer Identifier (VID) and a Product Identifier (PID. similar, Product Identifier), and the second identification information includes the VID and the PID.
And the first device adopts VID and PID to identify the second device, detect the installation state of the driver and identify the target interface, and the second device adopts VID and PID to check the authentication information, thereby realizing the accuracy of the execution of the steps.
And 104, deploying the driver matched with the second device by using the installation data.
After receiving the installation data, the first device performs corresponding processing on the installation data so as to locally deploy the driver matched with the second device on the first device, and after completing deployment of the driver matched with the second device, the first device can send a control instruction to a first interface of the second device so as to control the second device to execute corresponding operation.
In an alternative embodiment of the present invention, the embodiment of the present invention may further include: modifying based on the installation data to generate update data; sending the update data to the second device using the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
The first device can modify the installation data aiming at the received operation event (for example, the operation of the user aiming at the first device), generate the update data and send the update data to the second device by adopting the acknowledged target interface, and the second device can store the update data as the new installation data, so that the installation data can be updated without a related service object (for example, a manufacturer) of the second device, and the maintenance efficiency of the second device is improved.
In the prior art, since the USB related parameters of the second device are generally fixed in its own application firmware, when a user needs to adjust some or all of the USB related parameters according to their actual needs, the user can only return to the factory to modify the parameters, which is very inconvenient. By sending the update data to the second device, when the second device is started, the second device can initialize itself according to the update data, and when the update data contains the modified USB related parameters, the corresponding USB related parameters can be adjusted according to the update data during initialization.
In the embodiment of the invention, when a first device is connected with a second device with a USB interface, whether a driver matched with the second device is installed locally is detected according to first identification information sent by the acquired USB interface, if the driver matched with the second device is not installed, an installation data acquisition request is sent to the second device through the second interface, installation data sent by the second interface is received, and the driver matched with the second device is deployed by adopting the installation data, so that the first device can control the first device to perform corresponding operation through the USB interface after the driver is deployed, and when the first device is connected with the second device under the condition that the driver of the second device is not installed, the installation data stored in the second device in advance can be automatically acquired through the second interface different from the USB interface, and the driver is deployed by adopting the installation data, so as to avoid the installation data of the second device being manually selected, the step of installing the driver is simplified, and meanwhile, the driver with a wrong installation is prevented from being installed, so that the first equipment cannot normally control the second equipment.
In the following, the embodiment of the present invention is further explained by taking the first device as a computer and the second interface as a serial interface, referring to fig. 3, which shows a flow diagram of a driver processing method, including the following steps:
1. equipment leaves factory: during production, the bootstrap program, the application firmware and the USB device drive installation package are burnt to the Flash memory through the burner according to the partition table.
2. Non-factory (factory burn completed): when the program is powered on and started, reading the USB device driver installation package file on the Flash according to the partition table, analyzing and acquiring the related configuration of the USB driver, and initializing the USB driver of the device.
3. Initialization: the device connects the USB and serial port lines to the computer, and after a series of initializations are completed, the device is in a ready state.
4. The application program comprises the following steps: after the application program is started, the device driving management dynamic library is automatically loaded, and a user can select to execute corresponding functions according to requirements, so that a command task is initiated.
5. Selecting a communication mode: and selecting and determining a corresponding communication mode according to the attribute of the command, wherein the communication mode comprises USB communication and serial port communication.
6. USB communication: when the USB communication mode is selected, it is necessary to detect whether the USB device driver is installed, and detect and determine the installation state of the driver of the current USB device (second device) according to the PID and VID of the specified USB device through the debug USB (third party library) interface and reading the USB device information in the system registry.
(1) And (3) installation: and the USB equipment is opened by calling the libussb interface, other service commands issued by the application can be received after normal operation, and the commands are forwarded to the USB interface of the SUB equipment and response information is read through the libussb interface.
(2) Not installing: and switching to serial port communication and entering an automatic installation process.
Device authentication: and the PID and VID of the USB are used as module identity authentication information, the device driving management library is sent to the USB device through the serial port for authentication, and if the information authentication is successful, the serial port number (third identification information) is considered to correspond to the target USB device.
Acquiring a USB equipment drive installation package: and the device driver management library issues a USB device driver installation package acquisition command through the serial port.
Reading the USB device driver installation package file by Flash: and after receiving the band command, the USB equipment reads the USB equipment drive installation package file on the Flash according to the partition table.
Uploading the USB equipment drive installation package file: and the USB equipment uploads the USB equipment drive installation package file to the computer through the serial port.
Installing a USB device driver: and after receiving the USB device driver installation package file, the device driver management library calls and installs the USB device driver through executing the batch processing script to finish the automatic installation operation of the USB device driver.
And sixthly, jumping to the step 4 after the installation is finished.
7. Serial port communication: the method comprises the steps of serial port authentication processing, automatic installation of USB equipment drivers, updating and downloading of USB equipment driver installation packages and the like.
Referring to fig. 4, a serial port authentication processing flow in a driver processing method flow is shown, which includes the following steps:
issuing authentication information: after the computer (drive management library) inquires and acquires the serial port number in the equipment management, the computer (drive management library) issues authentication information which takes the PID and VID of the USB as main bases.
Verification of authentication information: after receiving the personal information, the USB equipment checks the personal information with the local PID and VID and returns an authentication result.
Processing the authentication result: after the computer (drive management library) receives the authentication result, if the authentication is successful, the current serial port number is selected as a target serial port (a target interface, namely the serial port corresponding to the second equipment), the authentication is completed, and the next step of communication can be continued; if the authentication fails, the current serial port number is judged not to be the target serial port, and the next serial port in the equipment tree is traversed continuously for authentication.
Referring to fig. 5, an automatic installation process of a USB device driver in a driver processing method process is shown, including the following steps:
command sending: and (2) after the serial port authentication in the step (1) is successful, the computer (drive management library) can send a USB device drive installation package acquisition command to the USB device through the serial port.
Reading an equipment driving installation package: and after receiving the acquisition command, the USB equipment reads the installation package data of the USB equipment driver on the Flash in an SPI bus communication mode.
Uploading equipment drive installation package data: and the USB equipment uploads the read data to a computer through a serial port.
Fourthly, automatic installation: after receiving the USB device driver installation package data, the computer (driver management library) completes the operation of automatic installation by executing the driver installation batch processing script. (the batch script invokes the relevant installation tool in the USB device driver installation package for installation).
When the USB related configuration of the equipment needs to be modified, a bootstrap program and application firmware do not need to be modified, the installation is downloaded to the USB equipment only after the related configuration in the USB equipment drive installation package needs to be modified, the USB equipment installation package data on the Flash is automatically read after the equipment is restarted, the USB related configuration parameters are obtained through analysis, and when the USB drive is initialized, the USB information can be synchronously updated to the latest state by configuring the parameters. Therefore, the USB information of the conventional device is not required to be solidified in the program code, and when the USB related configuration information is modified, the device needs to be returned to the factory to re-burn the boot program and the application firmware. Referring to fig. 6, a USB device driver installation package update downloading process in a driver processing method process is shown, including the following steps:
downloading a USB device driver installation package: and (2) after the serial port authentication in the step (1) is successful, the computer (drive management library) can send the USB device drive installation packet data to the USB device through the serial port.
Secondly, updating the installation package by Flash: and after the USB equipment receives the USB equipment drive installation packet data, performing data verification, writing the received installation packet data into Flash according to the partition table after the verification is successful, replacing the old installation packet data, and responding to a result to the computer.
Processing results: after receiving the downloading result, the computer (drive management library) sends an equipment restarting command if the downloading is successful, the USB equipment is restarted, after the restarting is successful, USB equipment installation package data on Flash is automatically read, USB related configuration parameters are obtained through analysis, and when the USB drive is initialized, the parameters are configured in, so that the USB information can be synchronously updated to the latest state; if the download fails, the user directly exits.
Referring to fig. 7, another embodiment of a driver processing method according to the present invention is shown, and is applied to a second device, where the second device is connected to a first device, and the second device is provided with a first interface and a second interface;
the embodiment of the invention specifically comprises the following steps:
step 701, sending preset first identification information to the first device by using the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface;
step 702, responding to the installation data acquisition request, and sending installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
In an optional embodiment of the invention, the first device is provided with at least one third interface; the second device is used for generating authentication information based on the first identification information; determining a third interface connected with the second interface as a target interface according to the authentication information; and sending a preset installation data acquisition request to the target interface so as to send the installation data acquisition request to the second interface.
In an optional embodiment of the invention, the second device is configured to traverse the third interface; sending authentication information to the third interface; the method further comprises the following steps:
verifying according to the authentication information and the local second identification information to generate an authentication result; the first device is used for receiving an authentication result returned by the third interface; and if the authentication result is that the authentication is successful, determining that the third interface is a target interface connected with the first interface.
In an alternative embodiment of the present invention, step 702 comprises:
responding to the installation data acquisition request, and reading locally stored installation data matched with the driver;
and sending the installation data to the target interface.
In an optional embodiment of the present invention, the first device is configured to perform data deployment on the installation data by using the preset processing script, so as to obtain a driver matched with the second device.
In an optional embodiment of the present invention, the first device is further configured to modify the installation data to generate update data; sending the update data to the second device using the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
In an optional embodiment of the invention, the first identification information comprises: manufacturer identification and product identification.
Since the embodiment of the method is an embodiment of a method at an opposite end of the embodiment of the method, which is basically similar to the embodiment of the method, the description is relatively simple, and for relevant points, reference may be made to part of the description of the embodiment of the method.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 8, a block diagram of an embodiment of a driver processing apparatus of the present invention is shown, the apparatus being located in a first device; the first equipment is connected with second equipment, and the second equipment is provided with a first interface and a second interface; the method specifically comprises the following modules:
a first identification information obtaining module 801, configured to obtain first identification information sent by the first interface;
a driver detection module 802, configured to determine, according to the first identification information, whether a driver that is matched with the second device is installed locally;
an installation data request sending module 803, configured to send a preset installation data obtaining request to the second interface if a driver matching the second device is not installed locally; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
a driver deployment module 804, configured to deploy the driver matched with the second device by using the installation data;
wherein, the first interface is a USB interface.
In an optional embodiment of the invention, the first device is provided with at least one third interface; the installation data request sending module 803 includes:
the authentication information generation submodule is used for generating authentication information based on the first identification information;
the target interface determining submodule is used for determining a third interface connected with the second interface as a target interface according to the authentication information;
and the installation data acquisition request sending submodule is used for sending a preset installation data acquisition request to the target interface so as to send the installation data acquisition request to the second interface.
In an optional embodiment of the present invention, the target interface determining sub-module comprises:
the traversing unit is used for traversing the third interface;
a sending unit, configured to send authentication information to the third interface;
the receiving unit is used for receiving the authentication result returned by the third interface;
a determining unit, configured to determine that the third interface is a target interface connected to the first interface if the authentication result is that authentication is successful;
and the authentication result received from the target interface is checked by the first equipment according to the authentication information and the local second identification information.
In an optional embodiment of the present invention, the second device is configured to, in response to the installation data obtaining request, read locally stored installation data that matches the driver, and send the installation data to the target interface.
In an optional embodiment of the present invention, the driver deploying module 804 is configured to perform data deployment on the installation data by using the preset processing script, so as to obtain a driver matched with the second device.
In an optional embodiment of the invention, the apparatus further comprises:
the updating data generating module is used for modifying based on the installation data to generate updating data;
the update data sending module is used for sending the update data to the second equipment by adopting the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
In an optional embodiment of the invention, the first identification information comprises: manufacturer identification and product identification.
Referring to fig. 9, there is shown a block diagram of another embodiment of a driver processing apparatus of the present invention, the apparatus being located in a second device; the second equipment is connected with the first equipment and is provided with a first interface and a second interface; the method specifically comprises the following modules:
a first identification information sending module 901, configured to send preset first identification information to the first device by using the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface;
an installation data sending module 902, configured to send, in response to the installation data obtaining request, installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
In an optional embodiment of the invention, the first device is provided with at least one third interface; the second device is used for generating authentication information based on the first identification information; determining a third interface connected with the second interface as a target interface according to the authentication information; and sending a preset installation data acquisition request to the target interface so as to send the installation data acquisition request to the second interface.
In an optional embodiment of the invention, the second device is configured to traverse the third interface; sending authentication information to the third interface; the device further comprises:
the verification module is used for verifying according to the authentication information and the local second identification information to generate an authentication result; the first device is used for receiving an authentication result returned by the third interface; and if the authentication result is that the authentication is successful, determining that the third interface is a target interface connected with the first interface.
In an optional embodiment of the present invention, the installation data sending module 902 includes:
the response submodule is used for responding to the installation data acquisition request and reading locally stored installation data matched with the driver;
and the sending submodule is used for sending the installation data to the target interface.
In an optional embodiment of the present invention, the first device is configured to perform data deployment on the installation data by using the preset processing script, so as to obtain a driver matched with the second device.
In an optional embodiment of the present invention, the first device is further configured to modify the installation data to generate update data; sending the update data to the second device using the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
In an optional embodiment of the invention, the first identification information comprises: manufacturer identification and product identification.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including: the driver processing method comprises a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the driver processing method embodiment is realized, the same technical effect can be achieved, and the details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the above-mentioned driver processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for a driver processing method, device, electronic device and medium, and the principle and implementation of the present invention are explained by applying specific examples, and the description of the above embodiments is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. The driver processing method is applied to first equipment, wherein the first equipment is connected with second equipment, and the second equipment is provided with a first interface and a second interface; the method comprises the following steps:
acquiring first identification information sent by the first interface;
judging whether a driver matched with the second equipment is installed locally or not according to the first identification information;
if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
deploying the driver matched with the second equipment by adopting the installation data;
wherein, the first interface is a USB interface.
2. The method according to claim 1, characterized in that the first device is provided with at least one third interface; the step of sending a preset installation data acquisition request to the second interface includes:
generating authentication information based on the first identification information;
determining a third interface connected with the second interface as a target interface according to the authentication information;
and sending a preset installation data acquisition request to the target interface so as to send the installation data acquisition request to the second interface.
3. The method according to claim 2, wherein the step of determining that the third interface connected to the second interface is the target interface according to the authentication information comprises:
traversing the third interface;
sending authentication information to the third interface;
receiving an authentication result returned by the third interface;
if the authentication result is that the authentication is successful, determining that the third interface is a target interface connected with the first interface;
and the authentication result received from the target interface is checked by the first equipment according to the authentication information and the local second identification information.
4. The method according to claim 2 or 3, wherein the second device is configured to read locally stored installation data matching the driver in response to the installation data acquisition request, and send the installation data to the target interface.
5. The method of claim 1, wherein the step of deploying the driver matched to the second device using the installation data comprises:
and adopting a preset processing script to perform data deployment on the installation data to obtain a driving program matched with the second equipment.
6. The method of claim 1, further comprising:
modifying based on the installation data to generate update data;
sending the update data to the second device using the target interface; the second device is used for replacing the current locally stored installation data with the update data; the second device is configured to initialize according to the update data when the second device is started.
7. The driver processing method is applied to second equipment, wherein the second equipment is connected with first equipment, and the second equipment is provided with a first interface and a second interface; the method comprises the following steps:
sending preset first identification information to the first equipment by adopting the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface;
responding to the installation data acquisition request, and sending installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
8. A driver processing apparatus, wherein the apparatus is located at a first device; the first equipment is connected with second equipment, and the second equipment is provided with a first interface and a second interface; the device comprises:
the first identification information acquisition module is used for acquiring first identification information sent by the first interface;
the driver detection module is used for judging whether a driver matched with the second equipment is installed locally or not according to the first identification information;
the installation data request sending module is used for sending a preset installation data acquisition request to the second interface if the driver matched with the second device is not installed locally; the second device is used for responding to the installation data acquisition request and sending installation data matched with the driver;
the driver deployment module is used for deploying the driver matched with the second equipment by adopting the installation data;
wherein, the first interface is a USB interface.
9. A driver processing apparatus, wherein the apparatus is located at a second device; the second equipment is connected with the first equipment and is provided with a first interface and a second interface; the device comprises:
the first identification information sending module is used for sending preset first identification information to the first equipment by adopting the first interface; the first device is used for judging whether a driver matched with the second device is installed locally or not according to the first identification information; if the driver matched with the second equipment is not installed locally, sending a preset installation data acquisition request to the second interface;
the installation data sending module is used for responding to the installation data acquisition request and sending installation data matched with the driver; the first device is used for deploying the driver matched with the second device by adopting the installation data;
wherein, the first interface is a USB interface.
10. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the driver handling method according to any of claims 1-7.
11. 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 driver processing method according to any one of claims 1 to 7.
CN202110316371.0A 2021-03-24 2021-03-24 Driver processing method and device, electronic equipment and medium Pending CN113448630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110316371.0A CN113448630A (en) 2021-03-24 2021-03-24 Driver processing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110316371.0A CN113448630A (en) 2021-03-24 2021-03-24 Driver processing method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113448630A true CN113448630A (en) 2021-09-28

Family

ID=77809273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110316371.0A Pending CN113448630A (en) 2021-03-24 2021-03-24 Driver processing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113448630A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710520A (en) * 2004-06-16 2005-12-21 联想(北京)有限公司 Multifunction data storage device
TW200611192A (en) * 2004-09-21 2006-04-01 Aimgene Technology Co Ltd Bios locking device, computer system with a bios locking device and control method thereof
CN101078817A (en) * 2006-05-22 2007-11-28 比亚迪股份有限公司 Liquid crystal display module test system
CN102004655A (en) * 2010-11-25 2011-04-06 北京飞天诚信科技有限公司 Device and method for automatically installing drivers
KR20140092547A (en) * 2013-01-16 2014-07-24 주식회사 히타치엘지 데이터 스토리지 코리아 USB OTG auto change device
CN104765704A (en) * 2015-03-17 2015-07-08 苏州佳世达电通有限公司 Movable communication device and electronic device
CN106325879A (en) * 2016-08-30 2017-01-11 北京金山安全软件有限公司 Method and device for installing driver and electronic equipment
CN108287734A (en) * 2017-12-25 2018-07-17 努比亚技术有限公司 Connect control method, the first, second terminal and computer readable storage medium
CN109344096A (en) * 2018-09-07 2019-02-15 彩讯科技股份有限公司 A kind of method, apparatus, equipment and storage medium connecting external equipment
CN111638916A (en) * 2020-06-03 2020-09-08 公安部第三研究所 General android mobile terminal driving system and method for data forensics

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710520A (en) * 2004-06-16 2005-12-21 联想(北京)有限公司 Multifunction data storage device
TW200611192A (en) * 2004-09-21 2006-04-01 Aimgene Technology Co Ltd Bios locking device, computer system with a bios locking device and control method thereof
CN101078817A (en) * 2006-05-22 2007-11-28 比亚迪股份有限公司 Liquid crystal display module test system
CN102004655A (en) * 2010-11-25 2011-04-06 北京飞天诚信科技有限公司 Device and method for automatically installing drivers
KR20140092547A (en) * 2013-01-16 2014-07-24 주식회사 히타치엘지 데이터 스토리지 코리아 USB OTG auto change device
CN104765704A (en) * 2015-03-17 2015-07-08 苏州佳世达电通有限公司 Movable communication device and electronic device
CN106325879A (en) * 2016-08-30 2017-01-11 北京金山安全软件有限公司 Method and device for installing driver and electronic equipment
CN108287734A (en) * 2017-12-25 2018-07-17 努比亚技术有限公司 Connect control method, the first, second terminal and computer readable storage medium
CN109344096A (en) * 2018-09-07 2019-02-15 彩讯科技股份有限公司 A kind of method, apparatus, equipment and storage medium connecting external equipment
CN111638916A (en) * 2020-06-03 2020-09-08 公安部第三研究所 General android mobile terminal driving system and method for data forensics

Similar Documents

Publication Publication Date Title
CN103458002B (en) One key dispositions method and device of cloud system
US20150074659A1 (en) Methods and Apparatus to Perform Web-Based Installations and/or Upgrade Architectures for Enterprise Software
CN101393524A (en) Firmware update method and system using the same
WO2009082906A1 (en) Method, equipment and system for software upgrading
CN103164238A (en) Method for automatically and continuously installing operating system
CN104113430A (en) Cloud computing data center automatic deployment software framework design
CN102447732A (en) Method for intelligent configuration of host computer embedded environment during BMC (Baseboard Management Controller) development
CN103677887A (en) Information processing method and electronic device
CN103840968A (en) Version updating method, version updating device and terminal equipment
CN111427624A (en) Method, device and system for batch automatic deployment and configuration of servers
US20060129788A1 (en) System and method for initially configuring and booting a device using a device identifier
CN107220085B (en) Method for automatically upgrading RAID card firmware
CN113517996A (en) Network card equipment polling method, system and related device
CN103997684A (en) Method and device for updating operating system
CN114546819A (en) Code processing method and device, electronic equipment and readable medium
CN110737444A (en) Remote self-adaptive dynamic deployment method and system for operating system based on firmware
CN113448630A (en) Driver processing method and device, electronic equipment and medium
CN102053845A (en) Electronic device for automatically and continuously mounting operating system and related method and system thereof
CN106484442B (en) Server system and method for updating startup mapping file
CN116643761A (en) Customized mirror image manufacturing and deploying method, device, terminal and medium
CN113467893B (en) Automatic testing method and device for virtual machine, storage medium and processor
CN106980792B (en) Control method of application permission, electronic equipment and server
CN107315602B (en) Application program upgrading method and terminal
CN114237722A (en) System starting method, device, equipment and engineering vehicle
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium

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