Operating system driving method and device, electronic equipment and storage medium
By finding and adjusting the basic drivers in the operating system to generate differential shielded drivers, the problems of waste of resources and slow operation speed after driver upgrades in traditional technologies are solved, and efficient hardware drivers and operating system resource management are achieved.
Patent Information
- Application Number
- CN202411513011.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In traditional technology, the configuration tables in the operating system kernel need to be upgraded and replaced to support new hardware, resulting in wasted resources and slow operation speed after the driver is upgraded, and the driver's differential shielding efficiency is low.
By detecting the new hardware, find out whether there are basic drivers of the same hardware type in the operating system, obtain hardware performance parameters, determine whether the performance meets the standards, and adjust the differential masking parameters to generate differential masking drivers to drive the new hardware.
It effectively reduces driving time, reduces hardware driving frequency, saves operating system resources, and improves driving efficiency.
Smart Images

Figure CN119473410A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of operating system driving technology, and in particular to an operating system driving method, device, electronic equipment and storage medium. Background Art
[0002] As user demands increase, the hardware in the operating system also needs to be frequently upgraded and replaced to meet the various increasing demands of users. In traditional technologies, driver difference shielding is achieved through a configuration table in the operating system kernel. When the configuration table in the operating system kernel has parameters of the upgraded hardware, the parameters of the upgraded hardware are passed to the driver program to drive the upgraded hardware. When the configuration table in the operating system kernel does not have parameters of the upgraded hardware, the parameters of the upgraded hardware must be obtained and written into the configuration table in the operating system kernel. However, each time the driver is upgraded and replaced, the hardware needs to call the operating system kernel resources to achieve driver difference shielding, thereby wasting operating system resources, slowing down the operating speed of the operating system, and making the driver efficiency of the driver difference shielding low. Summary of the invention
[0003] The present invention provides an operating system driving method, device, electronic device and storage medium to solve the problem of low driving efficiency of driver difference shielding after driver upgrade and replacement.
[0004] According to one aspect of the present invention, there is provided an operating system driving method, the operating system driving method comprising:
[0005] When it is detected that newly added hardware is connected to the operating system, searching the operating system for a basic driver of hardware of the same hardware type as the newly added hardware, and when it is determined that a basic driver of hardware of the same hardware type as the newly added hardware exists, setting the basic driver as the driver of the newly added hardware;
[0006] Acquire new hardware performance parameters of the new hardware driven by the basic driver, and determine whether the new hardware performance of the new hardware driven by the basic driver meets the requirements according to the new hardware performance parameters;
[0007] After determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, obtaining a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determining a difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter;
[0008] The basic driver is adjusted according to the difference shielding parameter to obtain the difference shielding driver of the newly added hardware, so as to use the difference shielding driver to drive the newly added hardware.
[0009] Optionally, the operating system driving method further includes:
[0010] When it is determined that there is no basic driver for hardware of the same hardware type as the newly added hardware, a theoretical driver for the newly added hardware is loaded, so as to use the theoretical driver to drive the newly added hardware.
[0011] Optionally, before determining whether the newly added hardware performance driven by the basic driver meets the standard according to the newly added hardware performance parameter, the method further includes:
[0012] Obtaining theoretical hardware performance required for normal operation of the newly added hardware;
[0013] Determining whether the newly added hardware performance driven by the basic driver meets the standard according to the newly added hardware performance parameter includes:
[0014] Whether the performance of the newly added hardware driven by the basic driver meets the standard is determined according to the following formula:
[0015]
[0016] Among them, F b The new hardware performance parameters for using the basic driver to drive the new hardware; r The new hardware performance parameters of the new hardware are driven by the theoretical driver; n is the theoretical hardware performance parameter; T is the evaluation time to reach the target, 0 <t≤T。
[0017] Optionally, the operating system driving method further includes:
[0018] After determining that the performance of the newly added hardware driven by the basic driver meets the standard, the basic driver is used to drive the newly added hardware.
[0019] Optionally, the operating system driving method further includes:
[0020] When it is determined that there is no basic driver for hardware of the same hardware type as the newly added hardware, a driver existing in the operating system but of a hardware type different from that of the newly added hardware is used to drive the newly added hardware.
[0021] Optionally, after the basic driver is used to drive the newly added hardware, the method further includes:
[0022] The stability of the newly added hardware driven by the basic driver is determined according to the following formula:
[0023] D=∫0 ∞ [tan(α×G)×sinh(β×R)×s]ds
[0024] Among them, D is the driving threshold of the stability of the newly added hardware; G is the rated load of the newly added hardware; R is the standard heat dissipation of the newly added hardware; α is the rated load weight of the newly added hardware; β is the standard heat dissipation weight of the newly added hardware; s is the stability detection time of the newly added hardware.
[0025] Optionally, the operating system driving method further includes:
[0026] When the driver version of the theoretical driver is higher than the driver version of the hardware of the same hardware type as the newly added hardware existing in the operating system, the theoretical driver will overwrite the basic driver of the hardware of the same hardware type as the newly added hardware existing in the operating system.
[0027] According to another aspect of the present invention, there is provided an operating system driving device, the operating system driving device comprising:
[0028] A basic driver determination module is used to perform, when it is detected that newly added hardware is connected to the operating system, to search in the operating system whether there is a basic driver of hardware of the same hardware type as the newly added hardware, and when it is determined that there is a basic driver of hardware of the same hardware type as the newly added hardware, to set the basic driver as the driver of the newly added hardware;
[0029] a performance compliance judgment module, used to obtain the performance parameters of the newly added hardware driven by the basic driver, and determine whether the performance of the newly added hardware driven by the basic driver meets the standards according to the newly added hardware performance parameters;
[0030] a difference shielding parameter determination module, configured to obtain, after determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determine the difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter;
[0031] The difference shielding driver determination module is used to adjust the basic driver according to the difference shielding parameters to obtain the difference shielding driver of the newly added hardware, so as to use the difference shielding driver to drive the newly added hardware.
[0032] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0033] at least one processor; and,
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the operating system driving method described in any embodiment of the present invention.
[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the operating system driving method described in any embodiment of the present invention when executed.
[0037] The technical solution of the embodiment of the present invention is that when it is detected that the newly added hardware is connected to the operating system, it is searched whether there is a basic driver of the same hardware type as the newly added hardware in the operating system, and when it is determined that there is a basic driver of the same hardware type as the newly added hardware, the basic driver is set as the driver of the newly added hardware; the new hardware performance parameters of the new hardware driven by the basic driver are obtained, and it is determined whether the new hardware performance of the new hardware driven by the basic driver meets the standard according to the new hardware performance parameters; after it is determined that the new hardware performance of the new hardware driven by the basic driver does not meet the standard, the first hardware parameter of the new hardware and the second hardware parameter of the same hardware type as the new hardware are obtained, and the difference shielding parameter of the new hardware is determined according to the first hardware parameter and the second hardware parameter; the basic driver is adjusted according to the difference shielding parameter to obtain the difference shielding driver of the new hardware, so as to use the difference shielding driver to drive the new hardware. The present invention solves the problem of low driving efficiency of driving difference shielding after the current driver upgrade and replacement, effectively reduces the driving time, provides convenience for driving the new hardware, reduces the frequency of driving the new hardware, saves operating system resources, and improves driving efficiency.
[0038] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 is a flowchart of an operating system driving method provided according to Embodiment 1 of the present invention;
[0041] Figure 2 is a flowchart of an operating system driving method provided according to Embodiment 2 of the present invention;
[0042] Figure 3 is a schematic diagram of the structure of an operating system driving device provided according to Embodiment 3 of the present invention;
[0043] Figure 4 It is a structural schematic diagram of an electronic device that implements the operating system driving method of an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] Embodiment 1
[0047] Figure 1A flowchart of an operating system driving method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a corresponding driver is efficiently generated when an operating system detects a newly connected hardware. The operating system driving method can be executed by an operating system driving device, which can be implemented in the form of hardware and / or software. The operating system driving device can be configured in various electronic devices with an operating system. Figure 1 As shown, the operating system driving method includes:
[0048] S110. When it is detected that new hardware is connected to the operating system, the operating system is searched for a basic driver of the same hardware type as the new hardware, and when it is determined that a basic driver of the same hardware type as the new hardware exists, the basic driver is set as the driver of the new hardware.
[0049] The operating system refers to a built-in program that cooperates with various hardware of the computer to interact with the user. Optionally, the operating system can be a desktop operating system, a mobile phone operating system, a server operating system, an embedded operating system, etc., depending on the operating environment, and this embodiment does not impose any restrictions on this.
[0050] The newly added hardware can be hardware newly connected to the operating system, or it can be an upgrade of the original hardware in the operating system, and this embodiment does not impose any restrictions on this. It is known that the detection of whether there is newly added hardware connected to the operating system can be implemented by the existing detection method, and this embodiment does not impose any restrictions on this. After the newly added hardware is connected to the operating system, the operating system can get a corresponding prompt for subsequent driver loading operations.
[0051] In one embodiment, taking the newly added hardware as the hardware newly connected to the operating system as an example, when there is hardware of the same hardware type as the newly added hardware in the operating system, the basic driver of the hardware of the same hardware type as the newly added hardware can be directly used to drive the new hardware, that is, the basic driver of the hardware of the same hardware type as the newly added hardware is set as the driver of the new hardware.
[0052] In order to further implement driver difference shielding, when it is determined that there is no basic driver of the same hardware type as the newly added hardware, an attempt can be made to use a driver of a different hardware type from the newly added hardware existing in the operating system to drive the newly added hardware.
[0053] It can be known that when it is determined that there is no basic driver of the same hardware type as the newly added hardware, the theoretical driver of the newly added hardware is loaded to drive the newly added hardware with the theoretical driver. The theoretical driver is the driver corresponding to the newly added hardware itself, and the theoretical driver can also be loaded at this time for direct use by the newly added hardware.
[0054] In one embodiment, taking the example of upgrading and updating the existing hardware in the operating system with newly added hardware, at this time, the newly added hardware can also continue to be driven by the original hardware driver, thereby effectively reducing the time required to drive the new hardware, providing great convenience for driving the newly added hardware, especially when the operating system cannot connect to the network or the network is unstable, and it is difficult or impossible to download the theoretical driver of the newly added hardware online, which provides great convenience for the installation of the new hardware. At the same time, the differences in drivers between hardware of the same hardware type but different models are shielded, thereby realizing driver difference shielding.
[0055] On the basis of the above, taking the example of upgrading the original hardware in the operating system with the newly added hardware, the corresponding driver of the newly added hardware in the operating system can also be upgraded and updated synchronously, that is, when the driver version of the theoretical driver is higher than the driver version of the hardware of the same hardware type as the newly added hardware existing in the operating system, the theoretical driver will overwrite the basic driver of the hardware of the same hardware type as the newly added hardware existing in the operating system.
[0056] It can be known that the driver version can be represented by a version number, which is an identification number of the version. Each operating system has a version number, and each hardware also has its own version number. The version number enables users to understand whether the newly added hardware is the latest version and the functions and facilities it provides. Each version number can be divided into two parts: a major version number and a minor version number. In this embodiment, the driver version can be displayed in any form of an existing version number, and this embodiment does not impose any restrictions on this.
[0057] S120: Acquire new hardware performance parameters of the new hardware driven by the basic driver, and determine whether the new hardware performance of the new hardware driven by the basic driver meets the requirements according to the new hardware performance parameters.
[0058] Among them, the newly added hardware performance parameters are key performance parameters of the newly added hardware, which are related to the newly added hardware. This embodiment cannot impose any restrictions on this. The newly added hardware performance parameters can be obtained by referring to the corresponding hardware parameter configuration table.
[0059] In order to ensure that the performance of the newly added hardware driven by the basic driver meets the standard, the following formula is used to determine whether the performance of the newly added hardware driven by the basic driver meets the standard, specifically:
[0060]
[0061] Among them, F b New hardware performance parameters for using basic drivers to drive new hardware; F r To use theory to drive the new hardware performance parameters of the new hardware; F n is the theoretical hardware performance parameter; T is the evaluation time to reach the target, 0 <t≤T。
[0062] The theoretical hardware performance parameters are the performance parameters for the normal operation of the newly added hardware, and the evaluation time is the time for judging whether the performance of the newly added hardware driven by the basic driver meets the standards. The theoretical hardware performance parameters and the evaluation time can be obtained using existing technologies, and this embodiment does not impose any restrictions on this.
[0063] Specifically, if the above formula is satisfied, it is determined that the performance of the newly added hardware driven by the basic driver meets the standard; if the above formula is not satisfied, it is determined that the performance of the newly added hardware driven by the basic driver does not meet the standard.
[0064] On the basis of the above, in order to provide guarantee for the stable and smooth operation of the newly added hardware connected to the operating system, the stability of the newly added hardware is determined by using the basic driver to drive the newly added hardware according to the following formula, specifically:
[0065] D=∫0 ∞ [tan(α×G)×sinh(β×R)×s]ds
[0066] Among them, D is the driving threshold of the stability of the new hardware; G is the rated load of the new hardware; R is the standard heat dissipation of the new hardware; α is the rated load weight of the new hardware; β is the standard heat dissipation weight of the new hardware; s is the stability detection time of the new hardware.
[0067] S130: After determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, obtain a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determine a difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter.
[0068] Specifically, after determining that the performance of the newly added hardware driven by the basic driver meets the standard, the basic driver can continue to be used to drive the newly added hardware.
[0069] Among them, the first hardware parameters of the newly added hardware may include technical parameters and basic performance parameters that affect hardware performance, and the specific parameters included in the specific first hardware parameters are not particularly limited in this embodiment. Similarly, the second hardware parameters of hardware of the same hardware type as the newly added hardware may include technical parameters and basic performance parameters that affect hardware performance, and the specific parameters included in the specific second hardware parameters are not particularly limited in this embodiment.
[0070] In this embodiment, after determining that the performance of the newly added hardware driven by the basic driver does not meet the standards, the difference shielding parameters are adjusted according to the first hardware parameters of the newly added hardware and the second hardware parameters of the hardware of the same hardware type as the newly added hardware. The difference shielding parameters are the parameter differences between the newly added hardware and the hardware of the same hardware type as the newly added hardware.
[0071] S140 , adjusting the basic driver according to the difference shielding parameter to obtain the difference shielding driver for the newly added hardware, so as to drive the newly added hardware with the difference shielding driver.
[0072] On the basis of the above, after determining that the performance of the new hardware driven by the basic driver does not meet the standards, the basic driver is adjusted through the difference shielding parameters to obtain the difference shielding driver for the new hardware, and then the difference shielding driver is used to drive the new hardware, thereby reducing the driver update frequency of adjusting the new hardware, saving operating system resources, and while speeding up the operating system, also improving the driver efficiency of the new hardware.
[0073] That is, when there is a difference between the first hardware parameter of the newly added hardware and the second hardware parameter of the hardware of the same hardware type as the newly added hardware, a difference shielding parameter is obtained based on the difference between the two, and the difference shielding parameter is used to adjust the basic driver, and the part of the driver corresponding to the same parameters in the difference shielding parameter in the basic driver is adjusted, so that after the part of the basic driver corresponding to the same parameters in the difference shielding parameter is adjusted, a difference shielding driver can be obtained, and then the difference shielding driver is used to drive the new hardware.
[0074] The technical solution of the embodiment of the present invention, when it is detected that the newly added hardware is connected to the operating system, it searches whether there is a basic driver of the same hardware type as the newly added hardware in the operating system, and when it is determined that there is a basic driver of the same hardware type as the newly added hardware, the basic driver is set as the driver of the newly added hardware; the new hardware performance parameters of the new hardware driven by the basic driver are obtained, and it is determined whether the new hardware performance of the new hardware driven by the basic driver meets the standard according to the new hardware performance parameters; after it is determined that the new hardware performance of the new hardware driven by the basic driver does not meet the standard, the first hardware parameter of the new hardware and the second hardware parameter of the same hardware type as the new hardware are obtained, and the difference shielding parameters of the new hardware are determined according to the first hardware parameter and the second hardware parameter; the basic driver is adjusted according to the difference shielding parameters to obtain the difference shielding driver of the new hardware, so as to drive the new hardware with the difference shielding driver. The present invention solves the problem of low driving efficiency of driving difference shielding after the current driver upgrade and replacement, and effectively reduces the driving time, provides convenience for driving the new hardware, reduces the frequency of driving the new hardware, saves operating system resources, and improves the driving efficiency.
[0075] Embodiment 2
[0076] Figure 2 This is a flowchart of an operating system driving method provided in Embodiment 2 of the present invention. This embodiment provides an optional implementation method based on the above embodiment. Figure 2 As shown, the operating system driving method includes:
[0077] S210: Detect that new hardware is connected to the operating system.
[0078] S211, search whether there is a basic driver of hardware of the same hardware type as the newly added hardware in the operating system, if so, execute step S212, if not, execute step S213.
[0079] In one embodiment, taking the example of upgrading and updating the original hardware in the operating system with the newly added hardware, the original hardware is a wired mouse, and the newly added hardware is a wireless mouse. Then, when the wired mouse is updated to be a wireless mouse and connected to the operating system, a search is performed to determine whether there is a corresponding driver for the wired mouse in the operating system. If there is a corresponding driver for the wired mouse in the operating system, the corresponding driver for the wired mouse is set as the basic driver for the wireless mouse, and the corresponding driver for the wired mouse is used to drive the updated and upgraded wireless mouse.
[0080] S212. Setting the basic driver as the driver of the newly added hardware.
[0081] S213, loading the theoretical driver of the newly added hardware, so as to drive the newly added hardware using the theoretical driver.
[0082] S214: Acquire performance parameters of new hardware that uses a basic driver to drive the new hardware.
[0083] S215. Determine whether the performance of the newly added hardware driven by the basic driver meets the requirements according to the performance parameters of the newly added hardware. If so, execute step S216; if not, execute step S217.
[0084] Specifically, before determining whether the new hardware performance driven by the basic driver meets the standard according to the new hardware performance parameters, the theoretical hardware performance required for the normal operation of the new hardware is obtained; further, judging whether the new hardware performance driven by the basic driver meets the standard according to the following formula, specifically:
[0085]
[0086] Among them, F b New hardware performance parameters for using basic drivers to drive new hardware; F r To use theory to drive the new hardware performance parameters of the new hardware; F nis the theoretical hardware performance parameter; T is the evaluation compliance duration, where 0 < t ≤ T; sec(·) represents the secant function.
[0087] S216. Use the basic driver to drive the newly added hardware.
[0088] To ensure the stable and smooth operation of the newly added hardware connected to the operating system, detect the stability of the newly added hardware driven by the basic driver, and determine whether to load the corresponding driver of the newly added hardware according to the stability of the newly added hardware driven by the basic driver.
[0089] It can be understood that if using the basic driver to drive the newly added hardware can continuously work properly within a certain period of time, it means that the stability of using the basic driver to drive the newly added hardware is good, and there is no need to load the corresponding driver of the newly added hardware. Just use the basic driver to drive the newly added hardware; otherwise, it means that the stability of using the basic driver to drive the newly added hardware is poor, and the corresponding driver of the newly added hardware needs to be loaded, that is, load the theoretical driver of the newly added hardware to use the theoretical driver to drive the newly added hardware.
[0090] Specifically, after using the basic driver to drive the newly added hardware, judge the stability of the newly added hardware using the basic driver according to the following formula, specifically:
[0091] D = ∫0 ∞ [tan(α × G) × sinh(β × R) × s]ds
[0092] where D is the driving threshold of the stability of the newly added hardware; G is the rated load of the newly added hardware; R is the standard heat dissipation of the newly added hardware; α is the rated load weight of the newly added hardware; β is the standard heat dissipation weight of the newly added hardware; s is the stability detection time of the newly added hardware, s ∈ (0, ∞); tan(·) represents the tangent function, and sinh(·) represents the hyperbolic sine function.
[0093] It can be known that when the driving threshold of the stability of the newly added hardware does not exceed the limit value, it means that the stability of using the basic driver to drive the newly added hardware is good at this time, and the basic driver can continue to be used to drive the newly added hardware; when the driving threshold of the stability of the newly added hardware exceeds the limit value, the stability of using the basic driver to drive the newly added hardware is poor at this time, and the theoretical driver of the newly added hardware needs to be loaded to use the theoretical driver to drive the newly added hardware. Among them, the limit value is selected and set according to the attributes of the newly added hardware, and this embodiment does not make special restrictions on this.
[0094] S217. Obtain the first hardware parameter of the newly added hardware and the second hardware parameter of the hardware with the same hardware type as the newly added hardware, and determine the difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter.
[0095] In order to ensure that the performance of the new hardware driven meets the standard, when the difference between the first hardware parameter of the newly added hardware and the related parameter of the second hardware parameter of the hardware of the same hardware type as the newly added hardware exceeds a certain range, the theoretical driver of the newly added hardware is loaded to drive the newly added hardware with the theoretical driver. That is, illustratively, when the difference between the same parameter value in the corresponding first hardware parameter and the second hardware parameter of the hardware of the same hardware type as the newly added hardware is greater than 50%, the theoretical driver of the newly added hardware is loaded to drive the newly added hardware with the theoretical driver.
[0096] S218. Adjust the basic driver according to the difference shielding parameter to obtain the difference shielding driver for the newly added hardware, so as to drive the newly added hardware with the difference shielding driver.
[0097] The technical solution of the embodiment of the present invention is that when it is detected that new hardware is connected to the operating system, the basic driver of the hardware of the same hardware type as the new hardware is first used to drive the new hardware. When the performance of the new hardware driven by the basic driver of the hardware of the same hardware type as the new hardware does not meet the standard, a difference shielding driver is adjusted according to the difference shielding parameters between the hardware of the same hardware type as the new hardware and the new hardware, and finally the difference shielding driver is used to drive the new hardware. Therefore, when there is hardware of the same type as the new hardware in the operating system, the corresponding driver of the same type as the new hardware is directly used to drive the new hardware connected to the operating system, or when the hardware is connected to the operating system after an upgrade, the new hardware can be driven without downloading the corresponding driver of the new hardware, which can effectively reduce the time required to drive the new hardware. It provides great convenience for driving new hardware, especially when the operating system cannot connect to the network or the network is unstable, making it difficult or impossible to download the corresponding driver of the new hardware online. It provides great convenience for the installation of new hardware, and at the same time, shields the differences in drivers between hardware of the same type but different models, thereby realizing driver difference shielding; and only when the performance of the new hardware driven by the basic driver of the same hardware type as the new hardware does not meet the standards, the difference shielding driver is used to drive the new hardware, thereby reducing the frequency of using the difference shielding driver to drive the new hardware, and there is no need to call the operating system kernel resources for driver difference shielding every time the hardware is upgraded or updated, thereby saving the operating system kernel resources, while speeding up the operating system, also improving the driving efficiency of the driver difference shielding.
[0098] Embodiment 3
[0099] Figure 3 This is a schematic diagram of the structure of an operating system driver provided by Embodiment 3 of the present invention. Figure 3 As shown, the operating system driving device includes:
[0100] The basic driver determination module 310 is used to perform, when it is detected that new hardware is connected to the operating system, to search whether there is a basic driver of hardware of the same hardware type as the new hardware in the operating system, and when it is determined that there is a basic driver of hardware of the same hardware type as the new hardware, to set the basic driver as the driver of the new hardware;
[0101] The performance compliance judgment module 320 is used to obtain the performance parameters of the newly added hardware driven by the basic driver, and determine whether the performance of the newly added hardware driven by the basic driver meets the standard according to the newly added hardware performance parameters;
[0102] The difference shielding parameter determination module 330 is used to execute, after determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, obtaining a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determining the difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter;
[0103] The difference shielding driver determination module 340 is used to adjust the basic driver according to the difference shielding parameters to obtain the difference shielding driver of the newly added hardware, so as to use the difference shielding driver to drive the newly added hardware.
[0104] Optionally, the operating system driving device further includes:
[0105] The theoretical driver loading module is used to load the theoretical driver of the newly added hardware when it is determined that there is no basic driver of the same hardware type as the newly added hardware, so as to use the theoretical driver to drive the newly added hardware.
[0106] Optionally, the operating system driving device further includes:
[0107] A hardware performance determination module is used to obtain the theoretical hardware performance required for the normal operation of the newly added hardware;
[0108] Determining whether the newly added hardware performance driven by the basic driver meets the standard according to the newly added hardware performance parameter is specifically used for:
[0109] Whether the performance of the newly added hardware driven by the basic driver meets the standard is determined according to the following formula:
[0110]
[0111] Among them, F b The new hardware performance parameters for using the basic driver to drive the new hardware; rThe new hardware performance parameters of the new hardware are driven by the theoretical driver; n is the theoretical hardware performance parameter; T is the evaluation time to reach the target, 0 <t≤T。
[0112] Optionally, the operating system driving device further includes:
[0113] The driving new hardware module is used to drive the new hardware using the basic driver after determining that the new hardware performance of the new hardware driven by the basic driver meets the standard.
[0114] Optionally, the operating system driving device further includes:
[0115] The driving module for newly added hardware is used to drive the newly added hardware by using a driver of a different hardware type from the newly added hardware existing in the operating system when it is determined that there is no basic driver for hardware of the same hardware type as the newly added hardware.
[0116] Optionally, the operating system driving device further includes:
[0117] The stability judgment module is used to judge the stability of the newly added hardware using the basic driver to drive the newly added hardware according to the following formula, specifically:
[0118] D=∫0 ∞ [tan(α×G)×sinh(β×R)×s]ds
[0119] Among them, D is the driving threshold of the stability of the newly added hardware; G is the rated load of the newly added hardware; R is the standard heat dissipation of the newly added hardware; α is the rated load weight of the newly added hardware; β is the standard heat dissipation weight of the newly added hardware; s is the stability detection time of the newly added hardware.
[0120] Optionally, the operating system driving device further includes:
[0121] The driver version judgment module is used to execute, when the driver version of the theoretical driver is higher than the driver version of the hardware of the same hardware type as the newly added hardware existing in the operating system, to overwrite the basic driver of the hardware of the same hardware type as the newly added hardware existing in the operating system with the theoretical driver.
[0122] The operating system driving device provided in the embodiment of the present invention can execute the operating system driving method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the operating system driving method.
[0123] Embodiment 4
[0124] Figure 4A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0125] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411, such as a read-only memory (ROM 412), a random access memory (RAM 413), etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM 412) or the computer program loaded from the storage unit 418 to the random access memory (RAM 413). In RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, ROM 412 and RAM 413 are connected to each other via a bus 414. An I / O (input / output) interface 415 is also connected to the bus 414.
[0126] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0127] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as an operating system driven method.
[0128] In some embodiments, the operating system driving method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the operating system driving method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to execute the operating system driving method in any other appropriate manner (e.g., by means of firmware).
[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0131] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0134] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An operating system driving method, characterized in that: include: When it is detected that newly added hardware is connected to the operating system, searching the operating system for a basic driver of hardware of the same hardware type as the newly added hardware, and when it is determined that a basic driver of hardware of the same hardware type as the newly added hardware exists, setting the basic driver as the driver of the newly added hardware; Acquire new hardware performance parameters of the new hardware driven by the basic driver, and determine whether the new hardware performance of the new hardware driven by the basic driver meets the requirements according to the new hardware performance parameters; After determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, obtaining a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determining a difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter; The basic driver is adjusted according to the difference shielding parameter to obtain the difference shielding driver of the newly added hardware, so as to use the difference shielding driver to drive the newly added hardware.
2. The operating system driving method according to claim 1, characterized in that: The operating system driving method further includes: When it is determined that there is no basic driver for hardware of the same hardware type as the newly added hardware, a theoretical driver for the newly added hardware is loaded, so as to use the theoretical driver to drive the newly added hardware.
3. The operating system driving method according to claim 2, characterized in that: Before determining whether the newly added hardware performance driven by the basic driver meets the standard according to the newly added hardware performance parameter, the method further includes: Obtaining theoretical hardware performance required for normal operation of the newly added hardware; Determining whether the newly added hardware performance driven by the basic driver meets the standard according to the newly added hardware performance parameter includes: Whether the performance of the newly added hardware driven by the basic driver meets the standard is determined according to the following formula: Among them, F b The new hardware performance parameters for using the basic driver to drive the new hardware; r The new hardware performance parameters of the new hardware are driven by the theoretical driver; n is the theoretical hardware performance parameter; T is the evaluation time to reach the target, 0 <t≤T。 4. The operating system driving method according to claim 1, characterized in that: The operating system driving method further includes: After determining that the performance of the newly added hardware driven by the basic driver meets the standard, the basic driver is used to drive the newly added hardware.
5. The operating system driving method according to claim 2, characterized in that: The operating system driving method further includes: When it is determined that there is no basic driver for hardware of the same hardware type as the newly added hardware, a driver existing in the operating system but of a hardware type different from that of the newly added hardware is used to drive the newly added hardware.
6. The operating system driving method according to claim 1, characterized in that: After the basic driver is used to drive the newly added hardware, the method further includes: The stability of the newly added hardware driven by the basic driver is determined according to the following formula: Among them, D is the driving threshold of the stability of the newly added hardware; G is the rated load of the newly added hardware; R is the standard heat dissipation of the newly added hardware; α is the rated load weight of the newly added hardware; β is the standard heat dissipation weight of the newly added hardware; s is the stability detection time of the newly added hardware.
7. The operating system driving method according to claim 2, characterized in that: The operating system driving method further includes: When the driver version of the theoretical driver is higher than the driver version of the hardware of the same hardware type as the newly added hardware existing in the operating system, the theoretical driver will overwrite the basic driver of the hardware of the same hardware type as the newly added hardware existing in the operating system.
8. An operating system driver, characterized in that: include: A basic driver determination module is used to perform, when it is detected that newly added hardware is connected to the operating system, to search in the operating system whether there is a basic driver of hardware of the same hardware type as the newly added hardware, and when it is determined that there is a basic driver of hardware of the same hardware type as the newly added hardware, to set the basic driver as the driver of the newly added hardware; a performance compliance judgment module, used to obtain the performance parameters of the newly added hardware driven by the basic driver, and determine whether the performance of the newly added hardware driven by the basic driver meets the standards according to the newly added hardware performance parameters; a difference shielding parameter determination module, configured to obtain, after determining that the performance of the newly added hardware driven by the basic driver does not meet the standard, a first hardware parameter of the newly added hardware and a second hardware parameter of hardware of the same hardware type as the newly added hardware, and determine the difference shielding parameter of the newly added hardware according to the first hardware parameter and the second hardware parameter; The difference shielding driver determination module is used to adjust the basic driver according to the difference shielding parameters to obtain the difference shielding driver of the newly added hardware, so as to use the difference shielding driver to drive the newly added hardware.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the operating system driving method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the operating system driving method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Method and apparatus for implementing driving of intelligent device on peripheral device
CN104991872A
Hardware driving method, device and equipment
CN114020335A
Computer system hardware detection method
CN114721885A
Configuration method for access hardware and related equipment
CN117632265A
Control software supply system
JP1999003220A