Board card configuration method and device, medium and program product
By configuring the recommended model to process the attribute information of the target board, combined with the candidate templates in the preset configuration template library, the automation and efficiency of board configuration are achieved, and the problem of high maintenance costs of board configuration in the existing technology is solved.
Patent Information
- Application Number
- CN202510528563.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-25
AI Technical Summary
In the prior art, when configuring boards, configuration files need to be set for each board, and when configuring information is updated, all relevant configuration files need to be updated, resulting in high maintenance costs.
The configuration recommendation model is used to process the attribute information of the target board, and obtain the configuration recommendation type for the target board, and update the template according to the difference between the configuration recommendation type and the candidate template in the preset configuration template library to complete the board configuration.
By configuring the use of the recommended model, we ensure the rationality and accuracy of the board configuration, avoid the problem of high maintenance costs caused by configuration file updates, and improve the efficiency of template selection and use.
Smart Images

Figure CN120066596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technologies, and particularly to a method, device, medium, and program product for configuring a board card. Background Art
[0002] With the continuous development of hardware technologies, the versions and hardware configurations of computer hardware board cards have become increasingly complex. The software environments adapted by board cards of different versions and configurations are usually different. Therefore, when configuring the software environment for different board cards, it is usually necessary to perform targeted configuration with reference to the specific model, version, and hardware configuration of the board card. In related technologies, before configuring a board card, it is usually necessary to set a corresponding configuration file for each board card and save the configuration information required by the board card in the configuration file. When configuring the board card, the configuration file is determined according to the mapping relationship between the board card type and the configuration file, and the board card is configured according to the configuration information saved in the configuration file.
[0003] In the process of implementing the present invention, it is found that the related technologies have at least the following problems. Since the configuration information is saved in the configuration file of the board card, when the configuration information itself is updated, it is necessary to update all the configuration files including the configuration information, resulting in high maintenance costs. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method, device, medium, and program product for configuring a board card.
[0005] According to a first aspect of the present invention, there is provided a method for configuring a board card, including: processing the attribute information of a target board card obtained by using a configuration recommendation model to obtain a configuration recommendation type for the target board card, where the configuration recommendation model is trained by using the attribute information of a configured sample board card as a reference sample; determining a candidate template in a preset configuration template library whose configuration item difference from the configuration recommendation type meets a preset condition when it is determined that there is no configured template matching the configuration recommendation type in the preset configuration template library; and updating the candidate template based on configuration item components according to the configuration item difference between the configuration recommendation type and the candidate template to obtain a first target template, so as to configure the target board card according to the first target template.
[0006] The second aspect of the present invention provides a board configuration device, including: an information processing module, configured to process the attribute information of the target board obtained by using a configuration recommendation model to obtain a configuration recommendation type for the target board, wherein the configuration recommendation model is trained by using the attribute information of the configured sample boards as reference samples; a template determination module, configured to determine a candidate template in the preset configuration template library whose configuration item difference from the configuration recommendation type meets a preset condition when it is determined that there is no configured template matching the configuration recommendation type in the preset configuration template library; a template update module, configured to update the candidate template based on the configuration item components according to the configuration item difference between the configuration recommendation type and the candidate template to obtain a first target template, so as to configure the target board according to the first target template.
[0007] The third aspect of the present invention provides an electronic device, including: one or more processors; a memory, configured to store one or more computer programs, wherein the above one or more processors execute the above one or more computer programs to implement the steps of the above method.
[0008] The fourth aspect of the present invention further provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0009] The fifth aspect of the present invention further provides a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0010] According to an embodiment of the present invention, by using a configuration recommendation model, it is possible to select, from a large number of configuration items, a combination of configuration items that is most suitable for the attribute information of the target board, and obtain a configuration recommendation type, which can ensure the rationality and accuracy of the board configuration. At the same time, since the configuration recommendation model is used for configuration recommendation and determination, it is no longer necessary to determine the configuration according to a preset configuration file. In the case of an update of the configuration item itself, only the configuration item in the configuration recommendation model needs to be updated to complete the update of the configuration item in all configuration recommendation types, thereby reducing the maintenance cost. According to the configuration recommendation type, a candidate template whose configuration item difference from the configuration recommendation type meets a preset condition is selected from a preset configuration template library. Since the preset template is preset and stored in the preset configuration template library, no template construction is required for its selection, which improves the efficiency of template selection and use. Updating the candidate template according to the configuration item difference can ensure that the obtained first target template is the same as the configuration recommendation type, thereby ensuring the accuracy of the first target template. In addition, since the candidate template is the template in the preset configuration template library that is closest to the configuration recommendation type, the amount of operations required in the process of modifying the candidate template to obtain the first target template is the least, further improving the template construction efficiency and the board configuration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above content and other objects, features, and advantages of the present invention will become clearer through the following description of the embodiments of the present invention with reference to the accompanying drawings. In the drawings:
[0012] Figure 1 FIG. shows an application scenario diagram of a board configuration method, device, medium, and program product according to an embodiment of the present invention.
[0013] Figure 2 FIG. shows a flowchart of a board configuration method according to an embodiment of the present invention.
[0014] Figure 3 FIG. shows a schematic diagram of a configuration recommendation model of a board configuration method according to an embodiment of the present invention.
[0015] Figure 4 FIG. shows a flowchart of a board configuration method according to another embodiment of the present invention.
[0016] Figure 5 FIG. shows a structural block diagram of a board configuration device according to an embodiment of the present invention.
[0017] Figure 6 FIG. shows a block diagram of an electronic device suitable for implementing a board configuration method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, numerous specific details are set forth to provide a comprehensive understanding of the embodiments of the present invention. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0019] The terms used herein are merely for describing specific embodiments and are not intended to limit the present invention. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0020] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0021] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0022] Since the related art usually determines the configuration policy for a board by using the mapping relationship between the board and the configuration file, in the case of a new version or a new configured board, it is necessary to build a new configuration file for the board, resulting in low file building efficiency and high labor costs.
[0023] Embodiments of the present invention provide a board configuration method, including: processing the attribute information of the obtained target board by using a configuration recommendation model to obtain a configuration recommendation type for the target board, where the configuration recommendation model is trained by using the attribute information of the configured sample boards as reference samples; in the case of determining that there is no configured template matching the configuration recommendation type in the preset configuration template library, determining a candidate template in the preset configuration template library whose configuration item difference from the configuration recommendation type satisfies a preset condition; and updating the candidate template based on the configuration item components according to the configuration item difference between the configuration recommendation type and the candidate template to obtain a first target template, so as to configure the target board according to the first target template.
[0024] Figure 1The figure shows an application scenario diagram of a board configuration method, device, medium, and program product according to an embodiment of the present invention.
[0025] As Figure 1 shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. Among them, the first terminal device 101, the second terminal device 102, and the third terminal device 103 are each installed with a board. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0026] A user can insert a board into the first terminal device 101, the second terminal device 102, and the third terminal device 103, so as to interact with the server 105 through the network 104, receive or send messages, use the server 105 to analyze and process the attribute information of the boards inserted into the first terminal device 101, the second terminal device 102, and the third terminal device 103, and configure the environment of the boards.
[0027] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc.
[0028] The server 105 may be a server providing various services. The server 105 may include, for example, a processing engine such as a board configuration engine. Using the board configuration engine, the server 105 can analyze and process the attribute information of the boards inserted by the user into the first terminal device 101, the second terminal device 102, and the third terminal device 103, determine a target template adapted to the boards, and configure the boards.
[0029] It should be noted that the board configuration method provided by the embodiment of the present invention can generally be executed by the server 105. Correspondingly, the board configuration device provided by the embodiment of the present invention can generally be set in the server 105. The board configuration method provided by the embodiment of the present invention can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the board configuration device provided by the embodiment of the present invention can also be set in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0030] It should be understood that Figure 1 the number of terminal devices, networks, and servers in [[ ]] is merely illustrative. According to implementation requirements, there can be any number of terminal devices, networks, and servers.
[0031] Based on the scenario described below Figure 1 through [[ ]] Figures 2 to 4 a detailed description of the board configuration method of the invention embodiments will be given.
[0032] Figure 2 FIG. shows a flowchart of the board configuration method according to an embodiment of the present invention.
[0033] As [[ ]] Figure 2 shown, the board configuration method of this embodiment includes operations S210 to S230.
[0034] In operation S210, the attribute information of the obtained target board is processed by using a configuration recommendation model to obtain a configuration recommendation type for the target board.
[0035] According to an embodiment of the present invention, when configuring a newly added board in a computer, after connecting the target board to the computer, the attribute information of the target board can be obtained by using a hardware detection tool. Since the attribute information such as hardware parameters and driver versions of different types of boards is different, the software types and versions required or supported by different boards are also different. Therefore, the attribute information of the target board can be processed by using a configuration recommendation model to obtain a configuration recommendation type adapted to the target board. Among them, the configuration recommendation type can include one or more system software to be deployed to the target board and the versions of the corresponding system software, such as Compute Unified Device Architecture (CUDA) 10.2, python3.7, etc.
[0036] According to an embodiment of the present invention, the configuration recommendation model can be trained by using the attribute information of the configured sample boards as reference samples. Boards such as the target board and the sample board can include a circuit board installed with specific electronic components that undertake specific functions and are connected to the computer through an interface.
[0037] In operation S220, in the case where it is determined that there is no configured template in the preset configuration template library that matches the configuration recommendation type, a candidate template whose configuration item difference from the configuration recommendation type in the preset configuration template library satisfies a preset condition is determined.
[0038] According to an embodiment of the present invention, the preset configuration template library may include a plurality of pre-configured configured templates. Each configured template may include one or more configuration item components, and the configuration item components may be used to deploy a preset version of system software to a target board. The configured templates may be obtained by randomly combining or combining according to experience a plurality of configuration item components and added to the preset configuration template library. They may also be obtained by updating the obtained candidate templates during the historical operations of configuring the board using the board configuration method and added to the preset configuration template library.
[0039] According to an embodiment of the present invention, by analyzing the configuration recommendation type, one or more configuration item components included in the configuration recommendation type may be determined, and matching may be performed in the preset configuration template library according to the one or more configuration item components. In the case where the matching fails, it may be determined that there is no configured template in the preset configuration template library that matches the configuration recommendation type.
[0040] In this case, the configuration item differences between each configured template and the configuration recommendation type may be determined. The configuration item differences that meet the preset conditions are determined, and the corresponding configured template is determined as the candidate template.
[0041] In operation S230, according to the configuration item differences between the configuration recommendation type and the candidate template, the candidate template is updated based on the configuration item components to obtain a first target template, so as to configure the target board according to the first target template.
[0042] According to an embodiment of the present invention, since the candidate template is the template with the closest composition of configuration item components to the configuration recommendation type among the plurality of configured templates, but the candidate template does not match the configuration recommendation type, that is, there are differences between the candidate template and the configuration recommendation type. Therefore, by updating the candidate template, the updated first target template can be made to match the configuration recommendation type, so as to ensure that after the target board is configured according to the first target template, the configuration items installed in the target board match the configuration recommendation type.
[0043] According to an embodiment of the present invention, according to the configuration item differences between the configuration recommendation type and the candidate template, configuration item components may be added to or deleted from the candidate template to complete the update of the candidate template to eliminate the configuration item differences between the configuration recommendation type and the candidate template.
[0044] According to an embodiment of the present invention, by using a configuration recommendation model, it is possible to select, from a large number of configuration items, a combination of configuration items that is most suitable for the attribute information of a target board, and obtain a configuration recommendation type, which can ensure the rationality and accuracy of the board configuration. At the same time, since a configuration recommendation model is used for configuration recommendation and determination, it is no longer necessary to determine the configuration according to a preset configuration file. In the case of an update of the configuration item itself, only the configuration item in the configuration recommendation model needs to be updated to complete the update of the configuration item in all configuration recommendation types, thereby reducing the maintenance cost. According to the configuration recommendation type, a candidate template whose configuration item difference from the configuration recommendation type meets a preset condition is selected from a preset configuration template library. Since the preset template is preset and stored in the preset configuration template library, no template construction is required for its selection, improving the efficiency of template selection and use. Updating the candidate template according to the configuration item difference can ensure that the obtained first target template is the same as the configuration recommendation type, thereby ensuring the accuracy of the first target template. In addition, since the candidate template is the template in the preset configuration template library that is closest to the configuration recommendation type, the amount of operation required in the process of modifying the candidate template to obtain the first target template is the least, further improving the template construction efficiency and the board configuration efficiency.
[0045] According to an embodiment of the present invention, in the case where it is determined that there is no configured template in the preset configuration template library that matches the configuration recommendation type, determining a candidate template whose configuration item difference from the configuration recommendation type in the preset configuration template library meets a preset condition includes: determining the configuration item difference between the configuration recommendation type and each of a plurality of configured templates according to one or more configuration items included in the configuration recommendation type; and determining a configured template whose configuration item difference meets the preset condition as the candidate template.
[0046] According to an embodiment of the present invention, according to one or more configuration item components included in each of a plurality of configured templates and one or more configuration item components included in the configuration recommendation type, the configuration item difference between the plurality of configured templates and the configuration recommendation type can be determined respectively.
[0047] According to an embodiment of the present invention, a configured template whose configuration item difference meets a preset condition among the configuration item differences corresponding to each of the plurality of configured templates is determined as the candidate template. The preset condition may include that the number of differences in the configuration item difference is the smallest, and the number of differences in the configuration item difference is less than a preset difference value or a preset component ratio, where the number of differences may include the number of configuration item components that need to be modified when modifying the configured template according to the configuration recommendation type.
[0048] For example, when the configuration item components included in the configuration recommendation type are A and B, and the configuration item components included in the configured template are A and C, when modifying the configured template according to the configuration recommendation type, it is necessary to delete C in the configured template and add B to the configured template. It can be determined that the number of differences in the configuration items between the configured template and the configuration recommendation type is 2.
[0049] In one example, when the preset difference value is 3, it can be determined whether there are configuration item differences with a difference quantity less than 3 among the configuration item differences corresponding to multiple configured templates. If there are configuration item differences that meet the above conditions, select the configuration item difference with the smallest difference quantity from multiple configuration item differences, and determine the configured template corresponding to this configuration item difference as the candidate template.
[0050] According to the embodiments of the present invention, according to preset conditions, the configured template closest to the configuration recommendation type can be selected from the preset configured template library as the candidate template, so that the number of modifications required for subsequent updating of the candidate template is minimized, improving the efficiency and accuracy of board configuration.
[0051] Since the number of configuration item components included in different configuration recommendation types can be different, when there are large differences in the configuration item components, it is easy to have large differences when using the same preset difference value to control the selection of candidate templates.
[0052] For example, when the first configuration recommendation type includes 50 configuration item components, the second configuration recommendation type includes 5 configuration item components, and the preset difference value is 5, the candidate template of the first configuration recommendation type needs to have at least 45 identical configuration item components with the first configuration recommendation type. In this case, compared with directly constructing the first target template using the configuration item components, the method of modifying the candidate template to obtain the first target template can save a large amount of operations. However, since the number of configuration item components in the second configuration recommendation type is the same as the preset difference value, any configured template can be used as the candidate template of the second configuration recommendation type. In this case, to modify the candidate template to obtain the first target template, it is necessary to delete the configuration item components in the candidate template and then add the 5 configuration item components in the second configuration recommendation type. The operation amount of this process is larger than the operation amount of directly constructing the first target template using the configuration item components.
[0053] Therefore, in another example, the preset difference value of the configuration recommendation type can be determined according to the preset component ratio and the configuration recommendation type. For example, when the preset difference value is 20% and the configuration recommendation type includes 25 configuration item components, the preset difference value of this configuration recommendation type is 20% × 25 = 5. It can be determined whether there is a configuration item difference with a difference quantity less than 5 among the configuration item differences corresponding to each of the multiple configured templates. In the case where there is no configuration item difference that meets the above conditions, it can be determined that when using the current configured template as the candidate template, the number of configuration item components that need to be modified to update the candidate template is relatively large. In this case, instead of using the configured template, one or more configuration item components can be selected from multiple configuration item components according to the configuration recommendation type, and combined to obtain the first target template.
[0054] By controlling the size of the preset difference value through the preset component ratio, it is possible to ensure that, for any configuration recommendation type, the amount of operation required for the process of modifying the candidate template selected according to the preset difference value to obtain the first target template is less than the amount of operation of directly constructing the first target template using the configuration item components. Therefore, the preset difference value obtained using the preset component ratio has stronger universality.
[0055] According to an embodiment of the present invention, updating the candidate template based on the configuration item components according to the configuration item difference between the configuration recommendation type and the candidate template to obtain the first target template includes: determining one or more configuration item components according to the configuration item difference; adding the one or more configuration item components to the candidate template to obtain the first target template.
[0056] According to an embodiment of the present invention, in the case where the configuration item difference indicates that there are configuration item components included in the configuration recommendation type but not in the candidate template, one or more configuration item components are determined according to the configuration item difference, and the determined configuration item components are added to the candidate template to obtain the first target template.
[0057] According to an embodiment of the present invention, in the case where there are no configuration item components in the configuration item difference, it indicates that there is no difference between the configuration recommendation type and the candidate template, that is, the candidate template includes and only includes all the configuration item components included in the configuration recommendation type. Therefore, the candidate template can be directly determined as the first target template.
[0058] According to another embodiment of the present invention, in the case where the configuration item difference indicates that there are configuration item components included in the candidate template but not in the configuration recommendation type, one or more configuration item components are determined according to the configuration item difference, and the determined configuration item components are deleted from the candidate template to obtain the first target template.
[0059] According to another embodiment of the present invention, in the case where the configuration item difference representation candidate template includes configuration item components that do not exist in the configuration recommendation type, and the configuration recommendation type includes configuration item components that do not exist in the candidate template, according to the configuration item difference, respectively determine that the candidate template includes configuration item components that do not exist in the configuration recommendation type and the configuration recommendation type includes configuration item components that do not exist in the candidate template, delete the configuration item components in the candidate template that are more than those in the configuration recommendation type, and add the configuration item components in the configuration recommendation type that are more than those in the candidate template to the candidate template to obtain the first target template.
[0060] According to an embodiment of the present invention, according to the configuration item difference between the configuration recommendation type and the candidate template, determine the configuration item components with differences between the two, add the configuration item components in the configuration recommendation type that are more than those in the candidate template to the candidate template, and delete the configuration item components in the candidate template that are more than those in the configuration recommendation type from the candidate template, so that the obtained first target template includes and only includes all the configuration item components in the configuration recommendation type. By operating on the candidate template closest to the configuration recommendation type, the amount of operations in the process of constructing the first target template can be reduced, thereby improving the efficiency of template construction.
[0061] According to an embodiment of the present invention, the configuration recommendation model is deployed in the board configuration engine and includes a decision-making layer and an output layer; the attribute information of the target board is processed by the configuration recommendation model to obtain the configuration recommendation type for the target board, including: inputting the attribute information of the target board into the decision-making layer to obtain the matching degree between the sub-attributes of the attribute information and the decision-making nodes in the decision-making layer; according to the matching degree, traverse multiple decision-making nodes in the decision-making layer to obtain the decision result corresponding to the attribute information; output the configuration recommendation type corresponding to the decision result through the output layer.
[0062] According to an embodiment of the present invention, the configuration recommendation model can be deployed in the board configuration engine so that when a computer accesses a new board, the board configuration engine can be used to perform centralized configuration recommendation and configuration loading for the board. Reduce other
[0063] According to an embodiment of the present invention, input the attribute information of the target board into the value decision-making layer, and through the tree structure of the decision tree in the decision-making layer, match the attribute information with multiple decision-making nodes in sequence. In the matching process, the system calculates the matching degree between the attribute information and each decision-making node and gradually traverses the nodes in the decision tree. In addition, since each decision-making node in the decision tree corresponds to a value range of a sub-attribute, the system can determine the value range to which it belongs according to the specific value of each sub-attribute in the attribute information, so as to select the corresponding decision-making node for matching. This method not only realizes the accurate traversal of the decision-making nodes, but also ensures the logic and efficiency of the matching process, providing a reliable basis for subsequent decision-making.
[0064] According to an embodiment of the present invention, after traversing the decision tree based on the attribute information, the corresponding leaf node in the decision tree is determined, and this leaf node is used as the final decision result. By determining the configuration recommendation type corresponding to the leaf node, and using the output layer of the configuration recommendation model to output the configuration recommendation type.
[0065] According to an embodiment of the present invention, using the decision tree as the decision layer to determine the configuration recommendation type suitable for the target board according to the attribute information of the target board can ensure the accuracy and logic of the configuration recommendation process, provide a reliable basis for the configuration loading of the target board, improve the automation degree of board configuration, and improve the user experience and configuration efficiency.
[0066] According to an embodiment of the present invention, the configuration recommendation model can be trained in the following manner: when it is determined that the attribute information of the heterogeneous board different from the target board obtained from the board configuration engine meets the predetermined conditions, the reference sample and the attribute information of the heterogeneous board are equally divided to obtain multiple sample data sets; the following operations are repeatedly executed until all the multiple sample data sets are selected as the validation set to obtain multiple validation results: select one of the multiple sample data sets as the validation set, and the rest as the training set; use the training set to train the initial configuration recommendation model to obtain the first prediction model; use the validation set to verify the prediction accuracy of the first prediction model to obtain the validation result; determine the first prediction model with the prediction accuracy reaching the preset value among the multiple validation results as the configuration recommendation model.
[0067] According to an embodiment of the present invention, the sample information includes the attribute information of the heterogeneous board and the attribute information of the target board, where the attribute information of the heterogeneous board is different from that of the target board. According to the attribute information of the heterogeneous board, it is determined whether the attribute information of the heterogeneous board obtained from the board configuration engine meets the predetermined conditions. If the predetermined conditions are met, the reference sample and the attribute information of the sample board are equally divided into multiple sample data sets. For example, when the ratio of the collected heterogeneous board samples to the target board samples is 3:1, the sample information can be divided into multiple sample data sets such that the ratio of the heterogeneous board samples to the target board samples in each sample data set is 3:1, all the heterogeneous board samples and all the target board samples are respectively divided into the sample data sets, and the data in the multiple sample data sets do not intersect. This division method ensures the balance of data distribution and provides diverse data support for model training.
[0068] According to an embodiment of the present invention, after the division of the sample data sets is completed, one of the data sets is selected as the validation set, and the rest of the data sets are used as the training set for training the initial configuration recommendation model. For example, in the case of including D 1 、D 2 、D3 , D 4 In the case of four sample data sets, D 2 can be selected as the validation set, and the remaining data sets, namely D 1 , D 3 , D 4 are used as the training set. The initial configuration recommendation model is trained using the training set respectively to obtain three decision trees as the first prediction model. The validation set D 2 is input into the first prediction model, and the prediction accuracy of the first prediction model is determined according to the output result of the first prediction model and the label of the validation set. The prediction accuracy of the first prediction model is used as the validation result.
[0069] According to the embodiments of the present invention, multiple sample data sets can be used to train the initial configuration recommendation model. Each sample data set is used as the validation set respectively, and the remaining sample data sets other than the validation set are used as the training set. The initial configuration recommendation model is trained using the training set respectively to obtain multiple first prediction models. The prediction accuracy of the first prediction model is calculated using the validation set corresponding to the first prediction model respectively. According to the multiple prediction accuracies and the preset value, a configuration recommendation model is determined from the multiple first prediction models. Among them, the preset value can be taken as 1, that is, a model with a prediction accuracy reaching 1 is selected from the multiple first prediction models as the configuration recommendation model. If there is no model with a prediction accuracy of 1, the first recommendation model with the highest prediction accuracy can be selected as the configuration recommendation model.
[0070] According to the embodiments of the present invention, by partitioning the data set in the above manner, multiple sample data sets are obtained, and the data set composed of attribute information can be partitioned in various ways to obtain diversified sample data sets, thereby ensuring the balance of data distribution and providing diversified data support for model training. Training the initial configuration recommendation model using the diversified sample data sets can evaluate the performance of the model through cross-validation, provide a reliable basis for subsequent model optimization, and further improve the robustness of the model.
[0071] According to an embodiment of the present invention, training an initial configuration recommendation model using a training set to obtain a first prediction model includes: determining information gain for sub-attributes according to the types of sub-attributes of the attribute information in the training set to obtain a plurality of gain values; sorting the plurality of gain values to determine a splitting attribute of a root node in an initial decision tree; dividing the training set into a plurality of sub-datasets according to a plurality of attribute value ranges of the splitting attribute, wherein a child node of the decision tree represents a sub-dataset; when it is determined that the sub-dataset is divisible, determining gain values of one or more sub-attributes in the child node; re-determining a splitting attribute of one or more sub-attributes according to the gain values of the one or more sub-attributes; further dividing the sub-dataset according to the re-determined splitting attribute; when it is determined that the sub-dataset is not divisible, using the obtained target decision tree as a decision layer.
[0072] According to an embodiment of the present invention, during the training of the initial configuration recommendation model, the information gain of each training set can be calculated according to the board type of the attribute information in the training set, wherein the information gain can be calculated and represented using cross entropy.
[0073] According to an embodiment of the present invention, based on the information gain of the training set, the gain values of each sub-attribute in the attribute information are calculated. The calculated plurality of gain values are sorted, and the sub-attribute with the largest gain value is selected as the splitting attribute of the root node. For example, when the gain value of the board storage capacity is the largest, the board storage capacity can be used as the splitting attribute of the root node, that is, the first-level node.
[0074] According to an embodiment of the present invention, the training set is divided into a plurality of sub-datasets according to different attribute value ranges of the splitting attribute, and corresponding child nodes are generated. For example, taking the board storage capacity as the splitting attribute of the root node as an example, three child nodes of "less than or equal to 8G", "greater than 8G and less than 32G", and "greater than or equal to 32G" can be obtained according to the board storage capacity, and the training set is divided into sub-datasets corresponding to the child nodes. On each child node, the gain values of the remaining sub-attributes are recalculated based on the sub-dataset, and the sub-attribute with the largest gain value is selected as the new splitting attribute to construct the next-level child node. This process is recursively performed until the stop condition is met, that is, the sub-dataset corresponding to the newly obtained child node is no longer divisible.
[0075] Figure 3 FIG. shows a schematic diagram of a configuration recommendation model of a board configuration method according to an embodiment of the present invention.
[0076] As Figure 3As shown in the figure, under the root node 310 of the target decision tree, the board storage capacity can be used as the splitting attribute. The value range of the splitting attribute can be divided into three intervals, namely (0, 8G], (8G, 32G), and [32G, +∞). The above three intervals correspond to the first-level node 321, the first-level node 322, and the first-level node 323 respectively. Calculate the sub-attribute gain value of the sub-dataset in the first-level node, and determine that the splitting attribute of the next layer is the bandwidth. The value range of the bandwidth can be divided into (0, 192GB / s], (192 GB / s, 300 GB / s), [300GB / s,1TB / s), and [1TB / s, +∞). The above four intervals correspond to the second-level node 331, the second-level node 332, the second-level node 333, and the second-level node 334 respectively. In the figure, only the child nodes of the first-level node 322 are taken as an example. The division methods of the child nodes of the first-level node 321 and the first-level node 323 are the same as those of the child nodes of the first-level node 322. Similarly, continue to calculate the sub-attribute gain value of the sub-dataset in the second-level node, and determine that the splitting attribute of the next layer is the power. The value range of the power can be divided into (0, 225W], (225W, 355W), [355W, 800W), and [800W, +∞). The above four intervals correspond to the third-level node 341, the third-level node 342, the third-level node 343, and the third-level node 344 respectively.
[0077] And so on, until after re-dividing to obtain child nodes, all sub-attributes in the training set have been traversed, or the gain values of the sub-attributes are all 0, it can be determined that the sub-dataset corresponding to the newly obtained child node cannot be divided any further, and stop dividing to obtain the target decision tree.
[0078] In Figure 3 the target decision tree shown, the leaf node 351 of the target decision tree corresponds to the configuration recommendation type a, the leaf node 352 corresponds to the configuration recommendation type b, the leaf node 353 corresponds to the configuration recommendation type c, and the leaf node 354 corresponds to the configuration recommendation type d.
[0079] According to the embodiments of the present invention, calculating the cross-entropy as the information gain according to the board type corresponding to different attribute information and the sample quantity of each board type in the training set can quantify the distribution of different board types in the training set and provide data support for subsequent model training. Selecting the splitting attribute of the root node and the child nodes of the root node in the decision tree according to the gain values of each sub-attribute can enable the decision tree to preferentially process the attributes that have the largest proportion and influence on the classification result, thereby improving the classification performance of the model. Recursively perform the above division process until the sub-dataset corresponding to the newly obtained child node is no longer divisible, and then stop dividing to obtain the decision tree. Through the recursive division method, a complete decision tree structure can be gradually constructed, providing an efficient decision logic for the system recommendation model.
[0080] According to an embodiment of the present invention, information gain determination is performed on sub - attributes according to the types of sub - attributes of the attribute information in the training set, and a plurality of gain values are obtained, including: dividing the training set according to the board types of each sample board in the training set to obtain a plurality of sub - training sets; for each sub - training set, respectively determining the intermediate gain values of a plurality of sub - attributes in the attribute information; and summing the intermediate gain values of the same sub - attribute in a plurality of sample sets to obtain the gain value of the sub - attribute.
[0081] According to an embodiment of the present invention, when calculating the gain values of each sub - attribute, the board types can be distinguished and calculations are performed separately for different board types. The training set is divided according to different types of sample boards of each attribute information in the training set to obtain a plurality of sample sets. For each sample set, respectively calculate the intermediate gain values of a plurality of sub - attributes in the attribute information, where the intermediate gain values include the gain values of the same sub - attribute in different types of boards and within different ranges of attribute values. Summing the intermediate gain values of the same sub - attribute in a plurality of sample sets can obtain the final gain value of the sub - attribute. Among them, the intermediate gain value and the final gain value can be calculated by means of cross - entropy.
[0082] According to an embodiment of the present invention, by calculating the gain value of each sub - attribute, the contribution of each sub - attribute to the classification result can be quantified, thereby providing a basis for the model to select the optimal partitioning attribute.
[0083] According to an embodiment of the present invention, the board configuration method further includes: in the case where it is determined that the prediction accuracies of a plurality of first prediction models are all less than a preset value, re - performing equal - ratio partitioning on the attribute information of the reference sample and the attribute information of the sample board to obtain a plurality of updated data sets; using the plurality of updated data sets to train and verify the initial configuration recommendation model until the verification times reach the preset times, or the prediction accuracy of the second prediction model obtained by training reaches the preset value; in the case where it is determined that the verification times reach the preset times and the prediction accuracies of the plurality of second prediction models obtained by training are all less than the preset value, determining the configuration recommendation model from the plurality of second prediction models according to the prediction accuracies of the plurality of second prediction models.
[0084] According to an embodiment of the present invention, after detecting the prediction accuracies of a plurality of first prediction models, if it is found that the prediction accuracies of all first prediction models are less than preset value 1, re - perform equal - ratio partitioning on the attribute information of the reference sample and the external server to generate a plurality of updated data sets. Specifically, randomly shuffle the sample data constituting the above - mentioned D 1 、D 2 、D 3 、D 4 to obtain D 1 ’、D 2 ’、D 3 ’、D4 Four updated data sets, and based on the updated data sets, the initial configuration recommendation model is trained according to the above training method to obtain a second prediction model.
[0085] According to an embodiment of the present invention, the second prediction model is verified. When it is determined that the prediction accuracy rate reaches a preset value, that is, 100%, the second prediction model with a prediction accuracy rate of 100% can be determined as the configuration recommendation model. When it is determined that the prediction accuracy rate still does not reach the preset value, the above process can be continued to obtain an updated data set, and based on the updated data set, the initial configuration recommendation model is trained according to the above training method to obtain a new second prediction model, and the iterative training is performed until the prediction accuracy rate of the new second prediction model reaches the preset value.
[0086] According to an embodiment of the present invention, when multiple second prediction models do not reach the preset value and the verification times have reached the preset times, the prediction accuracy rates of the multiple second prediction models are sorted, and the second prediction model with the highest prediction accuracy rate is selected as the configuration recommendation model.
[0087] According to an embodiment of the present invention, through iterative training and using the preset value to control and judge the prediction accuracy rate of the second prediction model, the prediction accuracy rate of the configuration recommendation model can reach the requirement, thereby improving the accuracy rate of the configuration recommendation type obtained according to the configuration recommendation model. When the prediction accuracy rates of the second prediction models obtained through multiple trainings do not reach the preset value and the number of training times or verification times has reached the preset times, the second prediction model with the highest prediction accuracy rate is selected from the currently obtained multiple second prediction models as the configuration recommendation model, which can reduce the number of training rounds and improve the model training efficiency on the premise of ensuring the recommendation accuracy rate of the configuration recommendation model.
[0088] According to an embodiment of the present invention, the board configuration method further includes: for multiple target configuration item components included in the first target template, configuration statements corresponding to the target configuration item components are respectively constructed; and the target board is configured based on the multiple configuration statements.
[0089] According to an embodiment of the present invention, the first target template is parsed to determine multiple target configuration item components included in the first target template. For each target configuration item component, a configuration statement corresponding to the target configuration item component is respectively constructed. For example, when the target configuration item component is Python 3.7 version, the corresponding configuration statement can be "winget install --id Python.Python.3.7 -e".
[0090] According to an embodiment of the present invention, after constructing a configuration statement for each target configuration item component, a plurality of configuration statements are stored in a command file for board configuration, and a plurality of commands in the command file are executed in sequence. After all the commands are executed, the configuration of the target board is completed.
[0091] According to an embodiment of the present invention, after determining the first target template, configuration statements are automatically generated based on the target configuration item components in the first target template and the configuration statements are automatically executed to complete the configuration of the target board. The automation degree of the board configuration process is improved, the configuration efficiency is improved, and manual operations are reduced, thereby improving the configuration accuracy.
[0092] According to an embodiment of the present invention, the board configuration method further includes: using the configured target board to execute a target task to obtain an execution result; generating a determination instruction when it is determined that the execution result is normal and the execution time is less than a time threshold; generating a modification instruction when it is determined that the execution result is abnormal or the execution time is not less than the time threshold.
[0093] According to an embodiment of the present invention, since different boards have different hardware parameters, driver versions and other attribute information, boards with different attribute information have the hardware conditions to execute different tasks. After the target board is correctly configured, the configured target board can have the software environment for executing the target task. Therefore, the configured target board has the hardware conditions and software environment for executing the target task, and the configured target board can be used to execute the target task.
[0094] According to an embodiment of the present invention, since there is a corresponding relationship between the target board and the target task, the target board must have the hardware conditions for executing the target task. When using the configured target board to execute the target task and the obtained execution result is abnormal or the execution result indicates that the execution time is not less than the time threshold, it means that the target board cannot execute or cannot complete the execution of the target task within the time threshold. It can be determined that after the target board is configured according to the first target template, the software environment for executing the target task is not constructed. Therefore, generating a modification instruction means that the first target template needs to be modified.
[0095] According to an embodiment of the present invention, when using the configured target board to execute the target task and the obtained execution result is normal and the execution time is less than the time threshold, it means that the current target board already has the ability to execute the target task that meets the requirements. Therefore, generating a determination instruction means that the first target template does not need to be modified.
[0096] According to an embodiment of the present invention, after completing the configuration of the target board, the target board is used to execute the target task, and the configuration result is tested according to the execution result, so that the performance of the configured target board and the ability to execute tasks can be judged more intuitively. In the case where the performance of the target board and the ability to execute tasks do not meet the requirements, a modification instruction is generated for subsequent modification of the configuration of the target board. This improves the accuracy of board configuration and ensures the performance of the target board after configuration is completed.
[0097] According to an embodiment of the present invention, the board configuration method further includes: in response to the modification instruction, searching in the preset configuration template library for a configured template that can execute the target task and whose execution time is less than the time threshold as the second target template; generating a configuration modification suggestion according to the configuration item difference between the second target template and the first target template.
[0098] According to an embodiment of the present invention, in the case of generating a modification instruction, in response to the modification instruction, a configured template that can execute the target task and whose execution time is less than the time threshold is selected from multiple configured templates in the preset configuration template library and determined as the second target template. The second target template can build a software environment for the board to execute the target task.
[0099] According to an embodiment of the present invention, after determining the second target template, the second target template is parsed to determine multiple configuration item components included in the second target template, and it is judged whether each configuration item component matches the attribute information such as the hardware parameters of the target board, that is, it is determined whether the target board supports installing the system software of the version corresponding to the configuration item component.
[0100] According to an embodiment of the present invention, in the case where it is determined that the target board matches all the configuration item components included in the second target template, it means that the target board can install all the configuration item components in the second target template. Therefore, the configuration item difference between the second target template and the first target template can be determined, and a configuration modification suggestion can be further generated.
[0101] According to an embodiment of the present invention, the board configuration method further includes: modifying the configuration of the target board based on the configuration modification suggestion; using the target board with the modified configuration to execute the target task; in the case where it is determined that the target task can be correctly executed and the execution time is less than the time threshold, updating the first target template with the second target template.
[0102] According to an embodiment of the present invention, after determining the second target template, the target board can be directly configured according to the second target template. It is also possible to add and delete configuration item components on the configured target board, so as to change the configuration item components in the first target template to the configuration item components in the second target template.
[0103] According to an embodiment of the present invention, since the configuration modification suggestion includes the configuration item differences between the second target template and the first target template, corresponding configuration item components can be selected according to the configuration item differences, installed on the target board, deleted from the target board, or the version of the installed components on the target board can be updated.
[0104] According to an embodiment of the present invention, after the configuration of the target board is modified, the target task is executed using the target board with the modified configuration. When the execution result is normal and the execution time is less than the time threshold, it indicates that after the target board is configured using the second target template, the target board can execute the target task correctly and quickly. Therefore, the first target template saved in the decision tree can be updated so that when making a configuration recommendation for the target board configuration subsequently, the second target template can be output.
[0105] According to an embodiment of the present invention, when the first target template needs to be modified, selecting the second target template that meets the requirements of the target task from the preset configuration template library can ensure that after the configuration of the target board is modified according to the subsequent generated configuration modification suggestion, the modified configuration can correctly execute the target task with compliant performance. In addition, since the target board has been configured according to the first target template, the method of changing the configuration item components in the first target template has higher configuration efficiency.
[0106] Figure 4 The flowchart of a board configuration method according to another embodiment of the present invention is shown.
[0107] As Figure 4 shown, the board configuration method process includes operations S401 to S413.
[0108] In operation S401, a first target template is determined. Among them, the first target template can be determined through the Figure 2 process.
[0109] In operation S402, a plurality of target configuration item components are determined according to the first target template.
[0110] In operation S403, a command file is constructed according to the configuration statements corresponding to the target configuration components.
[0111] In operation S404, the command file is executed to configure the target board based on the command file.
[0112] In operation S405, the target task is executed using the target board.
[0113] In operation S406, based on the execution result of the target task, it is determined whether the target task is correctly executed and the execution time is less than the time threshold. If so, operation S407 is executed; if not, operation S408 is executed.
[0114] In operation S407, a determination instruction is generated, indicating that the first target template is adapted to the target board, and after configuring the target board according to the first target template, the target board can execute the target task and the performance meets the standard.
[0115] In operation S408, a modification instruction is generated, indicating that the first target template needs to be modified so that the target board can correctly execute the target task and ensure that the execution time is less than the time threshold.
[0116] In operation S409, a second target template is determined from the preset configuration template library, and the configuration of the target board is modified according to the second target template.
[0117] In operation S410, the target task is executed using the modified target board.
[0118] In operation S411, based on the execution result of the target task, it is determined whether the target task is correctly executed and the execution time is less than the time threshold. If so, operation S412 is executed; if not, operation S413 is executed.
[0119] In operation S412, it is determined that the target board after configuration modification can execute the target task and the performance meets the standard, and the first target template is updated using the second target template.
[0120] In operation S413, an alarm is sent to the configuration administrator so that the configuration administrator can intervene in a timely manner and analyze the attribute information of the target board to solve the configuration problem of the target board.
[0121] Based on the above board configuration method, the present invention also provides a board configuration device. The following will be combined with Figure 5 This device will be described in detail.
[0122] Figure 5 The structural block diagram of the board configuration device according to an embodiment of the present invention is shown.
[0123] As Figure 5 shown, the board configuration device 500 of this embodiment includes an information processing module 510, a template determination module 520, and a template update module 530.
[0124] The information processing module 510 is used to process the obtained attribute information of the target board using the configuration recommendation model to obtain the configuration recommendation type for the target board. Among them, the configuration recommendation model is trained using the attribute information of the configured sample boards as reference samples. In one embodiment, the information processing module 510 can be used to perform the operation S210 described above, which will not be elaborated here.
[0125] The template determination module 520 is used to determine a candidate template in the preset configuration template library whose configuration item difference from the configuration recommendation type meets the preset condition when it is determined that there is no configured template in the preset configuration template library that matches the configuration recommendation type. In one embodiment, the template determination module 520 can be used to perform the operation S220 described above, which will not be elaborated here.
[0126] The template update module 530 is used to update the candidate template based on the configuration item components according to the configuration item difference between the configuration recommendation type and the candidate template to obtain the first target template, so as to configure the target board according to the first target template. In one embodiment, the template update module 530 can be used to perform the operation S230 described above, which will not be elaborated here.
[0127] According to an embodiment of the present invention, the template determination module 520 includes a difference determination sub-module and a template determination sub-module.
[0128] The difference determination sub-module is used to determine the configuration item difference between the configuration recommendation type and each of the multiple configured templates according to one or more configuration items included in the configuration recommendation type.
[0129] The template determination sub-module is used to determine the configured template whose configuration item difference meets the preset condition as the candidate template.
[0130] According to an embodiment of the present invention, the template update module 530 includes a component determination sub-module and a component addition sub-module.
[0131] The component determination sub-module is used to determine one or more configuration item components according to the configuration item difference, where the configuration item components are used to deploy the system software of the preset version to the target board.
[0132] The component addition sub-module is used to add one or more configuration item components to the candidate template to obtain the first target template.
[0133] According to an embodiment of the present invention, the information processing module 510 includes a matching degree determination sub-module, a node traversal sub-module, and a type determination sub-module.
[0134] The matching degree determination sub-module is used to input the attribute information of the target board into the decision layer to obtain the matching degree between the sub-attributes of the attribute information and the decision nodes of the decision layer.
[0135] A node traversal sub-module, configured to traverse multiple decision nodes in a decision layer according to a matching degree, so as to obtain a decision result corresponding to attribute information.
[0136] A type determination sub-module, configured to output a configuration recommendation type corresponding to the decision result through an output layer.
[0137] According to an embodiment of the present invention, the board configuration device 500 further includes an information division module, a data set division module, a model training module, a model verification module, and a model selection module.
[0138] The information division module is configured to, when it is determined that the attribute information of a heterogeneous board different from the target board obtained from the board configuration engine meets a predetermined condition, perform proportional division on the reference sample and the attribute information of the heterogeneous board to obtain a plurality of sample data sets.
[0139] The data set division module is configured to select one of the plurality of sample data sets as a verification set, and the rest as a training set.
[0140] The model training module is configured to train an initial configuration recommendation model by using the training set to obtain a first prediction model.
[0141] The model verification module is configured to verify the prediction accuracy of the first prediction model by using the verification set to obtain a verification result.
[0142] The model selection module is configured to determine, as a configuration recommendation model, the first prediction model whose prediction accuracy reaches a preset value among the multiple verification results.
[0143] According to an embodiment of the present invention, the model training module includes a gain determination sub-module, a gain sorting sub-module, a data set division sub-module, an iterative training sub-module, and a model determination sub-module.
[0144] The gain determination sub-module is configured to determine information gain for sub-attributes according to the types of sub-attributes of the attribute information in the training set, so as to obtain a plurality of gain values.
[0145] The gain sorting sub-module is configured to sort the plurality of gain values to determine a splitting attribute of a root node in an initial decision tree.
[0146] The data set division sub-module is configured to divide the training set into a plurality of sub-data sets according to multiple attribute value ranges of the splitting attribute, where sub-nodes of the decision tree represent the sub-data sets.
[0147] An iterative training sub-module, configured to, when it is determined that the sub-dataset is divisible, determine the gain values of one or more sub-attributes in the sub-nodes; re-determine the splitting attributes of the one or more sub-attributes according to the gain values of the one or more sub-attributes; and further divide the sub-dataset according to the re-determined splitting attributes.
[0148] A model determination sub-module, configured to, when it is determined that the sub-dataset is not divisible, use the obtained target decision tree as the decision layer.
[0149] According to an embodiment of the present invention, the gain determination sub-module includes a dataset division unit, an intermediate value determination unit, and a gain summation unit.
[0150] The dataset division unit is configured to divide the training set according to the board types of the sample boards in the training set to obtain a plurality of sub-training sets.
[0151] The intermediate value determination unit is configured to respectively determine the intermediate gain values of a plurality of sub-attributes in the attribute information for each sub-training set.
[0152] The gain summation unit is configured to sum the intermediate gain values of the same sub-attribute in a plurality of sample sets to obtain the gain value of the sub-attribute.
[0153] According to an embodiment of the present invention, the board configuration device 500 further includes an information re-division module, a model re-training module, and a model re-determination module.
[0154] The information re-division module is configured to, when it is determined that the prediction accuracies of a plurality of first prediction models are all less than a preset value, re-perform proportional division on the attribute information of the reference samples and the attribute information of the sample boards to obtain a plurality of updated datasets.
[0155] The model re-training module is configured to use the plurality of updated datasets to train and verify the initial configuration recommendation model until the number of verification times reaches a preset number, or the prediction accuracy of the second prediction model obtained by training reaches a preset value.
[0156] The model re-determination module is configured to, when it is determined that the number of verification times reaches a preset number and the prediction accuracies of the plurality of second prediction models obtained by training are all less than a preset value, determine the configuration recommendation model from the plurality of second prediction models according to the prediction accuracies of the plurality of second prediction models.
[0157] According to an embodiment of the present invention, the board configuration device 500 further includes a statement construction module and a board configuration module.
[0158] The statement construction module is configured to respectively construct configuration statements corresponding to the target configuration item components for the plurality of target configuration item components included in the first target template.
[0159] The board configuration module is used to configure the target board based on multiple configuration statements.
[0160] According to an embodiment of the present invention, the board configuration device 500 further includes a task execution module, a first instruction generation module, and a second instruction generation module.
[0161] The task execution module is used to execute the target task by using the configured target board to obtain an execution result.
[0162] The first instruction generation module is used to generate a determination instruction when it is determined that the execution result is normal and the execution time is less than the time threshold.
[0163] The second instruction generation module is used to generate a modification instruction when it is determined that the execution result is abnormal or the execution time is not less than the time threshold.
[0164] According to an embodiment of the present invention, the board configuration device 500 further includes a template re-determination module and a suggestion generation module.
[0165] The template re-determination module is used to, in response to the modification instruction, search in the preset configuration template library for a configured template that can execute the target task and has an execution time less than the time threshold as the second target template.
[0166] The suggestion generation module is used to generate a configuration modification suggestion according to the configuration item differences between the second target template and the first target template.
[0167] According to an embodiment of the present invention, the board configuration device 500 further includes a configuration modification module, a task re-execution module, and a template update module.
[0168] The configuration modification module is used to modify the configuration of the target board based on the configuration modification suggestion.
[0169] The task re-execution module is used to execute the target task by using the target board with the modified configuration.
[0170] The template update module is used to update the first target template with the second target template when it is determined that the target task can be correctly executed and the execution time is less than the time threshold.
[0171] According to an embodiment of the present invention, any of the information processing module 510, the template determination module 520, and the template update module 530 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the information processing module 510, the template determination module 520, and the template update module 530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the information processing module 510, the template determination module 520, and the template update module 530 may be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0172] Figure 6 The block diagram of an electronic device suitable for implementing the board configuration method according to an embodiment of the present invention is shown.
[0173] As Figure 6 shown, the electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage section 608 into the random access memory (RAM) 603. The processor 601 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 601 may also include on-board memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0174] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via the bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present invention by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to the embodiments of the present invention by executing the programs stored in the one or more memories.
[0175] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, and the input / output (I / O) interface 605 is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input part 606 including a keyboard, a mouse, etc.; an output part 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part 608 including a hard disk, etc.; and a communication part 609 including a network interface card such as a LAN card, a modem, etc. The communication part 609 performs communication processing via a network such as the Internet. The drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read from it can be installed into the storage part 608 as needed.
[0176] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present invention is implemented.
[0177] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the above-described ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603.
[0178] An embodiment of the present invention further includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the board configuration method provided by the embodiment of the present invention.
[0179] When the computer program is executed by the processor 601, it executes the above functions defined in the system / apparatus of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0180] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium, and is downloaded and installed through the communication part 609, and / or installed from the removable medium 611. The program code included in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0181] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it executes the above functions defined in the system of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0182] According to embodiments of the present invention, program code for executing the computer programs provided by the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0183] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0184] Those skilled in the art can understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.
[0185] The above describes the embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present invention.
Claims
1. A board configuration method, characterized in that: The method comprises: Using a configuration recommendation model to process the acquired attribute information of the target board to obtain a configuration recommendation type for the target board, wherein the configuration recommendation model is trained using the attribute information of a sample board that has been configured as a reference sample; In the case where it is determined that there is no configured template matching the configuration recommendation type in the preset configuration template library, determining a candidate template in the preset configuration template library whose configuration item difference with the configuration recommendation type satisfies a preset condition; and According to the configuration item difference between the configuration recommendation type and the candidate template, the candidate template is updated based on the configuration item component to obtain a first target template, so as to configure the target board according to the first target template.
2. The method according to claim 1, characterized in that The step of determining, when it is determined that there is no configured template matching the configuration recommendation type in the preset configuration template library, a candidate template in the preset configuration template library whose configuration item difference with the configuration recommendation type satisfies a preset condition comprises: Determining, according to one or more configuration items included in the configuration recommendation type, configuration item differences between the configuration recommendation type and each of the plurality of configured templates; and The configured template whose configuration item difference meets the preset condition is determined as the candidate template.
3. The method according to claim 2, characterized in that The updating of the candidate template based on the configuration item component according to the configuration item difference between the configuration recommendation type and the candidate template to obtain the first target template includes: Determining one or more of the configuration item components according to the configuration item differences, wherein the configuration item components are used to deploy a preset version of system software to the target board; and The one or more configuration item components are added to the candidate template to obtain the first target template.
4. The method according to claim 1, characterized in that: The configuration recommendation model is deployed in the board configuration engine and includes a decision layer and an output layer; The method of processing the attribute information of the target board by using the configuration recommendation model to obtain the configuration recommendation type for the target board includes: Inputting the attribute information of the target board into the decision layer, and obtaining the matching degree between the sub-attribute of the attribute information and the decision node of the decision layer; According to the matching degree, traverse the plurality of decision nodes in the decision layer to obtain a decision result corresponding to the attribute information; and The configuration recommendation type corresponding to the decision result is output through the output layer.
5. The method according to claim 4, characterized in that The configuration recommendation model is trained in the following way: When it is determined that the attribute information of the heterogeneous board different from the target board obtained from the board configuration engine meets a predetermined condition, the reference sample and the attribute information of the heterogeneous board are divided in equal proportion to obtain a plurality of sample data sets; Repeat the following steps until multiple sample data sets are selected as validation sets to obtain multiple validation results: Select one of the multiple sample data sets as a validation set, and the rest as training sets; Using the training set to train the initial configuration recommendation model to obtain a first prediction model; Using the verification set to verify the prediction accuracy of the first prediction model to obtain a verification result; as well as The first prediction model whose prediction accuracy reaches a preset value among the multiple verification results is determined as the configuration recommendation model.
6. The method according to claim 5, characterized in that The step of training the initial configuration recommendation model using the training set to obtain a first prediction model includes: According to the type of the sub-attribute of the attribute information in the training set, determining the information gain of the sub-attribute to obtain a plurality of gain values; sorting the plurality of gain values to determine a splitting attribute of a root node in an initial decision tree; According to multiple attribute value ranges of the split attribute, the training set is divided into multiple sub-data sets, wherein the sub-nodes of the decision tree represent the sub-data sets; In the case where it is determined that the sub-dataset is divisible, determining gain values of one or more sub-attributes in the sub-node; re-determining splitting attributes of the one or more sub-attributes according to the gain values of the one or more sub-attributes; and further dividing the sub-dataset according to the re-determined splitting attributes; and When it is determined that the sub-datasets cannot be divided, the obtained target decision tree is used as the decision layer.
7. The method according to claim 6, characterized in that The determining of information gain of the sub-attribute according to the type of the sub-attribute of the attribute information in the training set to obtain multiple gain values includes: According to the board type of each sample board in the training set, the training set is divided to obtain multiple sub-training sets; For each of the sub-training sets, respectively determine the intermediate gain values of the plurality of sub-attributes in the attribute information; and The intermediate gain values of the same sub-attribute in the plurality of sample sets are summed to obtain the gain value of the sub-attribute.
8. The method according to claim 5, characterized in that The method further comprises: When it is determined that the prediction accuracy rates of the plurality of first prediction models are all less than the preset value, the attribute information of the reference sample and the attribute information of the sample board are re-divided in equal proportion to obtain a plurality of updated data sets; Using the multiple updated data sets to train and verify the initial configuration recommendation model until the number of verifications reaches a preset number of times, or the prediction accuracy of the trained second prediction model reaches the preset value; and When it is determined that the number of verifications reaches the preset number of times and the prediction accuracy rates of the multiple second prediction models obtained through training are all less than the preset value, the configuration recommendation model is determined from the multiple second prediction models according to the prediction accuracy rates of the multiple second prediction models.
9. The method according to claim 1, characterized in that: The method further comprises: For each of the plurality of target configuration item components included in the first target template, construct configuration statements corresponding to the target configuration item components; and The target board is configured based on the plurality of configuration statements.
10. The method according to claim 9, characterized in that The method further comprises: Utilizing the configured target board to execute the target task and obtain the execution result; If it is determined that the execution result is normal and the execution time is less than the time threshold, generating a determination instruction; and When it is determined that the execution result is abnormal or the execution time is not less than a time threshold, a modification instruction is generated.
11. The method according to claim 10, characterized in that The method further comprises: In response to the modification instruction, searching, from the preset configuration template library, a configured template that can execute the target task and whose execution time is less than the time threshold, as a second target template; and Generate a configuration modification suggestion according to the configuration item difference between the second target template and the first target template.
12. The method according to claim 11, characterized in that The method further comprises: Based on the configuration modification suggestion, modify the configuration of the target board; executing the target task using the target board with the modified configuration; and When it is determined that the target task can be executed correctly and the execution time is less than a time threshold, the first target template is updated using the second target template.
13. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.
14. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Optical network terminal configuration method, optical line terminal, optical network system and medium
CN110880979A
Financial service task processing method and device, computer equipment and storage medium
CN113052696A
Alarm access method and system, electronic equipment and medium
CN113065139A
Method for automatically testing, positioning and repairing a fault and storage medium
CN113656323A
Distance-based time sequence classification-oriented data conversion method and system
CN114881116A