CN115904400A - Drive package matching method and device, computing device and storage medium - Google Patents

Drive package matching method and device, computing device and storage medium Download PDF

Info

Publication number
CN115904400A
CN115904400A CN202211230161.0A CN202211230161A CN115904400A CN 115904400 A CN115904400 A CN 115904400A CN 202211230161 A CN202211230161 A CN 202211230161A CN 115904400 A CN115904400 A CN 115904400A
Authority
CN
China
Prior art keywords
actual
vector
information
target
feature
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
CN202211230161.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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202211230161.0A priority Critical patent/CN115904400A/en
Publication of CN115904400A publication Critical patent/CN115904400A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for matching a drive package, a computing device and a storage medium, wherein the method is executed in the computing device, the computing device is in communication connection with the storage device, the storage device comprises a plurality of device drive packages, the drive packages comprise a description file, the description file comprises a plurality of feature information of devices, a plurality of feature vector values corresponding to the plurality of feature information form a vector set corresponding to the drive package, and the method comprises the following steps: responding to a request for acquiring a target drive packet matched with target equipment, acquiring a plurality of actual information of the target equipment, and generating an actual vector value corresponding to each actual information; determining cosine similarity between a plurality of actual vector values of a plurality of actual information and a plurality of corresponding characteristic vector values in each vector set; and determining the drive packet corresponding to the vector set with the highest cosine similarity as a target drive packet matched with the target equipment. According to the technical scheme of the invention, the correct target drive package can be matched for the target equipment.

Description

Drive package matching method and device, computing device and storage medium
Technical Field
The present invention relates to the field of computer and operating system technologies, and in particular, to a driver package matching method, a driver package matching apparatus, a computing device, and a storage medium.
Background
In a Linux operating system, in order to utilize a native Windows driver, a Windows printer driver installation program is decompressed and repackaged to make a deb package file which can be correctly installed on the Linux system, and the Linux system can run the Windows driver by combining an open source wire technology to control a corresponding printer to print.
At present, there are many brands of printers sold on the market, each brand includes multiple series, each series includes multiple models, which results in thousands of models of printers passing on the market, and finding the name of the driver corresponding to the printer is a tedious and error-prone task. In addition, since a large number of printer drivers of the same brand are multiplexed at the time of design, there is a possibility that a plurality of printer models correspond to the same driver, and the installer name of the printer driver is different from the printer model.
Since the prepared deb file is no longer related to the previous drive file, and the drive manufacturer does not participate in the second adaptation, the deb package installed on the Linux system can only be identified manually. And a driver (deb packet) corresponding to the entity printer is matched from a Linux printer driver library with huge data volume in a manual mode, so that the method is very complex and is easy to make mistakes.
For this reason, a driving packet matching method is required to solve the problems in the above-described scheme.
Disclosure of Invention
To this end, the present invention provides a driver packet matching method and a driver packet matching apparatus to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a driver package matching method, executed in a computing device, wherein the computing device is communicatively connected to a storage apparatus, the storage apparatus includes driver packages of a plurality of devices, each driver package includes a description file, the description file includes a plurality of feature information of a device, each feature information corresponds to a feature vector value, and a plurality of feature vector values corresponding to the plurality of feature information form a vector set corresponding to the driver package; the method comprises the following steps: responding to a request for acquiring a target drive package matched with target equipment, acquiring a plurality of actual information of the target equipment, and generating an actual vector value corresponding to each actual information; determining cosine similarity between a plurality of actual vector values of a plurality of actual information and a plurality of corresponding feature vector values in a vector set corresponding to each drive package; and determining a drive packet corresponding to the vector set with the highest cosine similarity as a target drive packet matched with the target equipment.
Optionally, in the method for matching driver packages according to the present invention, the feature information includes brand information, and the vector set corresponding to each driver package is suitable for being sorted and stored according to the brand information.
Optionally, in the method for matching driver packages according to the present invention, determining cosine similarities between a plurality of actual vector values of a plurality of actual information and a plurality of feature vector values corresponding to a vector set corresponding to each driver package includes: determining target brand information of the target device according to the actual information, and determining one or more target vector sets corresponding to the target brand information; cosine similarity between a plurality of actual vector values of the plurality of actual information and a corresponding plurality of feature vector values in each target vector set is determined.
Optionally, in the method for matching driver packages according to the present invention, determining cosine similarities between a plurality of actual vector values of a plurality of actual information and a plurality of feature vector values corresponding to a vector set corresponding to each driver package includes: for the vector set corresponding to each drive package, calculating the cosine value between the actual vector value of each actual message and the corresponding characteristic vector value in the vector set; weighting the cosine value based on the weight value corresponding to the actual information to obtain a weighted cosine value corresponding to the actual information; and summing a plurality of weighted cosine values corresponding to a plurality of pieces of actual information to obtain cosine similarity between a plurality of actual vector values of the plurality of pieces of actual information and a plurality of corresponding characteristic vector values in the vector set.
Optionally, in the drive package matching method according to the present invention, the method further includes: generating a vector value coding table; vectorizing each piece of feature information according to the vector value coding table to generate a feature vector value corresponding to each piece of feature information; generating an actual vector value corresponding to each actual information includes: and vectorizing each piece of actual information according to the vector value coding table to generate an actual vector value corresponding to each piece of actual information.
Optionally, in the driver package matching method according to the present invention, a first operating system runs in the computing device; the driver package is generated by decompressing and repackaging the driver installer suitable for running in the second operating system and suitable for running in the first operating system.
Optionally, in the driver package matching method according to the present invention, the first operating system is a Linux operating system, and the second operating system is a Windows operating system.
Optionally, in the drive package matching method according to the present invention, the apparatus is a printing apparatus; the characteristic information comprises one or more of brand information, equipment name, driver version information, model name, product identification and manufacturer identification; each brand information corresponds to one or more models.
According to an aspect of the present invention, there is provided a matching apparatus residing in a computing device, the computing device is communicatively connected to a storage apparatus, the storage apparatus includes a driver package of a plurality of devices, each driver package includes a description file, the description file includes a plurality of feature information of a device, each feature information corresponds to a feature vector value, and a plurality of feature vector values corresponding to the plurality of feature information form a vector set corresponding to the driver package; the matching device comprises: the second generation module is suitable for responding to a request for acquiring a target drive package matched with the target equipment, acquiring a plurality of actual information of the target equipment and generating an actual vector value corresponding to each actual information; the determining module is suitable for determining cosine similarity between a plurality of actual vector values of a plurality of actual messages and a plurality of corresponding characteristic vector values in each vector set; and the matching module is suitable for determining the drive packet corresponding to the vector set with the highest cosine similarity as the target drive packet matched with the target equipment.
According to an aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the driver package matching method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the driver package matching method as described above.
According to the technical scheme of the invention, a driver package matching method is provided, which comprises the steps of obtaining description files in a plurality of device driver packages (adapted to a first operating system), uniformly vectorizing all feature information in the description files, generating feature vector values corresponding to each feature information, and obtaining a vector set corresponding to each description file. When a drive package needs to be matched for the target device, a plurality of pieces of actual information of the target device are vectorized to generate an actual vector value corresponding to each piece of actual information, and the highest cosine similarity is determined by calculating the cosine similarity between the actual vector values and a plurality of feature vector values corresponding to each vector set, so that the drive package corresponding to the vector set with the highest cosine similarity can be obtained to serve as the target drive package matched with the target device. In this way, the invention can realize matching the target device to the correct target driver package, so as to install the target driver package matched with the target device in the computing device, and ensure the stability and the correctness of the installed target driver package.
Furthermore, the cosine similarity between the actual vector values and the characteristic vector values in each vector set is calculated in a weighted summation mode, and the importance degrees of different characteristic information are fully considered, so that the highest cosine similarity is more reasonably and accurately determined, the target drive packet which is most matched with the target equipment is obtained, and the correctness of the target drive packet matched with the target equipment is further ensured.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIGS. 2 and 3 each show a flow diagram of a driver package matching method 200 according to one embodiment of the invention;
fig. 4 shows a schematic diagram of a matching device 400 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention. As shown in FIG. 1, in a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, the processing unit 102 may be implemented as a processor depending on the configuration and type of computing device. The system memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. In accordance with one aspect, an operating system 105 is included in system memory 104.
According to one aspect, the operating system 105 is, for example, suitable for controlling the operation of the computing device 100. Moreover, examples are practiced in conjunction with a graphics library, other operating systems, or any other application program and are not limited to any particular application or system. This basic configuration is illustrated in fig. 1 by those components within the dashed line. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, according to one aspect, a program module 103 is stored in the system memory 104. According to one aspect, the program modules 103 may include one or more applications, the invention not being limited to the type of application, for example, the applications may include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like. In an embodiment according to the present invention, the application program in the program module 103 may comprise a matching device 400, the matching device 400 being configured to perform the driver package matching method 200 of the present invention.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 1 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuits or systems.
According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 114 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, or program modules 103. System memory 104, removable storage 109, and non-removable storage 110 are all examples of computer storage media (i.e., memory storage). Computer storage media may include Random Access Memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that may be used to store information and that may be accessed by the computer device 100. In accordance with one aspect, any such computer storage media may be part of computing device 100. Computer storage media does not include a carrier wave or other propagated data signal.
In accordance with one aspect, communication media is embodied by computer readable instructions, data structures, program modules 103, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more feature sets or that has been altered in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio Frequency (RF), infrared, and other wireless media.
In an embodiment in accordance with the invention, the computing device 100 is configured to perform a driver package matching method 200 in accordance with the invention. The computing device 100 includes one or more processors, and one or more readable storage media storing program instructions that, when configured to be executed by the one or more processors, cause the computing device to perform the driver package matching method 200 in embodiments of the present invention.
According to one embodiment of the invention, the matching apparatus 400 of the computing device 100 is configured to perform the driver package matching method 200 according to the invention. The matching device 400 includes a plurality of program instructions for executing the driver package matching method 200 of the present invention, and these program instructions can instruct the processor to execute the driver package matching method 200 according to the present invention.
Fig. 2 and 3 respectively show a flowchart of a driver packet matching method 200 according to an embodiment of the present invention. The method 200 is suitable for execution in the matching apparatus 400 of a computing device (the aforementioned computing device 100). In an embodiment of the present invention, a first operating system is running in the computing device 100.
According to one embodiment of the invention, computing device 100 is communicatively coupled to a storage device. The storage device comprises a plurality of device driver packages, each driver package comprises a description file, the description file comprises a plurality of feature information of the device, and each feature information corresponds to one feature vector value. And a plurality of feature vector values corresponding to a plurality of feature information in the description file can form a vector set corresponding to the drive package.
It should be noted that the storage means may be implemented as an additional data storage device of the computing device, for example, the removable storage device 109 or the non-removable storage device 110. The storage may also be implemented as a database server communicatively coupled to the computing device.
It should be noted that the driver package matching method 200 of the present invention can be used for matching driver packages of various devices, including, for example, a printing device, a scanning device, and the like. It should be noted that the present invention is not limited to a particular type of device.
As shown in FIG. 2, method 200 includes steps 210-250.
Wherein, by performing steps 210 to 220, a set of vectors corresponding to the driver package of each device can be generated. It is noted that steps 210 and 220 may be performed by the computing device 100 during the driver package matching process, or may be pre-processed in a storage device before the driver package matching process is performed.
Specifically, in step 210, driver packages of a plurality of devices are obtained, and the driver packages include description files of the devices.
In one implementation, the description file may be a ppd file. It should be noted that the description file may contain a plurality of pieces of characteristic information of the device. The feature information includes, for example, one or more of brand information, driver version information, device name, model name, product identification, and vendor identification. Each of the brand information may correspond to one or more models (model names), among others.
In one embodiment, before performing step 210, driver packages for multiple devices may be generated. Specifically, by obtaining a plurality of driver installers that are adapted to a second operating system (different from the first operating system in the computing device), the plurality of driver installers are respectively decompressed and repackaged to generate a plurality of driver packages that are adapted to the first operating system in the computing device 100.
That is, the driver package for each device in the storage may be generated by decompressing and repackaging a driver installer adapted to run in the second operating system. After the driver installation program matched with the second operating system is decompressed and repacked, the generated driver package can run in the first operating system.
In one embodiment, the first operating system running in the computing device 100 is, for example, a Linux operating system and the second operating system is, for example, a Windows operating system.
Here, after the driver packages for the multiple devices are generated, the multiple driver packages may be stored in a storage (e.g., removable storage device 109 or non-removable storage device 110) of the computing device 100, forming a driver package database.
In one embodiment, the device may be implemented, for example, as a printing device. In step 210, driver packages for a plurality of printing devices may be obtained, the driver packages including description files for the printing devices.
Subsequently, in step 220, the description file in each driver package can be extracted. For the description file in each drive package, acquiring a plurality of pieces of feature information of the equipment from the description file, and vectorizing each piece of feature information to generate a feature vector value corresponding to each piece of feature information. Based on a plurality of feature vector values of a plurality of feature information, a set of vectors corresponding to the driver package, that is, a set of vectors corresponding to the description file in the driver package is generated.
Here, the set of vectors corresponding to each drive package may be stored in the storage device, forming a vector database (i.e., a total vector space) associated with the drive packages of the device, the vector database containing feature vector values corresponding to the plurality of feature information in the description file in the plurality of drive packages. In this way, the vector database can be used for driver package matching of the target device, that is, for querying information of the target driver package matched with the target device so as to match to a correct driver package.
In one embodiment, since the feature information of the device in the description file is composed of english characters, numbers or special characters, when vectorizing each feature information, vector value coding can be performed based on the english characters, numbers, special characters and keywords related to the feature information to generate a vector value coding table. Subsequently, a feature vector value corresponding to each feature information may be determined according to the vector value encoding table. Here, the keyword may be a combination of letters or numbers which have a high frequency of occurrence in all the feature information and are representative, and for example, the keyword may include a brand name "Canon", a model name "LBP", and the like, but is not limited thereto.
In one implementation, the vector value encoding table is shown in table 1 below. It should be noted that the vector value encoding table shown in table 1 is only one example of the present invention, and the present invention is not limited to the vector value encoding corresponding to each character or character string in the vector value encoding table.
TABLE 1 vector value coding Table
Character (string) Vector value coding
a 1
b 2
... ...
0 50
1 51
... ...
Canon 100
Brother 101
... ...
LBP 151
DCP 152
... ...
According to the vector value encoding table, a feature vector value corresponding to each feature information can be determined. That is, each feature information is vectorized according to the vector value encoding table to generate a feature vector value corresponding to each feature information.
Specifically, the dimension of the characteristic vector value may be first determined according to the total capacity of the vector value encoding table. For example, if the total capacity of the vector value encoding table is 200, the characteristic vector value determined from the vector value encoding table should be a 200-dimensional vector.
Secondly, for each feature information, the frequency of each character contained in the feature information appearing in the vector value encoding table can be counted, and the feature vector value of the feature information is generated according to the frequency of each character appearing. For example, the feature information is "Canon LBP a1", in which Canon occurs 1 time, LBP occurs 1 time, a occurs 1 time, 1 occurs 1 time, and a space occurs 2 times, then the feature vector value of the feature information is {1, 0.., 1, 0.,. 1, 0.., 2.,. 1.. 1}, where the frequency of each character (or character string) in the feature information is in the position of the feature vector value, corresponding to the position of the character (or character string) in the vector value encoding table.
According to the method, each piece of feature information in the description file can be vectorized according to the vector value coding table, and a feature vector value corresponding to each piece of feature information is generated. Further, a vector set corresponding to the drive packet may be generated based on a plurality of feature vector values corresponding to a plurality of feature information.
In one embodiment, after the vector set corresponding to each driver package is generated, the vector set may be sorted, for example, the vector set may be sorted according to the brand information of the driver package where the description file is located.
Here, the feature information in the description file includes brand information of a device (e.g., a printing device), so that the vector sets corresponding to the driver packages can be classified and stored directly according to the brand information, so that the vector sets corresponding to the driver packages in one or more driver packages of the same brand form one vector set group, and thus, a group of vector sets (including the vector set corresponding to one or more driver packages) corresponding to each brand can be obtained. In other words, the vector set corresponding to each driver package in the storage device can be sorted and stored according to the brand information.
When a user needs to use a target device (e.g., a target printing device) connected to the computing device 100, a target driver package matching the target device needs to be installed in the computing device 100 in order to run a corresponding driver (e.g., a print driver) based on which communication with the target device can be performed.
In an embodiment of the present invention, based on a pre-established driver package database and its associated vector database, a user may query and obtain a target driver package matching a target device.
When a user needs to use a (newly-added) target device at a computing device to communicate with the target device, a target driver package matching the target device needs to be acquired so as to install the target driver package on a first operating system of the computing device. The user may request to obtain the target driver package matching the target device, and the computing device 100 (matching apparatus) may obtain the target driver package matching the target device by performing the following steps 230 to 250 in response to the user's request to obtain the target driver package matching the target device. In one embodiment, the specific logic for performing steps 230-250 may be found in the flowchart illustrated in FIG. 3.
In step 230, in response to a request of a user to obtain a target driver package matching the target device, a plurality of pieces of actual information of the target device are obtained, and each piece of actual information is vectorized to generate an actual vector value corresponding to each piece of actual information.
Here, the actual vector value corresponding to each actual information of the target device may be determined according to the vector value encoding table generated as described above. That is, each piece of actual information is vectorized according to the vector value encoding table to generate an actual vector value corresponding to each piece of actual information.
In step 240, cosine similarities between a plurality of actual vector values of the plurality of actual information and a corresponding plurality of feature vector values in the vector set corresponding to each of the driver packages are determined.
Here, it should be noted that a plurality of pieces of actual information of the target device are taken as pieces of information to be matched, and a plurality of actual vector values corresponding to the plurality of pieces of actual information are taken as vector values to be matched. The actual vector value (vector value to be matched) of each piece of actual information is subjected to cosine similarity calculation with the feature vector value of the feature information corresponding to the actual information in the vector set. Correspondingly, the actual vector values of the actual information are the cosine similarity calculation of the feature vector values corresponding to the actual information in the vector set.
By calculating cosine values between the actual vector values of each piece of actual information contained in the target device and the corresponding feature vector values, cosine similarities between the actual vector values of the pieces of actual information and the corresponding pieces of feature vector values in the vector set can be determined.
For example, the plurality of actual information of the target device includes an actual model name, an actual product identifier, and an actual manufacturer identifier, and it is necessary to calculate a first cosine value of a feature vector value corresponding to the actual model name and the model name in the vector set, calculate a second cosine value of the feature vector value corresponding to the actual product identifier and the product identifier in the vector set, and calculate a third cosine value of the feature vector value corresponding to the actual manufacturer identifier and the manufacturer identifier in the vector set. According to the first cosine value, the second cosine value and the third cosine value, cosine similarity between actual vector values of the plurality of actual information and a plurality of corresponding characteristic vector values in the vector set can be determined.
It should be noted that, in the embodiment of the present invention, the cosine value between the actual vector value and the characteristic vector value may be calculated according to the cosine theorem. Cosine values may characterize the direction between two vectors. In other words, the cosine similarity between a plurality of actual vector values of a plurality of actual information and a plurality of corresponding feature vector values in the vector set corresponding to each drive packet may be determined according to the cosine theorem.
It will be appreciated that, according to the cosine theorem, the cosine value between two text vectors can be derived by dividing the inner product of the two vectors by a multiplier of the modulus of the two vectors. If the cosine value between two vectors is 1, that is, the directions of the two vectors are identical, the two vectors are identical in the dimensional space. If the cosine value between two vectors is 0, it means that the two vectors are completely uncorrelated in the dimensional space, i.e. there is no similarity. And if the cosine value is between 0 and 1, the similarity between the two vectors (corresponding texts) can be characterized, wherein the larger the cosine value, the higher the similarity.
For example, a represents a characteristic vector value, and B represents an actual vector value. The cosine value between the actual vector value and the characteristic vector value can be calculated by the following formula:
Figure BDA0003881316060000121
in one embodiment of the present invention, as shown in fig. 3, each actual information provided by the target device may be assigned a corresponding weight value (i.e., weight coefficient). In this way, a weighted summation may be used to determine cosine similarities between a plurality of actual vector values of a plurality of actual information and a plurality of feature vector values corresponding to the vector set corresponding to each driver packet. Specifically, the cosine similarity may be determined according to the following method:
and for the vector set corresponding to each drive package, calculating a cosine value between the actual vector value of each piece of actual information and the corresponding characteristic vector value in the vector set, and weighting the cosine value based on the weight value corresponding to the actual information to obtain a weighted cosine value corresponding to the actual information.
Furthermore, a plurality of weighted cosine values corresponding to the plurality of actual information are summed to obtain cosine similarities between a plurality of actual vector values of the plurality of actual information and a plurality of feature vector values corresponding to the vector set (i.e., the cosine similarities corresponding to the vector set).
Specifically, the cosine similarity corresponding to the vector set corresponding to each driver package may be calculated according to the following formula:
Figure BDA0003881316060000122
in the formula, weight (i) represents a weight value corresponding to actual information. cosin _ par (i) represents a cosine value between an actual vector value of actual information and a corresponding feature vector value in a vector set.
According to the method, the cosine similarity corresponding to the vector set corresponding to each drive package can be determined, and the vector set with the highest cosine similarity can be determined.
In one implementation, the weight value size ordering of the actual information may be: driver version information > device name = model name > vendor identification = product identification.
In addition, when a weight value is allocated to each piece of actual information provided by the target device, it is necessary to ensure that the sum of the weight values corresponding to all pieces of actual information is 1, where a value range of the weight value (weight) corresponding to each piece of actual information is: 0-weight-woven fabric was woven in a manner of "1".
Finally, in step 250, the driver package corresponding to the vector set with the highest cosine similarity is determined as the target driver package matched with the target device. In other words, the target description file corresponding to the vector set with the highest cosine similarity is determined, the drive package corresponding to the target description file is obtained, the drive package corresponding to the target description file is used as the target drive package matched with the target device, and the target drive package is provided for the user. In this way, a target driver package matching the target device is obtained, and then the target driver package may be installed in the computing device and installed on the first operating system of the computing device.
In one embodiment of the invention, the characteristic information in the description file of the driver package includes brand information of the device (e.g., printing device). In generating the set of vectors corresponding to each driver package, the set of vectors corresponding to each driver package may be sorted and stored based on the brand information. In this way, a plurality of vector sets corresponding to the description files of the same brand can be obtained based on the brand information.
Based on this, determining cosine similarity between a plurality of actual vector values of a plurality of actual information and a plurality of corresponding feature vector values in a vector set corresponding to each driver package may be performed according to the following method:
first, target brand information of a target device may be determined from a plurality of actual information of the target device. Subsequently, one or more sets of target vectors corresponding to the target brand information are determined. Furthermore, cosine similarities between a plurality of actual vector values of the plurality of actual information and a plurality of corresponding feature vector values in each target vector set are determined.
That is to say, after the vector sets are classified and stored based on the brand information, when a target driver package matched with the target device needs to be acquired, only the cosine similarity calculation needs to be performed on one or more target vector sets corresponding to the target brand information, and the vector set with the highest cosine similarity is selected from the one or more target vector sets. And then, determining a target description file corresponding to the vector set with the highest cosine similarity, acquiring a drive package corresponding to the target description file, and taking the drive package corresponding to the target description file as a target drive package matched with the target equipment.
Fig. 4 shows a schematic diagram of a matching device 400 according to an embodiment of the invention.
Fig. 4 shows a schematic diagram of a matching device 400 according to an embodiment of the invention. The matching apparatus 400 resides in a computing device, such as the computing device 100 described above. The matching device 400 is adapted to perform the driver package matching method 200 of the present invention.
As shown in fig. 4, the matching apparatus 400 includes a second generating module 430, a determining module 440, and a matching module 450, which are connected in sequence. In one embodiment, the matching apparatus 400 may further include an obtaining module 410 and a first generating module 420.
The obtaining module 410 is adapted to obtain driver packages of multiple devices, where the driver packages include description files. The first generation module 420 is adapted to, for the description file in each drive package, acquire a plurality of pieces of feature information of the device from the description file, generate a feature vector value corresponding to each piece of feature information, and generate a set of vectors corresponding to the drive package based on the plurality of feature vector values of the plurality of pieces of feature information.
The second generating module 430 is adapted to, in response to a request for obtaining a target driver package matched with a target device, obtain a plurality of pieces of actual information of the target device (as pieces of information to be matched), and generate an actual vector value corresponding to each piece of actual information (as a vector value to be matched). The determining module 440 is adapted to determine a cosine similarity between a plurality of actual vector values of the plurality of actual information, and a corresponding plurality of feature vector values in the set of vectors corresponding to each of the driver packages. The matching module 450 is adapted to determine the driver packet corresponding to the vector set with the highest cosine similarity as the target driver packet matched with the target device.
It should be noted that the obtaining module 410 is configured to perform the aforementioned step 210, the first generating module 420 is configured to perform the aforementioned step 220, the second generating module 430 is configured to perform the aforementioned step 230, the determining module 440 is configured to perform the aforementioned step 240, and the matching module 450 is configured to perform the aforementioned step 250. Here, for specific execution logics of the obtaining module 410, the first generating module 420, the second generating module 430, the determining module 440, and the matching module 450, reference is made to the description of steps 210 to 250 in the method 200, and details are not repeated here.
According to the driver package matching method, all feature information in the description files is uniformly vectorized by obtaining the description files in a plurality of device driver packages (which are adaptive to a first operating system), so that a feature vector value corresponding to each feature information is generated, and a vector set corresponding to each driver package is obtained. When a drive package needs to be matched for the target device, a plurality of pieces of actual information of the target device are vectorized to generate an actual vector value corresponding to each piece of actual information, and the highest cosine similarity is determined by calculating the cosine similarity between the actual vector values and a plurality of feature vector values corresponding to each vector set, so that the drive package corresponding to the vector set with the highest cosine similarity can be obtained to serve as the target drive package matched with the target device. In this way, the invention can realize matching the target device to the correct target driver package, so as to install the target driver package matched with the target device in the computing device, and ensure the stability and the correctness of the installed target driver package.
Furthermore, the cosine similarity between the actual vector values and the characteristic vector values in each vector set is calculated in a weighted summation mode, and the importance degree of different characteristic information is fully considered, so that the highest cosine similarity is more reasonably and accurately determined, the target drive package most matched with the target equipment is obtained, and the correctness of the target drive package matched with the target equipment is further ensured.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the driver package matching method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules 103, or other data. Communication media typically embodies computer readable instructions, data structures, program modules 103 or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the device in this example. The modules in the foregoing examples may be combined into one module or may additionally be divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Moreover, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed by way of illustration and not limitation with respect to the scope of the invention, which is defined by the appended claims.

Claims (10)

1. A driver package matching method is executed in a computing device, the computing device is in communication connection with a storage device, the storage device comprises driver packages of a plurality of devices, each driver package comprises a description file, the description file comprises a plurality of feature information of the devices, each feature information corresponds to one feature vector value, and a plurality of feature vector values corresponding to the plurality of feature information form a vector set corresponding to the driver package; the method comprises the following steps:
responding to a request for acquiring a target drive packet matched with target equipment, acquiring a plurality of actual information of the target equipment, and generating an actual vector value corresponding to each actual information;
determining cosine similarity between a plurality of actual vector values of a plurality of actual information and a plurality of corresponding feature vector values in a vector set corresponding to each drive package;
and determining a drive packet corresponding to the vector set with the highest cosine similarity as a target drive packet matched with the target equipment.
2. The method of claim 1, wherein the feature information includes brand information, and the corresponding set of vectors for each driver package is suitable for sorted storage according to brand information.
3. The method of claim 2, wherein determining a cosine similarity between a plurality of actual vector values of a plurality of actual information, a corresponding plurality of feature vector values in a vector set corresponding to each drive package comprises:
determining target brand information of the target device according to the actual information, and determining one or more target vector sets corresponding to the target brand information;
cosine similarities between a plurality of actual vector values of the plurality of actual information and a corresponding plurality of feature vector values in each target vector set are determined.
4. The method of any of claims 1-3, wherein determining a cosine similarity between a plurality of actual vector values of a plurality of actual information, a corresponding plurality of feature vector values in a set of vectors corresponding to each drive package, comprises:
for the vector set corresponding to each drive package, calculating an actual vector value of each actual message and a cosine value between the corresponding characteristic vector values in the vector set;
weighting the cosine value based on the weight value corresponding to the actual information to obtain a weighted cosine value corresponding to the actual information;
and summing a plurality of weighted cosine values corresponding to a plurality of actual information to obtain cosine similarity between a plurality of actual vector values of the plurality of actual information and a plurality of corresponding characteristic vector values in the vector set.
5. The method of any one of claims 1-4, wherein the method further comprises:
generating a vector value coding table;
vectorizing each piece of feature information according to the vector value coding table to generate a feature vector value corresponding to each piece of feature information;
generating an actual vector value corresponding to each actual information includes:
and vectorizing each piece of actual information according to the vector value coding table to generate an actual vector value corresponding to each piece of actual information.
6. The method of any of claims 1-5, wherein a first operating system is running in the computing device;
the driver package is generated by decompressing and repackaging the driver installer suitable for running in the second operating system and suitable for running in the first operating system.
7. The method of any of claims 1-6, wherein the device is a printing device;
the characteristic information comprises one or more of brand information, equipment names, driver version information, model names, product identifiers and manufacturer identifiers;
each brand information corresponds to one or more models.
8. A matching device resides in a computing device, the computing device is connected with a storage device in a communication mode, the storage device comprises a driver package of a plurality of devices, each driver package comprises a description file, the description file comprises a plurality of feature information of the devices, each feature information corresponds to one feature vector value, and a plurality of feature vector values corresponding to the plurality of feature information form a vector set corresponding to the driver package; the matching device comprises:
the second generation module is suitable for responding to a request for acquiring a target drive package matched with the target equipment, acquiring a plurality of actual information of the target equipment and generating an actual vector value corresponding to each actual information;
the determining module is suitable for determining cosine similarity among a plurality of actual vector values of a plurality of actual messages and a plurality of corresponding characteristic vector values in a vector set corresponding to each drive package;
and the matching module is suitable for determining the drive packet corresponding to the vector set with the highest cosine similarity as the target drive packet matched with the target equipment.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-7.
CN202211230161.0A 2022-10-08 2022-10-08 Drive package matching method and device, computing device and storage medium Pending CN115904400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211230161.0A CN115904400A (en) 2022-10-08 2022-10-08 Drive package matching method and device, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211230161.0A CN115904400A (en) 2022-10-08 2022-10-08 Drive package matching method and device, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN115904400A true CN115904400A (en) 2023-04-04

Family

ID=86494620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211230161.0A Pending CN115904400A (en) 2022-10-08 2022-10-08 Drive package matching method and device, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN115904400A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117047785A (en) * 2023-10-11 2023-11-14 大扬智能科技(北京)有限公司 Robot control method, robot control device, and robot system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117047785A (en) * 2023-10-11 2023-11-14 大扬智能科技(北京)有限公司 Robot control method, robot control device, and robot system
CN117047785B (en) * 2023-10-11 2023-12-19 大扬智能科技(北京)有限公司 Robot control method, robot control device, and robot system

Similar Documents

Publication Publication Date Title
CN109522435B (en) Image retrieval method and device
US10678973B2 (en) Machine-learning design enablement platform
WO2021051517A1 (en) Information retrieval method based on convolutional neural network, and device related thereto
WO2021151270A1 (en) Method and apparatus for extracting structured data from image, and device and storage medium
CN111522989A (en) Method, computing device, and computer storage medium for image retrieval
EP4040311A1 (en) Utilizing machine learning and natural language processing to extract and verify vaccination data
CN111258799A (en) Error reporting information processing method, electronic device and computer readable storage medium
CN110866402A (en) Named entity identification method and device, storage medium and electronic equipment
CN115904400A (en) Drive package matching method and device, computing device and storage medium
CN113868351A (en) Address clustering method and device, electronic equipment and storage medium
US8341571B1 (en) Pattern signature
CN111078639A (en) Data standardization method and device and electronic equipment
US8718382B2 (en) Scalable pattern matching between a pattern clip and a pattern library
CN104699660A (en) Sketch of structured matrices with problems of nonlinear regression
CN114692889A (en) Meta-feature training model for machine learning algorithm
US10726349B2 (en) Calculating posterior probability of classes
CN112163409A (en) Similar document detection method, system, terminal device and computer readable storage medium
CN112380348B (en) Metadata processing method, apparatus, electronic device and computer readable storage medium
CN115309554A (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN110781354B (en) Object selection method, device and system and computing equipment
CN113807975A (en) Method and device for checking information, computer equipment and storage medium
CN113610373A (en) Information decision processing method and system based on intelligent manufacturing
US20210191908A1 (en) Schema Validation with Data Synthesis
CN111507387A (en) Paired vector projection data classification method and system based on semi-supervised learning
CN117235061A (en) Product business component determining method and device

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