Driving program adaptation method and device and embedded system

By extracting the feature information of the hardware board and using the corresponding relationship table to obtain the target driver, the problem of manual configuration of the hardware board driver in the embedded system is solved, and the automatic adaptation and efficiency improvement of the driver is achieved.

CN119806632APending Publication Date: 2025-04-11BEIJING GRAND RAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411780584.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In embedded systems, there are many types of hardware boards, resulting in complex software development and maintenance, and drivers need to be manually configured to accommodate different hardware boards.

Method used

By extracting the characteristic information of the target hardware board, using the corresponding relationship table to obtain the target driver, and install it on the hardware board to achieve automatic driver adaptation.

Benefits of technology

It realizes automatic adaptation of hardware board drivers, reduces the complexity of software development and maintenance, and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806632A_ABST
    Figure CN119806632A_ABST
Patent Text Reader

Abstract

The invention provides a driver adaptation method and device and an embedded system, and the method comprises the steps: extracting the feature information of a target hardware board card, the target hardware board card being a board card of to-be-deployed embedded software; based on the feature information and a corresponding relation table, a target drive program corresponding to the target hardware board card is obtained, and the corresponding relation table comprises the corresponding relation between feature information items and drive program items; and installing the target drive program on the target hardware board card. According to the method, the target drive program of the target hardware board card is obtained by utilizing the feature information of the target hardware board card, and the target drive program is installed on the target hardware board card, so that automatic adaptation of the drive program of the hardware board card is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software development, and in particular to a driver adaptation method, a driver adaptation device and an embedded system. Background Art

[0002] In the related art, in embedded systems, there are many types of hardware boards, and the hardware configurations and interfaces of different hardware boards may be different. In order to enable software to run on different hardware boards, it is usually necessary to write specific drivers for each hardware board, or manually configure the software to adapt to different hardware boards. This method is not only inefficient, but also increases the complexity of software development and maintenance. Summary of the invention

[0003] The embodiments of the present application provide a driver adaptation method, a driver adaptation device and an embedded system, which are used to improve the technical problem that the hardware board driver needs to be manually configured.

[0004] In a first aspect, an embodiment of the present application provides a driver adaptation method, comprising:

[0005] Extracting characteristic information of a target hardware board, where the target hardware board is a board on which the embedded software is to be deployed;

[0006] Based on the characteristic information and the correspondence table, a target driver corresponding to the target hardware board is obtained, wherein the correspondence table includes a correspondence between characteristic information entries and driver entries;

[0007] Install the target driver on the target hardware board.

[0008] In some embodiments, the target hardware board includes several components, and extracting characteristic information of the target hardware board includes:

[0009] Obtain a characteristic device table corresponding to a target hardware board, where the characteristic device table records names of characteristic devices used to identify the target hardware board;

[0010] Extract the characteristic information of the target hardware board based on the characteristic device table.

[0011] In some embodiments, each device has corresponding attribute information, and extracting the characteristic information of the target hardware board based on the characteristic device table includes:

[0012] Filter out the target characteristic device that can best identify the target hardware board from the characteristic device table;

[0013] Target attribute information corresponding to the target characteristic device is extracted, and the target attribute information is used as characteristic information.

[0014] In some embodiments, each device has corresponding attribute information, and extracting the characteristic information of the target hardware board based on the characteristic device table includes:

[0015] Extracting attribute information corresponding to all characteristic devices in the characteristic device table to obtain an attribute information set;

[0016] The attribute information set is determined as the feature information.

[0017] In some embodiments, the attribute information of any two feature information items in the correspondence table is not completely the same, and based on the feature information and the correspondence table, obtaining a target driver corresponding to the target hardware board includes:

[0018] In response to the presence of a feature device in the feature device table whose attribute information difference is greater than or equal to a preset value, matching the attribute information of the feature device whose attribute information difference is greater than or equal to the preset value with the feature information entry in the correspondence table;

[0019] When it is determined that the number of feature information entries matching the feature information of a feature device whose difference degree of feature information is greater than or equal to a preset value is 1, obtaining a driver entry corresponding thereto and determining it as a target driver;

[0020] Alternatively, according to the order in which the names of the characteristic devices in the characteristic device table are recorded, the attribute information of the characteristic device ranked first is matched with the characteristic information entry in the correspondence table to obtain a set of matching characteristic information entries;

[0021] Match the attribute information of the feature device ranked in the latter position with the feature information entry in the matching feature information entry set corresponding to the attribute information of the feature device ranked in the former position until the number of feature information entries in the matching feature information entry set is 1, obtain the corresponding driver entry, and determine it as the target driver.

[0022] In some embodiments, the characteristic information is a collection of attribute information of all characteristic devices in the characteristic device table. Based on the characteristic information and the corresponding relationship table, obtaining a target driver corresponding to the target hardware board includes:

[0023] Match the feature information with the correspondence table to obtain a matching result;

[0024] In response to the matching result indicating that there is feature information matching the feature information in the corresponding relationship table, a driver corresponding to the feature information is acquired and determined as a target driver.

[0025] In some embodiments, the method further comprises:

[0026] In response to the matching result indicating that there is no feature information matching the feature information in the correspondence table, generating a reference driver according to the feature information;

[0027] Display matching results and reference drivers, and prompt the user to configure the driver to generate the target driver;

[0028] Install the target driver configured by the user on the target hardware board.

[0029] In some embodiments, the method further comprises:

[0030] The target driver configured by the user and the corresponding characteristic information are stored in the corresponding relationship table.

[0031] In a second aspect, an embodiment of the present application provides a driver adaptation device, including:

[0032] A first extraction module is used to extract characteristic information of a target hardware board, where the target hardware board is a board on which the embedded software is to be deployed;

[0033] A first acquisition module, used to acquire a target driver corresponding to a target hardware board based on the feature information and a correspondence table, wherein the correspondence table includes a correspondence between feature information entries and driver entries;

[0034] The first installation module is used to install the target driver on the target hardware board.

[0035] In a third aspect, an embodiment of the present application further provides an embedded system, including an embedded processor and a memory, wherein the memory stores a computer program, and the computer program is loaded by the processor to execute the steps in the driver adaptation method of any one of the above embodiments.

[0036] Beneficial effects of the embodiments of the present application:

[0037] In an embodiment of the present application, a target driver of a target hardware board is acquired by using characteristic information of the target hardware board, and the target driver is installed on the target hardware board, thereby achieving automatic adaptation of the hardware board driver. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0039] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same figure numbers represent the same parts in the following description.

[0040] Figure 1 It is a schematic diagram of the operation of an embedded system provided in an embodiment of the present application;

[0041] Figure 2 It is a flowchart of a driver adaptation method provided by some embodiments of the present application;

[0042] Figure 3 It is a flowchart of a method for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0043] Figure 4 It is a flowchart of another method for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0044] Figure 5 It is a flowchart of another method for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0045] Figure 6 is a flowchart of another driver adaptation method provided by some embodiments of the present application;

[0046] Figure 7 It is a flowchart of another driver adaptation method provided by some embodiments of the present application;

[0047] Figure 8 It is a flowchart of another driver adaptation method provided by some embodiments of the present application;

[0048] Fig. 9 is a structural diagram of a driver adapter device provided in an embodiment of the present application;

[0049] Fig.10 It is a structural schematic diagram of a device for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0050] Fig.11 It is a structural schematic diagram of another device for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0051] Fig.12 It is a structural schematic diagram of another device for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0052] Fig.13 It is a structural schematic diagram of another device for extracting characteristic information of a target hardware board provided by some embodiments of the present application;

[0053] Fig.14 is a schematic diagram of the structure of another driver adapter device provided in some embodiments of the present application;

[0054] Fig.15 is a structural diagram of another driver adapter device provided in some embodiments of the present application;

[0055] Fig.16 is a structural diagram of another driver adapter device provided in some embodiments of the present application;

[0056] Fig.17 It is a structural diagram of an embedded system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In addition, it should be understood that the specific implementation methods described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In the present application, unless otherwise stated, the directional words such as "upper" and "lower" used generally refer to the upper and lower parts of the device in actual use or working state, specifically the drawing direction in the accompanying drawings; while "inside" and "outside" refer to the outline of the device.

[0058] In this application, the use of “based on” is meant to be open and inclusive, because the process, step, calculation or other action “based on” one or more stated conditions or values ​​may be based on additional conditions or values ​​beyond the stated ones in practice.

[0059] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0060] Please refer to Figure 1 , Figure 1This is a schematic diagram of the operation of an embedded system provided by an embodiment of the present application. The embodiment of the present application provides an embedded system, which includes three main parts: a hardware layer, an intermediate layer, and a software layer. The hardware board is part of the hardware layer and is used to implement specific hardware functions. The hardware layer also includes an embedded processor, a memory, and an input / output interface.

[0061] Please refer to Figure 2 , Figure 2 The present invention provides a driver adaptation method, which includes the following steps.

[0062] S100: extracting characteristic information of a target hardware board, where the target hardware board is a board on which the embedded software is to be deployed.

[0063] Each hardware board has characteristic information. In some embodiments, the characteristic information may be attribute information of the device of the hardware board, for example, CPU model, memory capacity, interface type, etc.

[0064] In one embodiment, the characteristic information includes at least one of a CPU model, a memory capacity, and an interface type.

[0065] S200: Based on the characteristic information and the correspondence table, a target driver corresponding to the target hardware board is obtained, wherein the correspondence table includes correspondences between characteristic information entries and driver entries.

[0066] In some embodiments, the correspondence table can be pre-configured and stored in the memory of the embedded system, and can be directly called. The feature information entries and driver entries in the correspondence table are stored in a mapped manner. Exemplarily, the correspondence table may include a direct correspondence between the feature information entries and the driver entries; it may also include an indirect correspondence between the feature information entries and the driver entries, for example, including a correspondence between the feature information entries and the intermediate information and a correspondence between the intermediate information and the driver entries. It can be understood that the intermediate information corresponding to the feature information entry can be the category to which the CPU belongs, the memory capacity range, the interface category, etc.

[0067] S300: Install the target driver on the target hardware board.

[0068] In an embodiment of the present application, a target driver of a target hardware board is obtained using characteristic information of the target hardware board, and the target driver is installed on the target hardware board, thereby achieving automatic adaptation of the driver of the hardware board.

[0069] Please refer to Figure 3 , Figure 3The following is a flow chart of a method for extracting characteristic information of a target hardware board provided by some embodiments of the present application. In some embodiments of the present application, the target hardware board includes several components, and the above-mentioned extraction of characteristic information of the target hardware board includes the following steps.

[0070] S110: Obtain a characteristic device table corresponding to a target hardware board, where the characteristic device table records names of characteristic devices used to identify the target hardware board.

[0071] In the embodiment of the present application, the characteristic device can be a device that is only set on a few hardware boards including the target hardware board, or a device whose attribute information is greatly different when it is set on the target hardware board and when it is set on other hardware boards. Regarding the difference of the attribute information of the device, exemplarily, there are device A and device B, wherein device A is set on 10 hardware boards, and its attribute information is respectively a1, a2 and a3 (a1, a2 and a3 are different), and device B is also set on the above 10 hardware boards, and its attribute information is respectively b1, b2, b3, b4, b5, b6, and b7 (b1, b2, b3, b4, b5, b6, and b7 are different), then the difference of the attribute information of device A on these 10 hardware boards is 3 / 10, and the difference of the attribute information of device B on these 10 hardware boards is 7 / 10. Obviously, the difference of the attribute information of device B on different hardware boards is greater than the difference of the attribute information of device A on different hardware boards.

[0072] In some embodiments, each hardware board has multiple components, such as a CPU, memory, a network card, various interfaces, and the like.

[0073] In some embodiments, the feature device table only includes names of some devices of the target hardware board.

[0074] S120: Extracting characteristic information of the target hardware board based on the characteristic device table.

[0075] In some embodiments, extracting feature information based on a feature device table can avoid extracting attribute information corresponding to device names in a non-feature device table, helping to reduce the time used to extract attribute information of feature devices while improving the accuracy of the extracted attribute information.

[0076] In an embodiment of the present application, the correspondence table includes attribute information of all components of the target hardware board.

[0077] Please refer to Figure 4 , Figure 4This is another flow chart of a method for extracting characteristic information of a target hardware board provided by some embodiments of the present application. In some embodiments of the present application, each device has attribute information corresponding thereto, and the above-mentioned method of extracting characteristic information of a target hardware board based on a characteristic device table includes the following steps.

[0078] S121: Filter out the target characteristic device that can best identify the target hardware board from the characteristic device table.

[0079] The target characteristic device that best identifies the target hardware board, as the name implies, is the characteristic device that best represents the target hardware board. For example, if device C is only set on the target hardware board, then device C can be selected as the target characteristic device that best identifies the target hardware board. Alternatively, if the attribute information of device D when it is set on the target hardware board is different from the attribute information when it is set on other hardware boards, then device D can be selected as the target characteristic device that best identifies the target hardware board. It should be understood that the above examples are only for ease of understanding, and the selection conditions of the target characteristic device that best identifies the target hardware board are described in detail, but this should not constitute any limitation to this application. This application does not limit the selection conditions of the target characteristic device that best identifies the target hardware board.

[0080] S122: Extract target attribute information corresponding to the target characteristic device, and use the target attribute information as characteristic information.

[0081] In some embodiments, the present application helps to reduce the time of acquiring the target driver by using the target attribute information of the target characteristic device that can best identify the target hardware board as the characteristic information of the target hardware board, thereby improving efficiency.

[0082] In some embodiments, the target attribute information of the target feature device is matched with the feature information items in the correspondence table. If the number of feature information items that match the attribute information of the target feature device (matching means that the feature information items include the target attribute information) is greater than 1, the feature device that best identifies the target hardware board is selected from the remaining feature devices in the feature device table as a new target feature device, and its attribute information is extracted as the feature information of the target hardware board, and the feature information is matched with the set of feature information items that match the attribute information of the previous target feature device. The above steps are repeated until the number of feature information items that match the feature information (i.e., the target attribute information of the target feature device) is 1, and the driver corresponding to the feature information item is obtained as the target driver. By extracting and matching the target attribute information once for each target feature device that is screened out, and stopping the extraction immediately when the number of feature information items that match the target attribute information is 1, it helps to reduce the number of times the target attribute information is extracted, thereby reducing the time to obtain the target driver and improving efficiency.

[0083] In some embodiments, there is a situation where there is no feature information entry in the correspondence table that matches the attribute information of the feature device of the target hardware board, that is, the feature information of the target hardware board and the corresponding driver are not stored in the correspondence table, and the user needs to manually input the target driver. Before prompting the user to input the target driver, the attribute information of all feature devices in the feature device table can also be extracted, and a reference driver for the target hardware board can be generated based on the attribute information of all feature devices, and the reference driver and matching results can be displayed to the user, and the user can be prompted to input the target driver. By displaying the reference driver to the user, the user can input the target driver based on the reference driver, which helps to reduce the time it takes for the user to input the target driver, thereby improving efficiency.

[0084] Please refer to Figure 5 , Figure 5 It is a flowchart of another method for extracting characteristic information of a target hardware board provided by some embodiments of the present application. In some embodiments of the present application, each device has attribute information corresponding thereto, and the above-mentioned method of extracting characteristic information of a target hardware board based on a characteristic device table includes the following steps.

[0085] S123: Extract attribute information corresponding to all feature devices in the feature device table to obtain an attribute information set.

[0086] S124: Determine the attribute information set as feature information.

[0087] In some embodiments, when extracting the attribute information of all feature devices in the feature device table, the attribute information of the feature devices in the feature device table can be extracted one by one in turn. This can avoid repeated extraction and / or incomplete extraction, help reduce the time used to extract the attribute information of the feature devices, and improve the accuracy and completeness of the extracted attribute information set (i.e., feature information).

[0088] Please refer to Figure 6 , Figure 6 This is another driver adaptation method flow diagram provided by some embodiments of the present application. In some embodiments of the present application, the attribute information of any two feature information items in the correspondence table is not completely the same, and the above-mentioned acquisition of the target driver corresponding to the target hardware board based on the feature information and the correspondence table includes the following steps.

[0089] S301: In response to the presence of a feature device in the feature device table having attribute information difference greater than or equal to a preset value, match attribute information of the feature device having attribute information difference greater than or equal to the preset value with a feature information entry in the correspondence table.

[0090] S302: When it is determined that the number of feature information entries matching the feature information of a feature device whose difference in attribute information is greater than or equal to a preset value is 1, a driver entry corresponding thereto is obtained and determined as a target driver.

[0091] It should be noted that, in some embodiments, the attribute information of any two feature information items in the above correspondence table is not completely the same, which means that when the attribute information included in any two feature information items in the correspondence table is compared, at most only part of the attribute information is the same, and there are no two feature information items that include completely the same attribute information. Please refer to Table 1.

[0092] Table 1

[0093] Feature Information Items Property information α1 a1, b2, c1, d4, h2 α2 a1, b4, c3, d4, h2 α3 a1, b3, c1, d4, h1 α4 a1, b1, c7, d1, h2 α5 a1, b2, c2, d3, h2

[0094] Therefore, when matching the attribute information of a device of the target hardware board with the characteristic information entry in the correspondence table, there may not be a matching characteristic information entry (not discussed here), or there may be multiple matching characteristic information entries, or there may be only one characteristic information entry that matches it. When there is only one characteristic information entry that matches it, it can be determined that the driver corresponding to the characteristic information entry is the target driver of the target hardware board.

[0095] In this embodiment, the preset value of the difference degree of the attribute information may be 70%-100%, for example, 75%, 80%, 85%, 90%, 95%, etc., but is not limited thereto.

[0096] Based on this, when there are feature devices in the feature device table whose difference is greater than or equal to the preset value, and the attribute information of these devices is matched with the feature information entries in the correspondence table, the number of feature information entries that can be matched is small. Therefore, the target driver of the target hardware board can be obtained after a smaller number of matches, which helps to reduce the time to obtain the target driver and improve efficiency.

[0097] Please refer to Figure 7 , Figure 7 This is another driver adaptation method flow diagram provided by some embodiments of the present application. In some embodiments of the present application, the attribute information of any two feature information items in the correspondence table is not completely the same, and the above-mentioned acquisition of the target driver corresponding to the target hardware board based on the feature information and the correspondence table includes the following steps.

[0098] S303: According to the order in which the names of the feature devices in the feature device table are recorded, the attribute information of the feature device ranked first is matched with the feature information entry in the correspondence table to obtain a set of matching feature information entries.

[0099] S304: Match the attribute information of the feature device in the latter position with the feature information items in the matching feature information item set corresponding to the attribute information of the feature device in the former position, until the number of feature information items in the matching feature information item set is 1, obtain the driver item corresponding thereto, and determine it as the target driver. In some embodiments, by matching the attribute information of the feature device in the latter position with the feature information items in the matching feature information item set corresponding to the former position, the number of feature information items in the matching feature information item set gradually decreases as the number of matches increases. After a certain number of matches, when the number of feature information items in the matching feature information item set is 1, it can be determined that the corresponding driver is the target driver. This method helps to reduce the number of matches, thereby reducing the time required to obtain the target driver and improving efficiency.

[0100] Exemplarily, still taking the characteristic information items and attribute information in Table 1 as an example, the attribute information of the previous characteristic device is a1, and the attribute information of the next characteristic device is b2. Matching a1 with the characteristic information items in the correspondence table shows that the matching characteristic information items are α1, α2, α3, α4, and α5. Then the matching characteristic information item set corresponding to a1 (i.e., the attribute information of the previous characteristic device) includes α1, α2, α3, α4, and α5. When the attribute information b2 of the next characteristic device is matched, the matching characteristic information item set is the one corresponding to a1. 1 (i.e., the attribute information of the previous feature device) corresponds to the feature information entries in the matching feature information entry set, namely α1, α2, α3, α4 and α5. According to the attribute information included in α1, α2, α3, α4 and α5 respectively, it can be known that the feature information entries matching b2 are α1 and α5, and the feature information entries are reduced to two. In this way, as the number of matches increases, the number of feature information entries gradually decreases. When the number of feature information entries is reduced to one, the driver corresponding to the feature information entry is the target driver of the target hardware board.

[0101] In some embodiments, the order of recording the names of the characteristic devices in the characteristic device table can be in descending order of difference. Selecting the attribute information one by one in descending order of difference for matching, and matching the attribute information of the characteristic device in the latter position with the matching characteristic information entry set corresponding to the former position, helps to quickly narrow the matching range, further reduce the time of obtaining the target driver of the target hardware board, and improve efficiency.

[0102] In some embodiments, based on the feature information and the correspondence table, obtaining a target driver corresponding to the target hardware board also includes:

[0103] The number of attribute information in the feature information is obtained, and the feature information items in the correspondence table are screened according to the number of attribute information to obtain a first matching feature information item set, and each attribute information in the feature information is matched with the feature information in the first matching feature information item set to obtain the target driver.

[0104] It should be noted that this embodiment is only applicable to the case where the characteristic device table includes all devices of the target hardware board and the attributes of all devices in the characteristic device table are extracted.

[0105] Please refer to Figure 8 , Figure 8 This is a flowchart of another driver adaptation method provided by some embodiments of the present application. In one embodiment of the present application, the characteristic information is a collection of attribute information of all characteristic devices in the characteristic device table, and the above-mentioned determination of the target driver corresponding to the target hardware board based on the target characteristic information and the corresponding relationship table includes the following steps.

[0106] S305: Match the feature information with the correspondence table to obtain a matching result.

[0107] S306: In response to the matching result indicating that there is a feature information entry matching the feature information in the correspondence table, a driver entry corresponding to the feature information is obtained and determined as a target driver.

[0108] In an embodiment of the present application, the feature information and the driver in the correspondence table can be stored in a mapped manner, so the corresponding driver can be quickly obtained according to the feature information. The embodiment of the present application obtains the target driver for the target hardware board based on the target feature information and the correspondence table, which helps to reduce the time for obtaining the target driver and improve the accuracy of the obtained target driver. In addition, the corresponding target driver can also be obtained using a pre-trained model, which can be trained to convergence based on a sample set containing the correspondence between the feature information and the driver. The corresponding driver can be obtained by inputting the target feature information into the model, and the driver is the target driver.

[0109] Please continue to refer to Figure 8 In some embodiments of the present application, the above-mentioned driver adaptation method also includes the following steps.

[0110] S307: In response to the matching result indicating that there is no feature information entry matching the feature information in the corresponding relationship, a reference driver is generated according to the feature information.

[0111] S308: Display the matching result and the reference driver, and prompt the user to configure the driver to generate the target driver.

[0112] S309: Install the target driver configured by the user on the target hardware board.

[0113] The corresponding relationship table stores characteristic information entries and driver entries of the hardware board, but in actual use scenarios, as the demand changes, the hardware board is often updated. Therefore, there may be a situation where the characteristic information entry that matches the characteristic information of the target hardware board does not exist in the corresponding relationship table. In view of the situation where there is no characteristic information matching the characteristic information entry of the target hardware board in the corresponding relationship table, the embodiment of the present application generates a reference driver corresponding to the target hardware board for user reference based on the characteristic information, displays the matching results and the reference driver, and prompts the user to configure the target driver so that all target hardware boards have corresponding target drivers, thereby realizing automatic adaptation of the driver of the hardware board. At the same time, the reference driver is generated and displayed to the user, and the user can also be prompted to confirm or modify the reference driver, which helps to reduce the time for the user to configure the target driver, thereby improving efficiency.

[0114] Please continue to refer to Figure 8 In some embodiments, the driver adaptation method further includes:

[0115] S310: storing the target driver configured by the user and the corresponding feature information into a corresponding relationship table.

[0116] This embodiment stores the feature information not existing in the correspondence table and the corresponding target driver into the correspondence table, so as to update the correspondence table, which helps to realize the automatic adaptation of the drivers of more hardware boards.

[0117] In some embodiments of the present application, the above-mentioned driver adaptation method is applied to an embedded system, and the embedded system is communicatively connected with the target hardware board through a standard interface.

[0118] The embodiment of the present application enables the embedded system and the hardware board to communicate via a standard interface, which helps to improve the compatibility and portability of the embedded system.

[0119] In some embodiments of the present application, the above driver adaptation method is applied to an embedded system, and extracting target feature information of a target hardware board includes: accessing hardware registers in the embedded system to extract feature information of the target hardware board.

[0120] The hardware register of the embedded system stores the characteristic information of all the hardware boards in the embedded system. The embodiment of the present application can quickly extract the characteristic information of the target hardware board by accessing the hardware register of the embedded system. In addition, the present application can also extract the characteristic information of the target hardware board by reading the basic input and output system information of the embedded system.

[0121] Second, please refer to Fig. 9 , Fig. 9 is a schematic diagram of the structure of a driver adapter device provided in an embodiment of the present application. The embodiment of the present application provides a driver adapter device 400, including:

[0122] A first extraction module 410 is used to extract characteristic information of a target hardware board, where the target hardware board is a board on which the embedded software is to be deployed;

[0123] A first acquisition module 420, configured to acquire a target driver corresponding to a target hardware board based on the feature information and a correspondence table, wherein the correspondence table includes a correspondence between feature information items and driver items;

[0124] The first installation module 430 is used to install the target driver on the target hardware board.

[0125] Please refer to Fig.10 , Fig.10 It is a structural diagram of a device for extracting characteristic information of a target hardware board provided in some embodiments of the present application. In some embodiments of the present application, the first extraction module 410 includes the following modules.

[0126] The second acquisition module 411 is used to acquire a characteristic device table corresponding to a target hardware board, where the characteristic device table records names of characteristic devices used to identify the target hardware board.

[0127] The first extraction module 410 is further configured to extract characteristic information of a target hardware board based on the characteristic device table.

[0128] Please refer to Fig.11 , Fig.11 It is a structural diagram of another device for extracting characteristic information of a target hardware board provided in some embodiments of the present application. In some embodiments of the present application, each device has corresponding attribute information, and the first extraction module 410 includes the following modules.

[0129] The screening module 412 is used to screen out the target characteristic device that can best identify the target hardware board from the characteristic device table.

[0130] The second extraction module 413 is used to extract target attribute information corresponding to the target characteristic device and use the target attribute information as characteristic information.

[0131] Please refer to Fig.12 , Fig.12 4 is a schematic diagram of the structure of another device for extracting characteristic information of a target hardware board provided in some embodiments of the present application. In some embodiments of the present application, the first extraction module 410 further includes:

[0132] The third extraction module 414 is used to access the hardware registers in the embedded system to extract target feature information of the target hardware board.

[0133] Please refer to Fig.13 , Fig.14 4 is a schematic diagram of a structure of another device for extracting characteristic information of a target hardware board provided in some embodiments of the present application. In some embodiments of the present application, each device has attribute information corresponding thereto, and the first extraction module 410 further includes:

[0134] The fourth extraction module 415 is used to extract the attribute information corresponding to all the characteristic devices in the characteristic device table to obtain an attribute information set.

[0135] The determination module 416 is used to determine the attribute information set as feature information.

[0136] Please refer to Fig.14 , Fig.14 is a schematic diagram of the structure of another driver adapter device provided by some embodiments of the present application. The characteristic information items in the corresponding relationship table have at least part of the same attribute information. The first acquisition module 420 includes:

[0137] A first matching module 421 is used for matching the attribute information of the feature device whose attribute information difference is greater than or equal to the preset value with the feature information entry in the correspondence table in response to the presence of the feature device in the feature device table whose attribute information difference is greater than or equal to the preset value;

[0138] The third acquisition module 422 is used to acquire the corresponding driver entry and determine it as the target driver when it is determined that the number of feature information entries matching the attribute information of a feature device whose difference degree of attribute information is greater than or equal to a preset value is 1.

[0139] Please refer to Fig.15 , Fig.15 It is a structural diagram of another driver adapter device provided by some embodiments of the present application. In some embodiments of the present application, each feature information entry in the correspondence table has at least part of the same attribute information, and the first acquisition module 420 further includes:

[0140] The second matching module 423 is used to match the attribute information of the first-ranked feature device with the feature information item in the correspondence table according to the name record order of the feature devices in the feature device table to obtain a matching feature information item set;

[0141] The fourth acquisition module 424 is used to match the attribute information of the feature device ranked in the latter position with the feature information items in the matching feature information item set corresponding to the attribute information of the feature device ranked in the former position, until the number of feature information items in the matching feature information item set is 1, obtain the corresponding driver item, and determine it as the target driver.

[0142] Please refer to Fig.16 , Fig.16 4 is a schematic diagram of the structure of another driver adapter device provided in some embodiments of the present application. The characteristic information is a collection of attribute information of all characteristic devices in the characteristic device table. The first acquisition module 420 further includes:

[0143] The third matching module 425 is used to match the feature information with the correspondence table to obtain a matching result;

[0144] The fifth acquisition module 426 is used to acquire a driver entry corresponding to the characteristic information in response to the matching result indicating that there is a characteristic information entry matching the characteristic information in the corresponding relationship table, and determine it as a target driver.

[0145] Please continue to refer to Fig.16 In some embodiments of the present application, the first acquisition module 420 also includes the following modules.

[0146] The generating module 427 is configured to generate a reference driver according to the characteristic information in response to the matching result indicating that there is no characteristic information entry matching the characteristic information in the corresponding relationship.

[0147] The display module 428 is used to display the matching results and the reference driver, and prompt the user to configure the driver to generate the target driver.

[0148] The second installation module 429 is used to install the target driver configured by the user on the target hardware board.

[0149] Please continue to refer to Fig.16 In some embodiments, the driver adaptation device 400 further includes: a storage module 440, which is used to store the target driver configured by the user and the corresponding feature information into a corresponding relationship table.

[0150] Please refer to Fig.17 , Fig.17 It is a structural diagram of an embedded system provided by an embodiment of the present application. On the third aspect, an embodiment of the present application also provides an embedded system 500, including an embedded processor 510 and a memory 520, the memory 520 stores a computer program, and the computer program is loaded by the embedded processor 510 to execute the steps in the driver adaptation method of any one of the above embodiments.

[0151] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0152] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A driver adaptation method, characterized in that: include: Extracting characteristic information of a target hardware board, wherein the target hardware board is a board on which the embedded software is to be deployed; Based on the characteristic information and the correspondence table, obtaining a target driver corresponding to the target hardware board, wherein the correspondence table includes a correspondence between characteristic information entries and driver entries; The target driver is installed on the target hardware board.

2. The driver adaptation method according to claim 1, characterized in that: The target hardware board includes several components, and the step of extracting characteristic information of the target hardware board includes: Obtaining a characteristic device table corresponding to the target hardware board, wherein the characteristic device table records names of characteristic devices for identifying the target hardware board; The characteristic information of the target hardware board is extracted based on the characteristic device table.

3. The driver adaptation method according to claim 2, characterized in that: Each of the devices has attribute information corresponding thereto, and the step of extracting the characteristic information of the target hardware board based on the characteristic device table includes: Filter out the target characteristic device that can best identify the target hardware board from the characteristic device table; Target attribute information corresponding to the target characteristic device is extracted, and the target attribute information is used as the characteristic information.

4. The driver adaptation method according to claim 2, characterized in that: Each of the devices has attribute information corresponding thereto, and the step of extracting the characteristic information of the target hardware board based on the characteristic device table includes: Extracting attribute information corresponding to all characteristic devices in the characteristic device table to obtain an attribute information set; The attribute information set is determined as the feature information.

5. The driver adaptation method according to claim 4, characterized in that: The attribute information of any two characteristic information items in the correspondence table is not completely the same, and obtaining the target driver corresponding to the target hardware board based on the characteristic information and the correspondence table includes: In response to the presence of a feature device in the feature device table whose attribute information has a difference greater than or equal to a preset value, matching the attribute information of the feature device whose attribute information has a difference greater than or equal to the preset value with the feature information entry in the correspondence table; when it is determined that the number of feature information entries that match the attribute information of a feature device whose attribute information has a difference greater than or equal to the preset value is 1, acquiring a driver entry corresponding thereto and determining it as a target driver; Alternatively, according to the order in which the names of the characteristic devices in the characteristic device table are recorded, the attribute information of the characteristic device ranked first is matched with the characteristic information entry in the correspondence table to obtain a set of matching characteristic information entries; Match the attribute information of the feature device ranked in the latter position with the feature information entries in the matching feature information entry set corresponding to the attribute information of the feature device ranked in the former position until the number of feature information entries in the matching feature information entry set is 1, obtain the corresponding driver entry, and determine it as the target driver.

6. The driver adaptation method according to claim 4, characterized in that: The characteristic information is a collection of attribute information of all characteristic devices in the characteristic device table, and obtaining a target driver corresponding to the target hardware board based on the characteristic information and the corresponding relationship table includes: Matching the characteristic information with the correspondence table to obtain a matching result; In response to the matching result indicating that there is characteristic information matching the characteristic information in the correspondence table, a driver corresponding to the characteristic information is acquired and determined as a target driver.

7. The driver adaptation method according to claim 6, characterized in that: The method further comprises: In response to the matching result indicating that there is no feature information matching the feature information in the correspondence table, generating a reference driver according to the feature information; Displaying the matching result and the reference driver, and prompting the user to configure the driver to generate a target driver; The target driver configured by the user is installed on the target hardware board.

8. The driver adaptation method according to claim 7, characterized in that: The method further comprises: The target driver configured by the user and the corresponding characteristic information are stored in the corresponding relationship table.

9. A driver adapter device, characterized in that: include: A first extraction module is used to extract characteristic information of a target hardware board, where the target hardware board is a board on which the embedded software is to be deployed; A first acquisition module, configured to acquire a target driver corresponding to the target hardware board based on the feature information and a correspondence table, wherein the correspondence table includes a correspondence between feature information entries and driver entries; The first installation module is used to install the target driver on the target hardware board.

10. An embedded system, characterized in that: It comprises an embedded processor and a memory, wherein the memory stores a computer program, and the computer program is loaded by the embedded processor to execute the steps in the driver adaptation method according to any one of claims 1 to 8.