Software and hardware adaptation method and device, equipment and storage medium
By automatically identifying hardware device feature information, matching and loading drivers, and optimizing hardware parameters, the full process automation of software and hardware adaptation of Xinchuang equipment is achieved, solving the problems of low efficiency and low quality of existing adaptation methods, and improving the adaptation efficiency and quality.
Patent Information
- Application Number
- CN202510014379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-27
AI Technical Summary
The existing software and hardware adaptation methods of the innovative innovation equipment are inefficient and of uneven quality, and cannot achieve automation, which increases operation and maintenance difficulty, and insufficient compatibility analysis capabilities and performance tuning functions.
By automatically identifying and extracting the characteristic information of the target hardware device, matching and loading the target driver in the driver library of the target software system, and optimizing hardware parameters according to the operating status of the hardware device, the entire process automation from detection to configuration is achieved.
It improves the efficiency and quality of software and hardware adaptation of Xinchuang equipment, reduces manual intervention, reduces operation and maintenance difficulties, and improves compatibility analysis capabilities and hardware resource utilization.
Smart Images

Figure CN120045233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automated adaptation, and particularly to a software and hardware adaptation method, apparatus, device, and storage medium. Background Art
[0002] With the advancement of informatization construction, the importance of the information technology application innovation (IT innovation) industry has become increasingly prominent, especially in key fields related to information security. IT innovation devices, such as CPUs, storage devices, network hardware devices, etc., are being widely used in the administrative, financial, and public service fields. However, given the large variety of IT innovation device models and the complex compatibility requirements, and the fact that there is no unified standardized interface specification among system manufacturers yet, currently, the efficiency of the adaptation work (software and hardware adaptation) between IT innovation device hardware and software systems is low, and the adaptation quality varies.
[0003] The operating system plays a core role in the software and hardware adaptation process. It is a key technical support for realizing the interconnection and interoperability of IT innovation devices and improving performance. CTyunOS, as a cloud computing operating system deeply customized based on openEuler, is committed to comprehensively supporting the above-mentioned IT innovation devices. However, existing adaptation solutions usually rely on a hardware compatibility list, a driver management platform, or a general adaptation tool. Among them, the hardware compatibility list initializes devices through a preset hardware support list and a static configuration file, but the support for new devices is not timely enough, and the configuration file needs to be modified manually; the driver management platform provides basic driver management functions, but cannot achieve intelligent automatic selection and performance optimization, and has limited diagnostic capabilities for driver adaptation problems; some general adaptation tools can implement driver management among multiple operating systems, but have weak capabilities in deeply integrating with some systems and IT innovation device hardware, and cannot optimize for these systems. Therefore, existing software and hardware adaptation methods for IT innovation devices need to rely on manual modification of configuration files or manual selection of drivers, which increases the operation and maintenance difficulty, reduces the adaptation efficiency, and does not support new IT innovation devices in a timely manner, has weak compatibility analysis capabilities, and at the same time cannot provide performance tuning functions in combination with the characteristics of IT innovation devices, resulting in low utilization rate of hardware resources. Generally speaking, the current adaptation efficiency and quality of software and hardware adaptation methods for IT innovation devices are low. Summary of the Invention
[0004] Embodiments of the present invention provide a software and hardware adaptation method, apparatus, device, and storage medium, aiming to improve the efficiency and quality of software and hardware adaptation of IT innovation devices.
[0005] In a first aspect, an embodiment of the present invention provides a software and hardware adaptation method, which includes:
[0006] In response to a target hardware device being connected to a target software system, identifying and extracting the feature information of the target hardware device;
[0007] Match and load the target driver in the driver library of the target software system according to the feature information;
[0008] Determine whether the target driver is compatible with the target software system. If so, optimize the hardware parameters of the target hardware device according to the operating status of the target hardware device.
[0009] In a second aspect, an embodiment of the present invention provides a software and hardware adaptation device, where the software and hardware adaptation device includes:
[0010] A hardware detection unit, configured to identify and extract the feature information of the target hardware device in response to the connection of the target hardware device to the target software system;
[0011] A driver matching unit, configured to match and load the target driver in the driver library of the target software system according to the feature information;
[0012] A compatibility analysis and performance optimization unit, configured to determine whether the target driver is compatible with the target software system. If so, optimize the hardware parameters of the target hardware device according to the operating status of the target hardware device.
[0013] In a third aspect, an embodiment of the present invention further provides a software and hardware adaptation device, including a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of any one of the software and hardware adaptation methods provided by the embodiments of the present invention.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium includes a computer program. When the computer program runs on an electronic device, the computer program is used to cause the electronic device to execute the steps of any one of the software and hardware adaptation methods provided by the embodiments of the present invention.
[0015] The beneficial effects of the present invention are as follows:
[0016] When the software and hardware adaptation method of the present invention is applied to the connection of the target hardware device to the target software system, it automatically identifies and extracts the feature information of the target hardware device, matches and loads the target driver in the driver library of the target software system according to the feature information, and finally optimizes the hardware parameters of the target hardware device according to the operating status of the target hardware device on the premise of confirming the compatibility between the target driver and the target software system. Thereby, the full process automation of the software and hardware identification process of the target hardware device from detection to configuration is realized, the manual intervention is reduced, the efficiency of software and hardware adaptation is improved, the operation and maintenance difficulty is reduced, and at the same time, the compatibility analysis ability and the utilization rate of the performance and resources of the target hardware device are improved through the compatibility judgment mechanism and the real-time tuning mechanism. Therefore, the software and hardware adaptation method of the present invention improves the efficiency and quality of software and hardware adaptation of the target hardware device, such as the information technology innovation device. Description of the Drawings
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0018] Figure 1 It is a schematic flowchart of the software and hardware adaptation method provided in the embodiments of the present invention;
[0019] Figure 2 It is a schematic structural diagram of the software and hardware adaptation device provided in the embodiments of the present invention;
[0020] Figure 3 It is a schematic structural diagram of the software and hardware adaptation device provided in the embodiments of the present invention. Specific Embodiments
[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention. At the same time, in the description of the embodiments of the present invention, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present invention, the meaning of "a plurality" is two or more, unless otherwise specifically and clearly defined.
[0022] The embodiments of the present invention provide a software and hardware adaptation method, device, device and storage medium.
[0023] Specifically, this embodiment will be described from the perspective of the software and hardware adaptation device. This software and hardware adaptation device can be specifically integrated in the software and hardware adaptation device, that is, the software and hardware adaptation method in the embodiments of the present invention can be executed by the software and hardware adaptation device.
[0024] The following will be described in detail with reference to the accompanying drawings respectively. In this embodiment, the execution entity is the software and hardware adaptation device as an example. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that shown in the accompanying drawings.
[0025] With the advancement of informatization construction, the importance of the information technology application innovation (IT application innovation) industry has become increasingly prominent, especially in key areas related to information security. IT application innovation devices, such as CPUs, storage devices, network hardware devices, etc., are being widely used in the administrative, financial, and public service sectors. However, given the large variety of IT application innovation devices and the complex compatibility requirements, and the fact that there is no unified standardized interface specification among system manufacturers yet, currently, the efficiency of the adaptation work (software-hardware adaptation) between IT application innovation device hardware and software systems is low, and the adaptation quality varies.
[0026] The operating system plays a core role in the software-hardware adaptation process. It is the key technical support for realizing the interconnection and interoperability of IT application innovation devices and improving performance. CTyunOS, as a cloud computing operating system deeply customized based on openEuler, is committed to comprehensively supporting the above-mentioned IT application innovation devices. However, existing adaptation solutions usually rely on hardware compatibility lists, driver management platforms, or general adaptation tools. Among them, the hardware compatibility list initializes devices through a preset hardware support list and a static configuration file, but the support for new devices is not timely enough, and the configuration file needs to be modified manually; the driver management platform provides basic driver management functions, but it cannot achieve intelligent automatic selection and performance optimization, and has limited diagnostic capabilities for driver adaptation problems; some general adaptation tools can implement driver management among multiple operating systems, but their ability to be deeply integrated with some systems and IT application innovation device hardware is weak, and they cannot optimize for this part of the systems. Therefore, the existing software-hardware adaptation methods for IT application innovation devices need to rely on manual modification of configuration files or manual selection of drivers, which increases the operation and maintenance difficulty, reduces the adaptation efficiency, and is not timely in supporting new IT application innovation devices, with weak compatibility analysis capabilities. At the same time, they cannot provide performance tuning functions in combination with the characteristics of IT application innovation devices, and the utilization rate of hardware resources is low. Generally speaking, the existing software-hardware adaptation methods for IT application innovation devices have low adaptation efficiency and quality.
[0027] To solve the above problems, the present invention discloses a software-hardware adaptation method. When a target hardware device is connected to a target software system, this software-hardware adaptation method can automatically identify and extract the characteristic information of the target hardware device, and based on the characteristic information, match and load the target driver in the driver library of the target software system. Finally, when it is confirmed that the target driver is compatible with the target software system, the hardware parameters of the target hardware device are optimized according to the operating state of the target hardware device, thereby realizing the full-process automation of the software-hardware identification process of the target hardware device from detection to configuration, reducing manual intervention, improving the efficiency of software-hardware adaptation, reducing the operation and maintenance difficulty, and at the same time enhancing the compatibility analysis ability and the utilization rate of the performance and resources of the target hardware device through the compatibility judgment mechanism and the real-time tuning mechanism. Therefore, the software-hardware adaptation method of the embodiments of the present invention improves the efficiency and quality of software-hardware adaptation of target hardware devices, such as IT application innovation devices.
[0028] Please refer to Figure 1 , the specific process of the software and hardware adaptation method can be as follows in steps S101 to S103, where:
[0029] Step S101, in response to the target hardware device being connected to the target software system, identify and extract the characteristic information of the target hardware device.
[0030] Among them, the target hardware device can be a hardware device including an information innovation device, and the target software system can be a software operating system including CTyunOS. In the embodiment of the present invention, when the target hardware device is connected to the target software system, the characteristic information of the target hardware device is automatically identified and extracted without manual intervention.
[0031] Furthermore, in some embodiments, step S101 may include:
[0032] 1) Invoke the kernel hardware interface of the target software system to obtain the hardware information of the target hardware device.
[0033] 2) Identify the type of the target hardware device according to the hardware information.
[0034] 3) Parse the parameters of the target hardware device according to the type to generate characteristic information.
[0035] It can be understood that in the embodiment of the present invention, the corresponding parsing method is selected according to the type of the target hardware device to parse the parameters of the target hardware device, improving the accuracy of the finally obtained characteristic information, thereby improving the reliability of subsequent software and hardware adaptation.
[0036] Furthermore, in some embodiments, parsing the parameters of the target hardware device according to the type to generate characteristic information may include:
[0037] 1) According to the type, use a preset command to obtain the original information of the target hardware device.
[0038] 2) Convert the original information into structured information to obtain characteristic information.
[0039] Specifically, according to the type of the target hardware device, the corresponding command is selected to parse and obtain the characteristic information related to its parameters.
[0040] Exemplarily, the target hardware device is a PCI device, such as a network card, GPU, etc. At this time, the embodiments of the present invention can use the lspci command to obtain the original information of the target hardware device; or, the target hardware device is a block storage device, such as a hard disk, etc. At this time, the embodiments of the present invention can use the lsblk command to obtain the original information of the target hardware device; or, the target hardware device is a CPU. At this time, the embodiments of the present invention can use the lscpu command to extract characteristics such as the CPU architecture, frequency, and number of threads to obtain the original information of the target hardware device.
[0041] After obtaining the original information of the target hardware device, in some embodiments, the dedicated API of the target software system can be used to convert the original data into structured data to obtain the characteristic information of the target hardware device, such as device ID, manufacturer, model, hardware version, etc.
[0042] After obtaining the characteristic information of the target hardware device, the characteristic information is passed to the next process for subsequent software and hardware adaptation.
[0043] Step S102, according to the characteristic information, match and load the target driver in the driver library of the target software system.
[0044] Among them, the target driver is a driver adapted to the target hardware device.
[0045] Specifically, according to the characteristic information extracted in step S101, driver matching is performed in the driver library of the target software system, and after the target driver is matched, the target driver is loaded.
[0046] It can be understood that after the embodiments of the present invention extract the characteristic information of the target hardware device in step S101, they can automatically perform target driver matching according to the characteristic information, further reducing manual intervention behavior, improving efficiency, and reducing error rates and operation and maintenance costs.
[0047] Optionally, in some embodiments, step S102 may include:
[0048] 1) According to the characteristic information, match the target driver in the driver library.
[0049] 2) If the matching is successful, load the target driver.
[0050] 3) If the matching fails, call the driver update service of the target software system, obtain the latest driver package and save it to the driver library, and then return to the step of matching the target driver in the driver library according to the characteristic information.
[0051] It can be understood that the target driver that can be adapted to the target hardware device may not exist in the driver library of the target software system. For example, when the target hardware device is a newly developed device and the driver library of the target software system is not updated in time, resulting in the non-existence of the target driver. In this case, the embodiment of the present invention uses the driver update service of the target software system to obtain the latest driver package and save it to the driver library, and then performs a driver matching process again when the driver library is updated to the latest state, so that the target driver can be successfully matched, realizing the timely support for the new device, and also without manual intervention.
[0052] Optionally, in some embodiments, step S102 uses the kernel module loading tool (such as modprobe) of the target software system to load the target driver, and calls the device configuration tool to complete the initialization, such as network parameter configuration, storage partition mounting, etc. Some embodiments of the present invention record the successful loading log after the target driver is successfully loaded.
[0053] Optionally, in some embodiments, when the target driver that can be adapted to the target hardware device does not exist in the driver library of the target software system in step S102, the driver can also be loaded by loading the default driver, and the driver matching failure log is recorded. It can be understood that through this setting, when the target driver does not exist in the driver library of the target software system and the target driver cannot be matched even through the driver library update, the default driver can be matched to prevent the software and hardware adaptation process of the embodiment of the present invention from crashing due to the driver matching failure.
[0054] S103, determine whether the target driver is compatible with the target software system. If so, optimize the hardware parameters of the target hardware device according to the operating state of the target hardware device.
[0055] It can be understood that the embodiment of the present invention detects whether the target driver is compatible with the target software system after matching and loading the target driver, improving the compatibility analysis ability. For example, determine whether the target driver is compatible with the kernel version of the current target software system to ensure the version consistency.
[0056] Specifically, after the embodiment of the present invention confirms that the target driver is compatible with the target software system, it further optimizes the hardware parameters of the target hardware device according to the operating state of the target hardware device, improving the utilization rate of the performance and resources of the target hardware device.
[0057] Optionally, in some embodiments, determining whether the target driver is compatible with the target software system may include:
[0058] 1) Extract the module information of the target software system after the target driver is installed.
[0059] 2) Check whether the module corresponding to the target driver conflicts with other modules according to the module information.
[0060] 3) Run the target driver in a preset virtual sandbox.
[0061] 4) If the module corresponding to the target driver has no conflict with other modules and the virtual sandbox does not crash within the preset time, the target driver is compatible with the target software system; otherwise, the target driver is not compatible with the target software system.
[0062] Specifically, after the target driver is successfully loaded in the embodiment of the present invention, the module information of the target software system after the target driver is loaded and installed is extracted, and static analysis is performed according to the module information to check the dependency relationship between the driver module and other loaded modules in the target software system, and determine whether the module corresponding to the target driver conflicts with other loaded modules, such as memory allocation conflicts, etc. At the same time, the embodiment of the present invention also performs dynamic testing, runs the target driver in a preset virtual sandbox, detects problems that may cause the system to crash, and records the exceptions that occur during the dynamic testing process. In the embodiment of the present invention, if the module corresponding to the target driver has no conflict with other modules and the virtual sandbox does not crash within the preset time, the target driver is compatible with the target software system; otherwise, the target driver is not compatible with the target software system.
[0063] Optionally, in some embodiments, after the compatibility test analysis of the target driver is completed, a compatibility analysis report is also generated according to the test analysis results. The generation of the compatibility analysis report can be implemented through a logging system, and the report includes problem descriptions and solution suggestions.
[0064] Optionally, in some embodiments, optimizing the hardware parameters of the target hardware device according to the operating state of the target hardware device may include:
[0065] 1) Perform a performance test on the target hardware device under the default hardware parameter configuration to obtain a first performance parameter.
[0066] 2) Adjust the hardware parameters of the target hardware device according to the operating state of the target hardware device, and perform a performance test on the target hardware device to obtain a second performance parameter.
[0067] 3) If the second performance parameter is better than the first performance parameter, save the adjusted hardware parameters of the target hardware device; if the first performance parameter is better than the second performance parameter, restore the hardware parameters of the target hardware device to the default hardware parameter configuration.
[0068] Wherein, the default configuration is the configuration information of the default configuration of the hardware device accessed by the target software system. After the embodiment of the present invention performs a performance test on the target hardware device under the default configuration to obtain the first performance parameter, the hardware parameters of the target hardware device can be adjusted through a dynamic tuning mechanism according to the operating state of the target hardware device.
[0069] Exemplarily, for the CPU, the cpufreq interface can be used to adjust the frequency policy for CPU tuning; for block storage devices, when I / O optimization is required, the access efficiency can be improved by adjusting the I / O queue depth of the storage device; for PCI devices, when network optimization is required, the network queue parameters can be customized to reduce the packet loss rate.
[0070] After adjusting the hardware parameters of the target hardware device, the performance test is performed on the target hardware device again to obtain the second performance parameter. Then, in the embodiments of the present invention, the first performance parameter and the second performance parameter are compared. If the second performance parameter is better than the first performance parameter, the adjusted hardware parameters of the target hardware device are saved, such as saving the adjusted hardware parameters of the target hardware device to a configuration file to accelerate the loading and adaptation speed when the target hardware device accesses the target software system later; when the first performance parameter is due to the second performance parameter, the hardware parameter adjustment is abandoned, and the hardware parameters of the target hardware device are restored to the default hardware parameter configuration so that the target hardware device can perform better.
[0071] Optionally, in some embodiments, the software and hardware adaptation method may further include:
[0072] Generating a software and hardware adaptation report.
[0073] Among them, the software and hardware adaptation report includes the execution logs and results of all the foregoing steps. By generating a software and hardware adaptation report in the embodiments of the present invention, data reference can be provided for subsequent software and hardware adaptation, the adaptation speed can be improved, and the adaptation quality can be improved.
[0074] Optionally, in some embodiments, the system log can be used to record the execution logs and results of all the foregoing steps, and then a software and hardware adaptation report is generated according to the logs.
[0075] Optionally, in some embodiments, the software and hardware adaptation report can be in PDF format.
[0076] Optionally, in some embodiments, the software and hardware adaptation report is displayed in the target interface so that the user can view the report content more intuitively.
[0077] Optionally, in some embodiments, the software and hardware adaptation report is stored in the system log database.
[0078] In summary, when the target hardware device is connected to the target software system in the embodiments of the present invention, the characteristic information of the target hardware device is automatically identified and extracted, and according to the characteristic information, the target driver is matched and loaded in the driver library of the target software system. Finally, when it is confirmed that the target driver is compatible with the target software system, the hardware parameters of the target hardware device are optimized according to the operating state of the target hardware device, thereby realizing the full-process automation of the software and hardware identification process of the target hardware device from detection to configuration, reducing manual intervention, improving the efficiency of software and hardware adaptation, reducing the operation and maintenance difficulty, and at the same time enhancing the compatibility analysis ability and the utilization rate of the performance and resources of the target hardware device through the compatibility judgment mechanism and the real-time optimization mechanism. Therefore, the software and hardware adaptation method in the embodiments of the present invention improves the efficiency and quality of software and hardware adaptation of the target hardware device, such as the information and communication technology innovation device. At the same time, the software and hardware adaptation method in the embodiments of the present invention can match the default driver when the target driver does not exist in the driver library of the target software system and cannot be matched through driver library update, preventing the software and hardware adaptation process in the embodiments of the present invention from crashing due to driver matching failure.
[0079] This embodiment also provides a software and hardware adaptation device, which can be specifically integrated in a software and hardware adaptation device. As Figure 2 shown, the software and hardware adaptation device may include:
[0080] A hardware detection unit 201, configured to identify and extract the characteristic information of the target hardware device in response to the connection of the target hardware device to the target software system.
[0081] A driver matching unit 202, configured to match and load the target driver in the driver library of the target software system according to the characteristic information.
[0082] A compatibility analysis and performance optimization unit 203, configured to determine whether the target driver is compatible with the target software system. If so, optimize the hardware parameters of the target hardware device according to the operating state of the target hardware device.
[0083] As Figure 3 shown, Figure 3 is a schematic structural diagram of a software and hardware adaptation device provided by an embodiment of the present invention. The software and hardware adaptation device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. Among them, the processor 1101 is electrically connected to the memory 1102. Those skilled in the art can understand that the structural diagram of the software and hardware adaptation device shown in the figure does not limit the software and hardware adaptation device, and may include more or fewer components than shown, or combine some components, or arrange different components.
[0084] The processor 1101 is the control center of the software and hardware adaptation device 1100. It connects various parts of the entire software and hardware adaptation device 1100 through various interfaces and circuits. By running or loading software programs and / or units stored in the memory 1102, and by invoking the data stored in the memory 1102, it executes various functions of the software and hardware adaptation device 1100 and processes data, thereby monitoring the software and hardware adaptation device 1100 as a whole. The processor 1101 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention.
[0085] In the embodiments of the present invention, the processor 1101 in the software and hardware adaptation device 1100 will load the instructions corresponding to the processes of one or more application programs into the memory 1102 according to the following steps, and the processor 1101 will run the application programs stored in the memory 1102 to implement various functions. For details, reference can be made to the previous embodiments and will not be elaborated here.
[0086] Optionally, as Figure 3 shown, the software and hardware adaptation device 1100 further includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. Among them, the processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107 respectively. Those skilled in the art can understand that Figure 3 the structure of the software and hardware adaptation device shown in
[0087] The touch display screen 1103 can be used to display a graphical user interface and receive operation instructions generated by a user's interaction with the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of software and hardware adaptation devices. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1101, and can receive and execute the commands sent by the processor 1101. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits it to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiment of the present invention, the touch panel and the display panel can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as a part of the input unit 1106 to achieve the input function.
[0088] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other software and hardware adaptation devices through wireless communication, and transmit and receive signals with the network device or other software and hardware adaptation devices.
[0089] The audio circuit 1105 can be used to provide an audio interface between the user and the software and hardware adaptation device through a speaker and a microphone. The audio circuit 1105 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1105 and then converted into audio data. After the audio data is output to the processor 1101 for processing, it is sent through the radio frequency circuit 1104 to, for example, another software and hardware adaptation device, or the audio data is output to the memory 1102 for further processing. The audio circuit 1105 may also include an earphone jack to provide communication between the peripheral earphone and the software and hardware adaptation device.
[0090] The input unit 1106 can be used to receive input digital, character information or user characteristic information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0091] The power supply 1107 is used to supply power to each component of the software and hardware adaptation device 1100. Optionally, the power supply 1107 can be logically connected to the processor 1101 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 1107 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0092] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0094] Therefore, an embodiment of the present invention provides a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute any software and hardware adaptation method provided by the embodiments of the present invention. The computer programs can execute the steps of the foregoing software and hardware adaptation method. Reference can be made to the previous embodiments, and details are not described herein again.
[0095] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0096] Since the computer program stored in the computer-readable storage medium can execute any of the software-hardware adaptation methods provided by the embodiments of the present invention, the beneficial effects achievable by any of the software-hardware adaptation methods provided by the embodiments of the present invention can be realized. For details, refer to the previous embodiments and will not be elaborated here.
[0097] In the above embodiments of the software-hardware adaptation device, computer-readable storage medium, software-hardware adaptation equipment, and computer program product, the descriptions of each embodiment have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes and beneficial effects of the above-described software-hardware adaptation device, computer-readable storage medium, computer program product, software-hardware adaptation equipment, and their corresponding units can refer to the description of the software-hardware adaptation method in the above embodiments and will not be elaborated here specifically.
[0098] The above has introduced in detail a software-hardware adaptation method, a software-hardware adaptation device, a software-hardware adaptation equipment, a computer-readable storage medium, and a computer program product provided by the embodiments of the present invention. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, based on the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for hardware and software adaptation, characterized in that: The method comprises: In response to the target hardware device being connected to the target software system, identifying and extracting characteristic information of the target hardware device; According to the characteristic information, matching and loading a target driver in a driver library of the target software system; Determine whether the target driver is compatible with the target software system, and if so, optimize the hardware parameters of the target hardware device according to the running state of the target hardware device.
2. The method for hardware and software adaptation according to claim 1, characterized in that: The identifying and extracting characteristic information of the target hardware device includes: Calling the kernel hardware interface of the target software system to obtain hardware information of the target hardware device; Identify the type of the target hardware device according to the hardware information; The parameters of the target hardware device are parsed according to the type to generate the characteristic information.
3. The method for hardware and software adaptation according to claim 2, characterized in that: The step of parsing the parameters of the target hardware device according to the type to generate the characteristic information comprises: According to the type, using a preset command to obtain original information of the target hardware device; The original information is converted into structured information to obtain the feature information.
4. The method for hardware and software adaptation according to claim 1, characterized in that: The matching and loading of the target driver in the driver library of the target software system according to the feature information includes: According to the feature information, matching the target driver in the driver library; If the match is successful, the target driver is loaded; If the matching fails, the driver update service of the target software system is called to obtain the latest driver package and save it to the driver library, and then the process returns to the step of matching the target driver in the driver library according to the feature information.
5. The method for hardware and software adaptation according to claim 1, characterized in that: The determining whether the target driver is compatible with the target software system comprises: Extracting module information of the target software system after the target driver is installed; Checking whether the module corresponding to the target driver conflicts with other modules according to the module information; Running the target driver in a preset virtual sandbox; If the module corresponding to the target driver has no conflict with other modules and the virtual sandbox does not crash within a preset time, the target driver is compatible with the target software system; otherwise, the target driver is incompatible with the target software system.
6. The method for hardware and software adaptation according to claim 1, characterized in that: Optimizing the hardware parameters of the target hardware device according to the operating state of the target hardware device includes: Performing a performance test on the target hardware device under a default hardware parameter configuration to obtain a first performance parameter; adjusting the hardware parameters of the target hardware device according to the operating state of the target hardware device, and performing a performance test on the target hardware device to obtain a second performance parameter; If the second performance parameter is better than the first performance parameter, the adjusted hardware parameter of the target hardware device is saved; if the first performance parameter is better than the second performance parameter, the hardware parameter of the target hardware device is restored to the default hardware parameter configuration.
7. The method for hardware and software adaptation according to claim 1, characterized in that: The method further comprises: Generate a software and hardware adaptation report.
8. A software and hardware adaptation device, characterized in that: The hardware and software adaptation device comprises: A hardware detection unit, configured to identify and extract characteristic information of a target hardware device in response to the target hardware device being connected to a target software system; A driver matching unit, configured to match and load a target driver in a driver library of the target software system according to the feature information; The compatibility analysis and performance optimization unit is used to determine whether the target driver is compatible with the target software system, and if so, optimize the hardware parameters of the target hardware device according to the operating status of the target hardware device.
9. A software and hardware adaptation device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the software and hardware adaptation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the software and hardware adaptation method in any one of claims 1-7.
Citation Information
Cited By
Hardware driving method, device and equipment for basic input and output system
CN120596162A