[go: up one dir, main page]

CN113791824B - Peripheral driver loading method, system and medium of terminal equipment - Google Patents

Peripheral driver loading method, system and medium of terminal equipment Download PDF

Info

Publication number
CN113791824B
CN113791824B CN202110913354.5A CN202110913354A CN113791824B CN 113791824 B CN113791824 B CN 113791824B CN 202110913354 A CN202110913354 A CN 202110913354A CN 113791824 B CN113791824 B CN 113791824B
Authority
CN
China
Prior art keywords
file
driving
drive
unpacking
loading
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.)
Active
Application number
CN202110913354.5A
Other languages
Chinese (zh)
Other versions
CN113791824A (en
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.)
Inspur Financial Information Technology Co Ltd
Original Assignee
Inspur Financial Information 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 Inspur Financial Information Technology Co Ltd filed Critical Inspur Financial Information Technology Co Ltd
Priority to CN202110913354.5A priority Critical patent/CN113791824B/en
Publication of CN113791824A publication Critical patent/CN113791824A/en
Application granted granted Critical
Publication of CN113791824B publication Critical patent/CN113791824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a peripheral driver loading method, a peripheral driver loading system and a peripheral driver loading medium of terminal equipment, wherein the method comprises the following steps: storing the driving codes into terminal equipment based on the system specification to obtain a driving file; acquiring a driving in-place condition based on the combination mode and the storage path; performing drive temporary storage operation on the drive file based on the drive in-place condition to obtain an unpacked file; setting a file format; obtaining unpacking information of unpacking files; carrying out partition storage operation on the unpacked file based on the file format and unpacked information to obtain a drive calling program; setting a detection time period and a detection threshold; acquiring an instantiation log of a drive loading requirement and a drive calling program; executing a loading step on the drive calling program based on the detection time period, the detection threshold value, the drive loading requirement and the instantiation log; according to the method and the device, when the terminal equipment carrying the android system interacts with the external equipment, the drive of the external equipment can be rapidly loaded, and the running space of the terminal equipment cannot be occupied.

Description

Peripheral driver loading method, system and medium of terminal equipment
Technical Field
The invention relates to the technical field of intelligent self-service terminals, in particular to a peripheral driver loading method, a peripheral driver loading system and a peripheral driver loading medium of terminal equipment.
Background
The self-service terminal equipment generally adopts a Windows system as an operating system, and the Windows system has higher use cost, so the terminal equipment carrying the android system is developed along with the development of science and technology; the terminal equipment carrying the android system is low in use cost, but because the application quantity is small, the compatibility of some external equipment is poor, and when the terminal equipment carrying the android system interacts with the external equipment, the driver is required to be downloaded, installed and called because the unified driver loading standard does not exist, so that the running space of the terminal equipment can be greatly occupied, and the running efficiency of the equipment is finally influenced.
Disclosure of Invention
The method mainly solves the problems that in the prior art, when terminal equipment carrying an android system interacts with external equipment, the equipment operation space is occupied in a driving loading mode, and the operation efficiency of the equipment is affected.
In order to solve the technical problems, the invention adopts a technical scheme that: the peripheral driver loading method of the terminal equipment comprises the following steps:
Obtaining a driving file:
acquiring a driving code;
detecting a system specification of the terminal equipment;
storing the driving code into the terminal equipment based on the system specification to obtain the driving file;
obtaining an unpacking file:
setting a combination mode and a storage path;
acquiring a driving in-place condition based on the combination mode and the storage path;
performing drive temporary storage operation on the drive file based on the drive in-place condition to obtain the unpacked file;
acquiring a drive calling program:
setting a file format;
obtaining unpacking information of the unpacking file;
carrying out partition storage operation on the unpacked file based on the file format and the unpacked information to obtain the drive calling program;
the loading step is executed:
setting a detection time period and a detection threshold;
acquiring a drive loading requirement and an instantiation log of the drive calling program;
the loading step is performed on the driver caller based on the detection time period, the detection threshold, the driver loading requirement, and the instantiation log.
As an improvement, the step of storing the driving code in the terminal device based on the system specification to obtain the driving file further includes:
Acquiring a storage address of an external storage device in the terminal device, accessing an external storage area of the external storage device according to the storage address, and creating a drive cache folder in the external storage area;
and storing the driving codes to the driving cache folder according to the system specification to obtain the driving file.
As an improvement, the step of acquiring the driving in-bit condition based on the combination manner and the storage path further includes:
acquiring file information of the driving file, and identifying a driving identification code and a data verification code in the file information; combining the driving identification code and the data check code according to the combination mode to obtain a driving identification value;
accessing the storage path, and judging whether a first file matched with the type of the driving file exists in the storage path or not;
if the driving file is not in place, setting the driving in-place condition as that the driving file is not in place;
if the first file exists, identifying a file identification code and a file check code of the first file, and combining the file identification code and the file check code according to the combination mode to obtain a file identification value; comparing whether the drive identification value is matched with the file identification value; if the driving file is matched with the driving file, setting the driving in-place condition as that the driving file is in place; if the drive file is not matched, the drive bit condition is set as the drive file is not in place.
As an improvement, the step of performing a drive temporary storage operation on the drive file based on the drive in-place condition further includes:
when the driving in-place condition is that the driving file is not in place, executing the driving temporary storage operation on the driving file; the driving temporary storage operation comprises the following steps:
and obtaining a file analysis specification matched with the system specification, copying the driving file to an internal storage area matched with the storage path, and unpacking the driving file according to the file analysis specification to obtain the unpacked file.
As an improvement, the partition storing operation includes:
identifying file type information in the unpacking information, and dividing the unpacking file into a plurality of files to be identified according to the file type information;
creating a plurality of storage folders in the internal storage area according to the file type information, and creating calling hyperlinks among the plurality of storage folders;
storing a plurality of files to be identified into a plurality of storage folders according to the file type information, and obtaining format information of the files to be identified;
And setting the file to be identified corresponding to the format information matched with the file format as the driving calling program.
As an improvement, the step of executing the loading step on the driver caller based on the detection period, the detection threshold, the driver loading requirement, and the instantiation log further includes:
judging whether the instantiation log is an empty log or not;
if yes, extracting a drive calling code of the drive calling program, and instantiating the drive calling program in the embedded storage area based on the drive calling code; calling a virtual machine program of the terminal equipment to run the drive calling program to obtain a first drive instance; executing the loading step based on the first drive instance, the detection time period, the detection threshold, and the drive loading requirement;
if not, acquiring the instantiation information in the instantiation log, and marking a second driving instance matched with the instantiation information in the internal storage area; the loading step is performed based on the second drive instance, the detection period of time, the detection threshold, and the drive loading requirement.
As an improvement, the loading step includes:
identifying a drive category and an output address in the drive loading demand;
invoking the first driving instance or the second driving instance matched with the driving category in the internal storage area to perform data interaction with external equipment corresponding to the output address;
detecting whether the drive calling feedback information of the external equipment is received or not every the detection time period;
if the drive call feedback information is received, the drive call feedback information is stored in a storage path matched with the first drive instance or the second drive instance;
if not, recording the detection times, and when the detection times reach the detection threshold value, acquiring the state information of the external equipment, and storing the state information into a storage path matched with the first driving instance or the second driving instance.
As an improvement, the device further comprises:
after the loading step is executed, detecting a driving request condition, a terminal equipment running state and a driving instance state;
and when the driving request condition is that a driving request does not exist, the running state of the terminal equipment is that the terminal equipment does not run, or the driving instance state is that the driving instance is abnormal, calling the virtual machine program to terminate running of the driving calling program corresponding to the first driving instance or the second driving instance.
The invention also provides a peripheral driver loading system of the terminal equipment, which comprises:
the device comprises a driving file acquisition module, a file unpacking module, a program generation module and a driving calling module;
the driving file acquisition module is used for acquiring a driving code and detecting a system specification of the terminal equipment; the driving file acquisition module stores the driving codes into the terminal equipment based on the system specification to obtain a driving file;
the file unpacking module is used for setting a combination mode and a storage path, and the file unpacking module obtains a driving in-place condition based on the combination mode and the storage path; the file unpacking module is also used for executing driving temporary storage operation on the driving file according to the driving in-place condition to obtain an unpacked file;
the program generating module is used for setting a file format and acquiring unpacking information of the unpacking file; the program generating module is also used for carrying out partition storage operation on the unpacked file according to the file format and the unpacked information to obtain a drive calling program;
the drive calling module is used for setting a detection time period and a detection threshold value; the drive calling module is also used for acquiring a drive loading requirement and an instantiation log of the drive calling program; the driver call module is further configured to execute a loading step on the driver call program according to the detection time period, the detection threshold, the driver loading requirement, and the instantiation log.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the peripheral driver loading method of the terminal device.
The beneficial effects of the invention are as follows:
1. the peripheral driver loading method of the terminal equipment can realize the rapid loading of the external equipment driver when the terminal equipment carrying the android system interacts with the external equipment, does not occupy the running space of the terminal equipment, has certain intelligentization, does not need manual operation, has extremely strong convenience and applicability, makes up the defects of the prior art, and has certain market value.
2. According to the peripheral drive loading system of the terminal equipment, the drive file acquisition module, the file unpacking module, the program generation module and the drive calling module are matched with each other, so that the external equipment is rapidly loaded when the terminal equipment carrying the android system interacts with the external equipment, the running space of the terminal equipment is not occupied, the peripheral drive loading system is intelligent to a certain extent, manual operation is not needed, convenience and applicability are extremely high, and the defects of the prior art are overcome.
3. The computer readable storage medium can realize the coordination of the guide driving file acquisition module, the file unpacking module, the program generation module and the driving calling module, so that the external equipment is rapidly loaded when the terminal equipment carrying the android system interacts with the external equipment, the running space of the terminal equipment is not occupied, the convenience and the applicability are extremely strong, and the operability of the peripheral driving loading method of the terminal equipment is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a peripheral driver loading method of a terminal device according to embodiment 1 of the present invention;
fig. 2 is a specific flow chart of a peripheral driver loading method of the terminal device according to embodiment 1 of the present invention;
Fig. 3 is a diagram of the architecture of the peripheral driver loading system of the terminal device according to embodiment 2 of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making clear and defining the scope of the present invention.
In the description of the present invention, it should be noted that the described embodiments of the present invention are some, but not all embodiments of the present invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, unless explicitly specified and defined otherwise, the terms "drive code", "system specification", "drive file", "combination mode", "storage path", "drive in-place situation", "drive temporary storage operation", "unpacking file", "file format", "unpacking information", "partition storage operation", "drive calling program", "detection period", "detection threshold", "drive loading requirement", "instantiation log", "loading step", "storage address", "off-load storage device", "off-load storage area", "drive cache folder", "file information", "drive identification code", "data check code", "drive identification value", "drive file non-in-place", "file identification code", "file check code", "file identification value", "drive file in-place", "file parsing specification", "on-load storage area", "file type information", "file to be identified", "storage folder", "call hyperlink", "format information", "air-conditioning log", "drive calling code", "drive instance", "instantiation information", "drive category", "output address", "drive call feedback information", "detection number of times", "state information", "drive request situation", "terminal device running state", "drive instance", "absence of drive request", "terminal device non-running", "drive instance", "drive abnormality", "drive file acquisition module", "file unpacking module", "file generation module", "generalized call module". The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In describing the present invention, it should be noted that: APK is a file format; windows is an operating system; MD5 is a check code; DEX is a file format.
Example 1
The embodiment provides a peripheral driver loading method of a terminal device, as shown in fig. 1 and fig. 2, including the following steps:
s100, acquiring a driving file:
the step S100 specifically includes:
s110, acquiring a driving code; detecting a system specification of the terminal equipment; storing the driving code into the terminal equipment based on the system specification to obtain the driving file; in this embodiment, the system specification is an android system specification; the driving codes are various codes and comprise the driving of various types of external devices, so that the universality and flexible adaptability of the terminal equipment of the whole android system are improved;
specifically, a storage address of an external storage device in the terminal device is obtained, an external storage area of the external storage device is accessed according to the storage address, and a drive cache folder is created in the external storage area; storing the driving codes to the driving cache folder according to the system specification to obtain the driving file; in the embodiment, storing a driving code into a driving cache folder in an APK form according to android system specifications to obtain a driving file in the APK form; correspondingly, the step accords with the system specification, the corresponding abnormal situation or the incompatible situation of the system drive is not generated, the following steps are made, the corresponding drive file is stored in the cache partition of the external storage device, the main operation space of the system is not occupied, and the energy efficiency of the drive loading is further improved.
S200, obtaining an unpacking file:
the step S200 specifically includes:
s210, setting a combination mode and a storage path; acquiring a driving in-place condition based on the combination mode and the storage path; performing drive temporary storage operation on the drive file based on the drive in-place condition to obtain the unpacked file;
specifically, file information of the driving file is obtained, and a driving identification code and a data check code in the file information are identified; combining the driving identification code and the data check code according to the combination mode to obtain a driving identification value; in this embodiment, the combination mode is a one-to-one cross combination mode, and the purpose of setting the combination mode is to more accurately determine whether the same driving file exists in the system, so as to avoid misunderstanding of the driving file and further influence the driving loading efficiency;
specifically, the storage path is accessed, and whether a first file matched with the type of the driving file exists in the storage path is judged; if the driving file is not in place, setting the driving in-place condition as that the driving file is not in place; if the first file exists, identifying a file identification code and a file check code of the first file, and combining the file identification code and the file check code according to the combination mode to obtain a file identification value; comparing whether the drive identification value is matched with the file identification value; if the driving file is matched with the driving file, setting the driving in-place condition as that the driving file is in place; if the drive file is not matched with the drive file, setting the drive in-place condition as the drive file is not in-place; correspondingly, in the embodiment, the file identification code and the drive identification code are respectively the name codes or serial numbers of the first file and the drive file; the driving check code and the file check code are MD5 values of the first file and the driving file respectively, namely check data carried in the data packet; correspondingly, by the combined verification of the two identification codes, the verification accuracy is further improved, the number of reloading driving times is reduced, and the loading driving efficiency is further improved;
Specifically, when the driving in-place condition is that the driving file is not in place, the driving temporary storage operation is executed on the driving file, and the driving temporary storage operation includes: acquiring a file analysis specification matched with the system specification, copying the driving file to an internal storage area matched with the storage path, and unpacking the driving file according to the file analysis specification to obtain the unpacked file; correspondingly, when the driving in-place condition is in place, the next step is directly carried out without carrying out the step, and the step is only to carry out corresponding driving temporary storage operation when the driving in-place condition is not in place; the driving temporary storage operation is to unpack the driving file, and in this embodiment, the file analysis specification is an analysis specification corresponding to the APK file in the android system; the internal storage area is a system internal storage space of the terminal equipment, such as a folder in an operating system storage space; the purpose of copying to the internal storage area is to run the drive more stably, and the drive needs to be reinstalled after the system is restarted, so that the loading efficiency of the subsequent drive can be reduced; the storage path is a storage partition preset for the driving file in the internal storage area; persistent processing is carried out after copying, so that file loss and abnormality in later-stage calling are avoided;
S300, acquiring a drive calling program:
the step S300 specifically includes:
s310, setting a file format; obtaining unpacking information of the unpacking file; carrying out partition storage operation on the unpacked file based on the file format and the unpacked information to obtain the drive calling program; in this embodiment, the file format is a DEX format; the unpacking information comprises file type information, file quantity and the like;
specifically, the partition storage operation includes: identifying file type information in the unpacking information, and dividing the unpacking file into a plurality of files to be identified according to the file type information; creating a plurality of storage folders in the internal storage area according to the file type information, and creating calling hyperlinks among the plurality of storage folders; storing a plurality of files to be identified into a plurality of storage folders according to the file type information, and obtaining format information of the files to be identified; setting the file to be identified corresponding to the format information matched with the file format as the driving calling program; correspondingly, in this step, the plurality of files to be identified include: a drive execution file, a dynamic link library file, a drive configuration file, a drive resource file and the like; these files are all files that are necessary for the driver to call; correspondingly, a calling hyperlink is established among a plurality of storage folders, so that when the calling is driven, all files are matched for starting; correspondingly, the file with the format information of the DEX format is an executable file of the driver, namely a driver calling program, and the driver calling program comprises a core calling code of the driver;
S400, executing a loading step:
the step S400 specifically includes:
s410, setting a detection time period and a detection threshold; acquiring a drive loading requirement and an instantiation log of the drive calling program; executing the loading step on the driver caller based on the detection time period, the detection threshold, the driver loading requirement, and the instantiation log;
correspondingly, before the driver is loaded, the instantiation of the driver must be ensured, so that whether the driver calling program is instantiated or not is judged according to an instantiation log of the driver calling program; typically, the driver caller is not instantiated;
specifically, judging whether the instantiation log is an empty log or not; if the log is empty, the representative drive calling program is not instantiated; extracting a drive calling code of the drive calling program, and instantiating the drive calling program in the internal memory area based on the drive calling code, namely loading the drive calling code into a main control memory chip of the android system; invoking a virtual machine program of the terminal equipment to run the drive invoking program so as to obtain a first drive instance; executing the loading step based on the first drive instance, the detection time period, the detection threshold, and the drive loading requirement; if not, the representative driver call program is already instantiated; at this time, the instantiation information in the instantiation log is acquired, wherein the instantiation information comprises a specific storage path where a driving instance is located; marking a second driving instance matched with the instantiation information in the internal storage area; executing the loading step based on the second drive instance, the detection time period, the detection threshold, and the drive loading requirement;
Specifically, the loading step is a driving loading operation matched with the calling requirement of the external device, and the loading step includes: identifying a drive category and an output address in the drive loading demand; the driving category is the driving program category corresponding to the external equipment; the output address is a data interaction address corresponding to the input address of the terminal equipment accessed by the external equipment; correspondingly, invoking the first driving instance or the second driving instance matched with the driving category in the internal storage area to perform data interaction with external equipment corresponding to the output address; in the present embodiment, in order to ensure high efficiency and instantaneity, the detection period is set to 1 second; detecting whether the drive calling feedback information of the external equipment is received or not every the detection time period; the driver call feedback information includes, but is not limited to, any one of successful driver loading, successful driver installation, or failure driver loading; if the drive call feedback information is received, the drive call feedback information is stored in a storage path matched with the first drive instance or the second drive instance, namely, a corresponding call log is generated, the safety of the system is further improved, and the previous drive call flow can be traversed in the later fault operation by the call log; if not, recording detection times, and when the detection times reach the detection threshold value, acquiring state information of the external equipment, and storing the state information into a storage path matched with the first driving instance or the second driving instance; in the embodiment, in order to improve the drive loading efficiency, the detection threshold is 3, if the feedback information of the drive call is not received for more than 3 times, the external equipment is judged to be abnormal, and the state information of the external equipment is required to be returned to the drive program as a call log;
Specifically, the method further comprises the following steps: after the loading step is executed, detecting a driving request condition, a terminal equipment running state and a driving instance state; when the driving request condition is that a driving request does not exist, the running state of the terminal equipment is that the terminal equipment does not run, or the driving instance state is that the driving instance is abnormal, the virtual machine program is called to terminate running of the driving calling program corresponding to the first driving instance or the second driving instance; in this embodiment, in order to further reduce occupation in the system and improve the efficiency of loading the drive, this step releases the drive when the drive is not needed, and the release condition includes, but is not limited to, that the drive request is no, that the running state of the terminal device is that the terminal device is not running, or that the running state of the driving instance is that the driving instance is abnormal; for example: the absence of a drive request includes, but is not limited to, active interaction of an external device without a driver; the terminal equipment does not operate, including but not limited to power-off of the terminal equipment or shutdown of the android system main control chip; drive instance exceptions include, but are not limited to, the driver being intercepted by a Trojan horse or being squeezed out by a process, etc.
The peripheral drive loading method of the terminal equipment can be used for rapidly and accurately loading the drive program in the terminal equipment under the android system, is extremely high in universality, is applicable to various external equipment, does not occupy the running space of the android system when the drive program is loaded, and is extremely high in energy efficiency, so that the defects of the prior art are overcome.
Example 2
The present embodiment provides a peripheral driver loading system of a terminal device, as shown in fig. 3, including: the device comprises a driving file acquisition module, a file unpacking module, a program generation module and a driving calling module;
in the peripheral drive loading system of the terminal equipment, a drive file acquisition module is used for acquiring a drive code and detecting the system specification of the terminal equipment; the driving file acquisition module stores the driving codes into the terminal equipment based on the system specification to obtain a driving file;
specifically, a drive file acquisition module acquires a storage address of an external storage device in the terminal device, accesses an external storage area of the external storage device according to the storage address, and creates a drive cache folder in the external storage area; and the drive file acquisition module stores the drive codes into the drive cache folder according to the system specification to obtain the drive file.
In the peripheral driver loading system of the terminal equipment, a file unpacking module is used for setting a combination mode and a storage path, and the file unpacking module obtains a driver in-place condition based on the combination mode and the storage path; the file unpacking module is also used for executing driving temporary storage operation on the driving file according to the driving in-place condition to obtain an unpacked file;
specifically, a file unpacking module obtains file information of the driving file and identifies a driving identification code and a data verification code in the file information; the file unpacking module combines the driving identification code and the data check code according to the combination mode to obtain a driving identification value; the file unpacking module accesses the storage path and judges whether a first file matched with the driving file type exists in the storage path or not; if not, the file unpacking module sets the driving in-place condition as that the driving file is not in place; if the first file exists, the file unpacking module identifies the file identification code and the file check code of the first file, and the file unpacking module combines the file identification code and the file check code according to the combination mode to obtain a file identification value; the file unpacking module compares whether the driving identification value is matched with the file identification value or not; if the driving file is matched with the driving file, the file unpacking module sets the driving in-place condition as that the driving file is in place; if the driving file is not in place, the file unpacking module sets the driving in-place condition as that the driving file is not in place;
Specifically, when the driving in-place condition is that the driving file is not in place, the file unpacking module executes the driving temporary storage operation on the driving file, where the driving temporary storage operation includes: and the file unpacking module acquires a file analysis specification matched with the system specification, copies the driving file to an embedded storage area matched with the storage path, unpacks the driving file according to the file analysis specification, and obtains the unpacked file.
In the peripheral drive loading system of the terminal equipment, a program generating module is used for setting a file format and acquiring unpacking information of the unpacking file; the program generating module is also used for carrying out partition storage operation on the unpacked file according to the file format and the unpacked information to obtain a drive calling program;
specifically, the partition storage operation includes: the program generating module identifies file type information in the unpacking information and divides the unpacking file into a plurality of files to be identified according to the file type information; the program generating module creates a plurality of storage folders in the internal storage area according to the file type information, and creates calling hyperlinks among the plurality of storage folders; the program generating module stores a plurality of files to be identified into a plurality of storage folders according to the file type information, and obtains format information of the files to be identified; and the program generating module sets the file to be identified corresponding to the format information matched with the file format as the driving calling program.
In the peripheral drive loading system of the terminal equipment, a drive calling module is used for setting a detection time period and a detection threshold; the drive calling module is also used for acquiring a drive loading requirement and an instantiation log of the drive calling program; the drive calling module is further used for executing a loading step on the drive calling program according to the detection time period, the detection threshold, the drive loading requirement and the instantiation log;
specifically, the drive calling module judges whether the instantiation log is an empty log or not; if yes, the drive calling module extracts a drive calling code of the drive calling program and instantiates the drive calling program in the embedded storage area based on the drive calling code; the method comprises the steps that a drive calling module calls a virtual machine program of terminal equipment to run the drive calling program to obtain a first drive instance; the drive calling module executes the loading step based on the first drive instance, the detection time period, the detection threshold and the drive loading requirement; if not, the drive calling module acquires the instantiation information in the instantiation log and marks a second drive instance matched with the instantiation information in the internal storage area; the drive calling module executes the loading step based on the second drive instance, the detection time period, the detection threshold and the drive loading requirement;
Specifically, the loading step includes: the drive calling module identifies the drive type and the output address in the drive loading requirement; the drive calling module calls the first drive instance or the second drive instance matched with the drive type in the internal storage area to perform data interaction with external equipment corresponding to the output address; the drive calling module detects whether drive calling feedback information of the external equipment is received or not every the detection time period; if the drive call feedback information is received, the drive call module stores the drive call feedback information into a storage path matched with the first drive instance or the second drive instance; if not, the drive calling module records the detection times, and when the detection times reach the detection threshold, the drive calling module acquires the state information of the external equipment, and the drive calling module stores the state information into a storage path matched with the first drive instance or the second drive instance.
Specifically, after the loading step is executed, the drive calling module detects a drive request condition, a terminal equipment running state and a drive instance state; when the driving request condition is that a driving request does not exist, the running state of the terminal equipment is that the terminal equipment does not run, or the driving instance state is that the driving instance is abnormal, the driving calling module calls the virtual machine program to terminate running of the driving calling program corresponding to the first driving instance or the second driving instance.
Through the peripheral drive loading system of the terminal equipment described in the embodiment, the drive program can be rapidly and accurately loaded in the terminal equipment under the android system through the cooperation among the drive file acquisition module, the file unpacking module, the program generation module and the drive calling module, the system is extremely high in universality, applicable to various external equipment, and can not occupy the running space of the android system when the drive program is loaded, so that the energy efficiency is extremely high, and the defects of the prior art are overcome.
Example 3
The present embodiment provides a computer-readable storage medium including:
the storage medium is used for storing computer software instructions for implementing the peripheral driver loading method of the terminal device described in the above embodiment 1, and the computer software instructions include a program for executing the above program set for the peripheral driver loading method of the terminal device; specifically, the executable program may be built in the peripheral driver loading system of the terminal device described in embodiment 2, so that the peripheral driver loading system of the terminal device may implement the peripheral driver loading method of the terminal device described in embodiment 1 by executing the built-in executable program.
Further, the computer readable storage medium provided in the present embodiment may be any combination of one or more readable storage media, where the readable storage media includes an electric, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Compared with the prior art, the peripheral drive loading method, the peripheral drive loading system and the peripheral drive loading medium for the terminal equipment can be used for rapidly loading the drive of the external equipment when the terminal equipment carrying the android system interacts with the external equipment, the running space of the terminal equipment is not occupied, the intelligent terminal equipment is provided with a certain degree of intelligence, the effective technical support is provided for the method through the system, the manual operation is not needed, the convenience and the applicability are extremely strong, the defects of the prior art are overcome, and the intelligent terminal equipment has a certain market value.
The foregoing embodiment of the present application has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or a program implemented by a program to instruct related hardware may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (7)

1. The peripheral driver loading method of the terminal equipment is characterized by comprising the following steps of:
obtaining a driving file:
acquiring a driving code;
detecting a system specification of the terminal equipment;
storing the driving code into the terminal equipment based on the system specification to obtain the driving file;
obtaining an unpacking file:
setting a combination mode and a storage path;
acquiring a driving in-place condition based on the combination mode and the storage path;
performing drive temporary storage operation on the drive file based on the drive in-place condition to obtain the unpacked file;
acquiring a drive calling program:
setting a file format;
obtaining unpacking information of the unpacking file;
carrying out partition storage operation on the unpacked file based on the file format and the unpacked information to obtain the drive calling program;
the loading step is executed:
Setting a detection time period and a detection threshold;
acquiring a drive loading requirement and an instantiation log of the drive calling program;
executing the loading step on the driver caller based on the detection time period, the detection threshold, the driver loading requirement, and the instantiation log;
the step of storing the driving code into the terminal device based on the system specification to obtain the driving file further includes: acquiring a storage address of an external storage device in the terminal device, accessing an external storage area of the external storage device according to the storage address, and creating a drive cache folder in the external storage area; storing the driving codes to the driving cache folder according to the system specification to obtain the driving file;
the step of acquiring the driving in-bit condition based on the combination and the storage path further comprises: acquiring file information of the driving file, and identifying a driving identification code and a data verification code in the file information; combining the driving identification code and the data check code according to the combination mode to obtain a driving identification value; accessing the storage path, and judging whether a first file matched with the type of the driving file exists in the storage path or not; if the driving file is not in place, setting the driving in-place condition as that the driving file is not in place; if the first file exists, identifying a file identification code and a file check code of the first file, and combining the file identification code and the file check code according to the combination mode to obtain a file identification value; comparing whether the drive identification value is matched with the file identification value; if the driving file is matched with the driving file, setting the driving in-place condition as that the driving file is in place; if the drive file is not matched with the drive file, setting the drive in-place condition as the drive file is not in-place;
The step of performing a drive temporary storage operation on the drive file based on the drive in-place condition further includes: when the driving in-place condition is that the driving file is not in place, executing the driving temporary storage operation on the driving file; the driving temporary storage operation comprises the following steps: and obtaining a file analysis specification matched with the system specification, copying the driving file to an internal storage area matched with the storage path, and unpacking the driving file according to the file analysis specification to obtain the unpacked file.
2. The peripheral driver loading method of a terminal device according to claim 1, wherein the partition storing operation includes:
identifying file type information in the unpacking information, and dividing the unpacking file into a plurality of files to be identified according to the file type information;
creating a plurality of storage folders in the internal storage area according to the file type information, and creating calling hyperlinks among the plurality of storage folders;
storing a plurality of files to be identified into a plurality of storage folders according to the file type information, and obtaining format information of the files to be identified;
And setting the file to be identified corresponding to the format information matched with the file format as the driving calling program.
3. The peripheral driver loading method of a terminal device according to claim 2, wherein the step of executing the loading step on the driver caller based on the detection period, the detection threshold, the driver loading requirement, and the instantiation log further comprises:
judging whether the instantiation log is an empty log or not;
if yes, extracting a drive calling code of the drive calling program, and instantiating the drive calling program in the embedded storage area based on the drive calling code; calling a virtual machine program of the terminal equipment to run the drive calling program to obtain a first drive instance; executing the loading step based on the first drive instance, the detection time period, the detection threshold, and the drive loading requirement;
if not, acquiring the instantiation information in the instantiation log, and marking a second driving instance matched with the instantiation information in the internal storage area; the loading step is performed based on the second drive instance, the detection period of time, the detection threshold, and the drive loading requirement.
4. A peripheral driver loading method of a terminal device according to claim 3, wherein the loading step comprises:
identifying a drive category and an output address in the drive loading demand;
invoking the first driving instance or the second driving instance matched with the driving category in the internal storage area to perform data interaction with external equipment corresponding to the output address;
detecting whether the drive calling feedback information of the external equipment is received or not every the detection time period;
if the drive call feedback information is received, the drive call feedback information is stored in a storage path matched with the first drive instance or the second drive instance;
if not, recording the detection times, and when the detection times reach the detection threshold value, acquiring the state information of the external equipment, and storing the state information into a storage path matched with the first driving instance or the second driving instance.
5. The peripheral driver loading method of a terminal device according to claim 3, further comprising:
after the loading step is executed, detecting a driving request condition, a terminal equipment running state and a driving instance state;
And when the driving request condition is that a driving request does not exist, the running state of the terminal equipment is that the terminal equipment does not run, or the driving instance state is that the driving instance is abnormal, calling the virtual machine program to terminate running of the driving calling program corresponding to the first driving instance or the second driving instance.
6. A peripheral driver loading system for a terminal device, comprising: the device comprises a driving file acquisition module, a file unpacking module, a program generation module and a driving calling module;
the driving file acquisition module is used for acquiring a driving code and detecting a system specification of the terminal equipment; the driving file acquisition module stores the driving codes into the terminal equipment based on the system specification to obtain a driving file;
the file unpacking module is used for setting a combination mode and a storage path, and the file unpacking module obtains a driving in-place condition based on the combination mode and the storage path; the file unpacking module is also used for executing driving temporary storage operation on the driving file according to the driving in-place condition to obtain an unpacked file;
the program generating module is used for setting a file format and acquiring unpacking information of the unpacking file; the program generating module is also used for carrying out partition storage operation on the unpacked file according to the file format and the unpacked information to obtain a drive calling program;
The drive calling module is used for setting a detection time period and a detection threshold value; the drive calling module is also used for acquiring a drive loading requirement and an instantiation log of the drive calling program; the drive calling module is further used for executing a loading step on the drive calling program according to the detection time period, the detection threshold, the drive loading requirement and the instantiation log;
the driving file obtaining module stores the driving code into the terminal device based on the system specification, and obtaining the driving file further includes: the drive file acquisition module acquires a storage address of an external storage device in the terminal device, accesses an external storage area of the external storage device according to the storage address, and creates a drive cache folder in the external storage area; the drive file acquisition module stores the drive codes into the drive cache folder according to the system specification to obtain the drive file;
the file unpacking module further includes, based on the combination and the storage path acquisition driver in-bit case: the file unpacking module acquires file information of the driving file and identifies a driving identification code and a data check code in the file information; the file unpacking module combines the driving identification code and the data check code according to the combination mode to obtain a driving identification value; the file unpacking module accesses the storage path and judges whether a first file matched with the driving file type exists in the storage path or not; if not, the file unpacking module sets the driving in-place condition as that the driving file is not in place; if the first file exists, the file unpacking module identifies the file identification code and the file check code of the first file, and combines the file identification code and the file check code according to the combination mode to obtain a file identification value; the file unpacking module compares whether the driving identification value is matched with the file identification value or not; if the driving file is matched with the driving file, the file unpacking module sets the driving in-place condition as that the driving file is in place; if the driving file is not in place, the file unpacking module sets the driving in-place condition as that the driving file is not in place;
The performing a driving temporary storage operation on the driving file according to the driving in-place condition further includes: when the driving in-place condition is that the driving file is not in place, the file unpacking module executes the driving temporary storage operation on the driving file, and the driving temporary storage operation comprises: the file unpacking module obtains a file analysis specification matched with the system specification, copies the driving file to an internal storage area matched with the storage path, unpacks the driving file according to the file analysis specification, and obtains the unpacked file.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the peripheral driver loading method of a terminal device according to any of claims 1 to 5.
CN202110913354.5A 2021-08-10 2021-08-10 Peripheral driver loading method, system and medium of terminal equipment Active CN113791824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110913354.5A CN113791824B (en) 2021-08-10 2021-08-10 Peripheral driver loading method, system and medium of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110913354.5A CN113791824B (en) 2021-08-10 2021-08-10 Peripheral driver loading method, system and medium of terminal equipment

Publications (2)

Publication Number Publication Date
CN113791824A CN113791824A (en) 2021-12-14
CN113791824B true CN113791824B (en) 2023-09-15

Family

ID=78875875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110913354.5A Active CN113791824B (en) 2021-08-10 2021-08-10 Peripheral driver loading method, system and medium of terminal equipment

Country Status (1)

Country Link
CN (1) CN113791824B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115202763B (en) * 2022-09-19 2022-12-09 大方智造(天津)科技有限公司 Acquisition dynamic loading and calling method based on drive

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572173A (en) * 2014-12-02 2015-04-29 惠州Tcl移动通信有限公司 WIFI (Wireless Fidelity) driver loading method based on mobile terminal, WIFI driver loading system based on mobile terminal and mobile terminal
CN106775833A (en) * 2016-11-28 2017-05-31 青岛海信移动通信技术股份有限公司 device driver loading method, terminal and system
CN107678797A (en) * 2017-09-29 2018-02-09 惠州Tcl移动通信有限公司 Mobile terminal and radio-frequency driven loading control method and storage medium
CN109947482A (en) * 2017-12-21 2019-06-28 深圳Tcl新技术有限公司 A kind of loading method of USB device, storage medium and smart television

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7340593B2 (en) * 2004-04-09 2008-03-04 Dell Products L.P. Hard drive reset cache

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572173A (en) * 2014-12-02 2015-04-29 惠州Tcl移动通信有限公司 WIFI (Wireless Fidelity) driver loading method based on mobile terminal, WIFI driver loading system based on mobile terminal and mobile terminal
CN106775833A (en) * 2016-11-28 2017-05-31 青岛海信移动通信技术股份有限公司 device driver loading method, terminal and system
CN107678797A (en) * 2017-09-29 2018-02-09 惠州Tcl移动通信有限公司 Mobile terminal and radio-frequency driven loading control method and storage medium
CN109947482A (en) * 2017-12-21 2019-06-28 深圳Tcl新技术有限公司 A kind of loading method of USB device, storage medium and smart television

Also Published As

Publication number Publication date
CN113791824A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
US9015702B2 (en) Determining compatibility of an application with different versions of an operating system
US10303490B2 (en) Apparatus and method for optimizing startup of embedded system
CN109194606B (en) Attack detection system, method, computer device and storage medium
US11599654B2 (en) Method and apparatus for authority control, computer device and storage medium
CN111679852B (en) Detection method and device for conflict dependency library
CN114327655B (en) Initialization processing method and device of component and electronic equipment
JP2005293578A (en) Test case inheritance controlled via attribute
CN111914250B (en) Linux system script program running verification and management and control method
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
US7340725B1 (en) Smart test attributes and test case scenario in object oriented programming environment
CN112668008A (en) Method for realizing dynamic system call hijacking based on LSM
CN111625225A (en) Program specified data output method and device
CN113791824B (en) Peripheral driver loading method, system and medium of terminal equipment
CN106997313B (en) Signal processing method and system of application program and terminal equipment
CN111352631B (en) Interface compatibility detection method and device
US7577541B1 (en) Test services provider
CN109426546B (en) Application starting method and device, computer storage medium and equipment
CN116909645A (en) System starting method, device, equipment and storage medium
CN116302808A (en) Method, device, equipment and storage medium for capturing and processing abnormal information
CN111797016B (en) Application testing method, equipment, storage medium and device
CN116166521A (en) Application testing method and device, electronic equipment and storage medium
US7082376B1 (en) State full test method executor
CN114020350B (en) Android system-based terminal off-load equipment detection method, system and medium
US20250298725A1 (en) Information processing method, information processing apparatus and information processing device
CN116775147B (en) Executable file processing method, device, 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
GR01 Patent grant
GR01 Patent grant