Server configuration matching method and device, equipment and storage medium
By performing structured processing and feature extraction on server configuration data and calculating similarity scores, the problems of omissions and inefficiency in server configuration comparison are solved, and refined comparison and efficient matching of complex configuration lists are achieved.
Patent Information
- Application Number
- CN202511064251.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-31
AI Technical Summary
During the server automation testing process, server configuration comparison is prone to omissions and gaps, which is tedious, time-consuming, inefficient, and has poor comparison effects.
By obtaining the target configuration data and performing structured processing, the multi-dimensional feature vector is extracted, and the similarity score with the historical configuration data is calculated to determine the matching reference configuration data.
Supports refined comparison of complex configuration lists, reduces omissions and gaps, improves comparison efficiency, and enhances comparison results.
Smart Images

Figure CN120561618B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server testing technology, and in particular to a server configuration matching method, apparatus, device, and storage medium. Background Art
[0002] During the automated testing process of the server, automated test cases need to be executed continuously, which will generate a large number of execution logs.
[0003] In related technologies, log analysis is typically performed by test engineers. Due to differences in experience and testing techniques, test engineers often need to refer to test logs from the same or similar test configurations, analyze conclusions, and address issues. Therefore, test engineers often need to review server configuration lists, automated test cases, automated execution scripts, historical execution logs, and other test data and information. Based on their own testing experience, they analyze the current log issues and decide on the appropriate response method.
[0004] Currently, while some systems can assist in searching and finding relevant information, this still takes a significant amount of time. This is due to the vast variety of server configurations, with few identical configurations. Simply searching for test execution logs for identical server configurations yields limited data and is therefore of limited reference value. Comparing different server configurations is also cumbersome and lacks a unified basis for comparison. Consequently, test engineers rely solely on their experience combined with search tools, which can easily lead to omissions and gaps. This is a tedious and time-consuming task for test engineers, resulting in low efficiency and poor comparison results. Summary of the Invention
[0005] The present application provides a server configuration matching method, apparatus, device and storage medium to at least solve the problems in the related art of server configuration comparison that are prone to omissions and deficiencies, are tedious and time-consuming, inefficient and have poor comparison effects.
[0006] This application provides a server configuration matching method, including:
[0007] Obtain the target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object;
[0008] Perform feature extraction on the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data;
[0009] Obtaining multidimensional feature vectors corresponding to each set of configuration data of the server in the historical test;
[0010] Based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, a similarity score between each group of configuration data and the target configuration data is calculated, and reference configuration data matching the target configuration data is determined from each group of configuration data.
[0011] The present application also provides a server configuration matching device, comprising:
[0012] The structured processing module is used to obtain the target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object;
[0013] An extraction module is used to extract features from the target structured configuration object and obtain a multi-dimensional target feature vector corresponding to the target configuration data;
[0014] An acquisition module, used to obtain the multi-dimensional feature vectors corresponding to each set of configuration data of the server in the historical test;
[0015] The matching module is used to calculate the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vector corresponding to each group of configuration data, and to determine the reference configuration data that matches the target configuration data from each group of configuration data.
[0016] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server configuration matching methods when executing the computer program.
[0017] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server configuration matching methods are implemented.
[0018] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server configuration matching methods when executed by a processor.
[0019] According to the application, by obtaining the multi-dimensional feature vectors corresponding to each group of configuration data of the server in the historical test, and further, based on the multi-dimensional target feature vector corresponding to the target configuration data and the multi-dimensional feature vectors corresponding to each group of configuration data, the similarity scores of each group of configuration data and the target configuration data are calculated, by converting the configuration data into feature vectors, similarity calculation can be performed for different scenarios, which can support fine comparison of complex configuration lists, and then the reference configuration data matched with the target configuration data is determined from each group of configuration data, which can simplify the comparison process of the server configuration, and therefore, the technical problems of easy omission and loss, tedious and time-consuming, low efficiency and poor comparison effect in the related art can be solved, and the technical effects of supporting fine comparison of complex configuration lists, effectively reducing omission and loss, improving comparison efficiency and improving comparison effect can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1 A server configuration matching method flow chart provided by the embodiments of the present application;
[0022] Figure 2 A structured processing flowchart provided by the embodiments of the present application;
[0023] Figure 3 Another server configuration matching method flow chart provided by the embodiments of the present application;
[0024] Figure 4 Another server configuration matching method flow chart provided by the embodiments of the present application;
[0025] Figure 5 A feature extraction flowchart provided by the embodiments of the present application;
[0026] Figure 6 A similarity calculation flowchart provided by the embodiments of the present application;
[0027] Figure 7 A similarity score correction flowchart provided by the embodiments of the present application;
[0028] Figure 8 A weight parameter optimization flowchart of similarity calculation provided by the embodiments of the present application;
[0029] Figure 9A schematic diagram of the structure of a server configuration matching device provided in an embodiment of the present application;
[0030] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0032] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0033] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0034] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the server configuration matching method depends, the specific application environment architecture or specific hardware architecture is described herein.
[0035] An embodiment of the present application provides a server configuration matching method, and the method is described in detail in conjunction with the execution process of the server configuration matching method.
[0036] Figure 1 This is a flow chart of a server configuration matching method provided in an embodiment of the present application. This method can be applied to electronic devices, including portable mobile devices such as tablets and laptops, as well as fixed devices such as personal computers and servers. The server can be a single server or a server cluster, which can be a distributed cluster or a centralized cluster. This method can be applied to scenarios where server configurations are matched or compared, effectively reducing omissions and gaps, improving the efficiency of server configuration comparison, and enhancing the comparison effect.
[0037] It is understandable that the server configuration matching method provided in the embodiment of the present application can also be applied in other scenarios.
[0038] Below Figure 1 The server configuration matching method shown in the figure is introduced, which includes the following steps:
[0039] S101: Obtain target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object.
[0040] During this step, when analyzing the current test log, the electronic device retrieves the target configuration data for the server in the current test log and further structures the target configuration data to obtain a target structured configuration object. Optionally, the target configuration data may be a server configuration table. The target configuration data includes, but is not limited to, component type (e.g., hard drive, memory), component number (PN), component location, and the number of each component.
[0041] In some embodiments, S101 may include but is not limited to S1011, S1012, and S1013:
[0042] S1011 . Clean the target configuration data to obtain cleaned target configuration data.
[0043] like Figure 2 As shown, the electronic device can receive target configuration data in multiple formats, such as Excel format, JSON format, etc., and then perform data cleaning. Data cleaning includes processing missing values and unifying the format of the target configuration data into a specified format. After data cleaning, the cleaned target configuration data is obtained.
[0044] S1012: Perform code conversion on the cleaned target configuration data to obtain standardized target configuration data.
[0045] like Figure 2 As shown, after obtaining the cleaned target configuration data, the cleaned target configuration data will be subjected to code conversion to obtain normalized target configuration data. Optionally, the code conversion includes but is not limited to position code conversion.
[0046] S1013. Add association relationships between configuration components to the standardized target configuration data to obtain a target structured configuration object.
[0047] In this step, if Figure 2 As shown, the association relationship between each configuration component will be established. Further, the association relationship between each configuration component is added to the standardized target configuration data to obtain the target structured configuration object.
[0048] This embodiment can ensure the comparability of configuration data from different sources, solve the problem of data heterogeneity, and provide clean and consistent input data for subsequent feature extraction.
[0049] S102: Extract features of the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data.
[0050] In this step, the electronic device extracts features from the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data. Optionally, the multi-dimensional target feature vector includes basic features and combined features of the target configuration data.
[0051] In some embodiments, S102 may include but is not limited to S1021, S1022, and S1023:
[0052] S1021. Extract basic features from the target structured configuration object, where the basic features include component features, structural features, and quantity features.
[0053] In this step, the electronic device extracts basic features from the target structured configuration object, including but not limited to component features, structural features and quantity features. Figure 5 As shown, the electronic device will extract component features of the target structured configuration object to obtain component features, which can be PN number feature matrices; perform position topology analysis on the target structured configuration object to obtain structural features, which can be position path codes; and perform quantity distribution statistics on the target structured configuration object to obtain quantity features, which can be quantity distribution vectors.
[0054] In some embodiments, component features include component type, component code, firmware version, etc., structural features include the positional topological relationship of components, and quantity features include the quantity distribution of various components.
[0055] S1022: Combine basic features to generate combined features.
[0056] In this step, the electronic device may combine the basic features to generate a combined feature. The combined feature may be, for example, the association between the firmware version and the location, or may be a combination of other basic features, without limitation.
[0057] S1023. Construct a multi-dimensional target feature vector corresponding to the target configuration data based on component features, structural features, quantity features, and combination features.
[0058] Further, if Figure 5As shown, component features, structural features, quantity features and combination features can be assembled into feature vectors to obtain a multi-dimensional target feature vector corresponding to the target configuration data.
[0059] This embodiment can capture key differences in the configuration list through feature extraction and feature combination, and convert complex configuration information into a computable vector representation.
[0060] S103: Obtain multidimensional feature vectors corresponding to each set of configuration data of the server in historical tests.
[0061] For each set of server configuration data from historical tests, the electronic device pre-processes each set of configuration data to obtain a multidimensional feature vector corresponding to each set of configuration data, and stores the multidimensional feature vector corresponding to each set of configuration data in the knowledge base. In this step, the electronic device can obtain the multidimensional feature vector corresponding to each set of configuration data from the knowledge base.
[0062] In some embodiments, S103 may include but is not limited to S1031, S1032, and S1033:
[0063] S1031. Acquire multiple sets of configuration data of the server in historical tests.
[0064] S1032: Perform structured processing on each group of configuration data in the multiple groups of configuration data to obtain each group of structured configuration objects.
[0065] S1033: Perform feature extraction on each group of structured configuration objects to obtain a multi-dimensional feature vector corresponding to each group of configuration data.
[0066] S104. Based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, calculate the similarity score between each group of configuration data and the target configuration data, and determine the reference configuration data that matches the target configuration data from each group of configuration data.
[0067] In this step, the similarity between each set of configuration data and the target configuration data can be quantified based on the feature vectors. After obtaining the multidimensional feature vectors corresponding to each set of configuration data, the electronic device calculates a similarity score between each set of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each set of configuration data. Furthermore, based on the similarity scores between each set of configuration data and the target configuration data, the electronic device can determine reference configuration data that matches the target configuration data from each set of configuration data, thereby simplifying the server configuration comparison process and improving comparison efficiency.
[0068] The embodiment of the present application obtains multidimensional feature vectors corresponding to each group of configuration data of the server in the historical test, and further calculates the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vector corresponding to each group of configuration data. By converting the configuration data into feature vectors, similarity calculation can be performed for different scenarios, which can support refined comparison of complex configuration lists, and then determine the reference configuration data that matches the target configuration data from each group of configuration data, which can simplify the comparison process of the server configuration. Therefore, it can solve the technical problems in the related technology that are prone to omissions and missings, tedious and time-consuming, inefficient, and have poor comparison effects, and achieve the technical effect of supporting refined comparison of complex configuration lists, effectively reducing omissions and missings, improving comparison efficiency, and enhancing comparison effects.
[0069] Based on the above embodiment, the server configuration matching method may further include the following steps:
[0070] Step a: testing the current test case based on the test data corresponding to the reference configuration data to obtain the current test result, which includes the pass rate and the failure point;
[0071] Step b: extracting test indicators based on the current test results to obtain test characteristic indicators;
[0072] Step c: performing a pass rate analysis on the indicators related to the pass rate in the test characteristic indicators to obtain a pass rate analysis result, and performing consistency quantification based on the pass rate analysis result to obtain a consistency quantification result;
[0073] In this step, pass rate analysis conducts an in-depth analysis of the extracted pass rate-related indicators, examining trends in pass rates across different feature dimensions and differences in pass rates between different groups (e.g., testing different component versions). Pass rate analysis provides a deeper understanding of the factors influencing test pass rates and their changing patterns, providing insights into the stability and reliability of the system under different scenarios. Consistency quantification measures the consistency of test results across different scenarios based on the results of pass rate analysis. By comparing the deviation between the actual pass rate and the expected pass rate, we assess whether they fall within an acceptable consistency range. If the pass rates of certain test cases fluctuate significantly across different configurations, this indicates poor consistency in test performance across these environments. Consistency quantification transforms intuitive pass rate data into quantitative indicators that reflect stability and reliability, facilitating the determination of test results' relevance and cross-correlation in similarity assessments. Poor consistency indicates that similarity assessments based on these results are of limited reference value.
[0074] Step d: locating the fault point for the indicators related to the fault point in the test characteristic indicators to obtain a fault point location result, and performing feature correlation analysis based on the fault point location result to obtain a feature correlation analysis result;
[0075] In this step, fault point location is the precise determination of the specific location and related attribute information of the fault point in the system. Through fault point location, the specific location of the fault can be clearly identified, providing a clear direction for subsequent analysis of the cause of the fault and its relationship with other system features. Feature correlation analysis is the correlation analysis between the located fault point and various system features (hardware configuration features such as CPU model and memory size; software configuration features such as operating system version) to determine which features are associated with the occurrence of the fault. Correlation analysis can identify potential influencing factors and patterns of fault generation. Exploring the deep-seated causes behind the fault and the inherent connection with other system elements will help consider the differences in test results under different system feature combinations when evaluating similarity.
[0076] Step e: generating a similarity correction factor based on the consistency quantification result and the feature association analysis result, and correcting the similarity score based on the similarity correction factor.
[0077] In this embodiment, the current test case is tested based on the test data corresponding to the reference configuration data to obtain the current test result. Figure 7 As shown, the test index extraction of the current test result will be performed to obtain the test characteristic index. Further, the pass rate analysis and fault point location are performed based on the test characteristic index to obtain the pass rate analysis result and the fault point location result. Next, consistency quantification is performed based on the pass rate analysis result to obtain the consistency quantification result, and feature correlation analysis is performed based on the fault point location result to obtain the feature correlation analysis result. Then, based on the consistency quantification result and the feature correlation analysis result, a similarity correction factor is generated, and the similarity score is corrected based on the similarity correction factor. This embodiment can integrate the actual test results into the similarity evaluation system, realize the closed loop of engineering practice and theoretical calculation, and ensure that the similarity score can reflect the reliability performance of the real system.
[0078] Figure 3 Another server configuration matching method flow chart provided in the embodiment of the present application is as follows: Figure 3 As shown, the method includes the following steps:
[0079] S301: Obtain target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object.
[0080] Specifically, the implementation process and principle of S301 and S101 are the same and will not be described in detail here.
[0081] S302: Extract features of the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data.
[0082] Specifically, the implementation process and principle of S302 and S102 are the same and will not be described in detail here.
[0083] S303: Obtain multi-dimensional feature vectors corresponding to each set of configuration data of the server in the historical test.
[0084] Specifically, the implementation process and principle of S303 and S103 are the same, and will not be repeated here.
[0085] S304. Based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, calculate the similarity score between each group of configuration data and the target configuration data, and determine the reference configuration data that matches the target configuration data from each group of configuration data.
[0086] Specifically, the implementation process and principle of S304 and S104 are the same, and will not be repeated here.
[0087] S305 : Acquire multiple groups of similarity calculation samples recorded in the historical configuration matching process, and divide the multiple groups of similarity calculation samples into a test set and a validation set.
[0088] The electronic device will record multiple sets of similarity comparison results in the historical configuration matching process. In this step, the multiple sets of similarity comparison results are used as multiple sets of similarity calculation samples, and the multiple sets of similarity calculation samples are used to optimize the weight parameters of the similarity calculation. Furthermore, the multiple sets of similarity calculation samples can be divided into test sets and validation sets, for example, according to the test set: validation set = 3:7 division, without specific limitation. Each set of similarity calculation samples includes the first configuration data, the second configuration data, and the similarity score between the first configuration data and the second configuration data.
[0089] S306 : Evaluate the performance scores of the numerical feature similarity, discrete feature similarity, and path feature similarity in the current weight combination based on the test set.
[0090] In this step, if Figure 8As shown, the performance of the current parameters is evaluated, and the performance score of the numerical feature similarity, the discrete feature similarity, and the path feature similarity under the current weight combination is evaluated by the test set. Specifically, the actual similarity scores of each group of similarity calculation samples in the test set are calculated based on the current weight combination, and the actual similarity scores of each group of similarity calculation samples and the target similarity scores included in each group of similarity calculation samples are compared to obtain the performance score of the current weight combination. In some embodiments, the performance score of the current weight combination can be determined according to the accuracy of the actual similarity scores relative to the target similarity scores.
[0091] S307, if the performance score of the current weight combination is less than the preset score threshold, the genetic algorithm is used to optimize the current weight combination to obtain a target weight combination.
[0092] In this step, as shown in Figure 8 The essence is to determine whether the current parameters need to be optimized. If the performance score of the current weight combination is less than the preset score threshold, the genetic algorithm is used to optimize the current weight combination to generate new parameters and obtain a target weight combination. In some embodiments, if the performance score of the current weight combination is greater than or equal to the preset score threshold, the current parameters are maintained and do not need to be optimized.
[0093] S308, the performance score of the numerical feature similarity, the discrete feature similarity, and the path feature similarity under the target weight combination is evaluated based on the verification set.
[0094] In this step, as shown in Figure 8 The effect of the target weight combination is verified. The performance score of the numerical feature similarity, the discrete feature similarity, and the path feature similarity under the target weight combination is evaluated by the verification set. Specifically, the actual similarity scores of each group of similarity calculation samples in the verification set are calculated based on the target weight combination, and the actual similarity scores of each group of similarity calculation samples and the target similarity scores included in each group of similarity calculation samples are compared to obtain the performance score of the target weight combination.
[0095] S309, if the performance score of the target weight combination is greater than or equal to the preset score threshold, the weight parameters are deployed based on the target weight combination.
[0096] In this step, as shown in Figure 8As shown, the essence is to determine whether the effect of adopting the target weight parameters is improved. Electronic device. If the performance score of the target weight combination is greater than or equal to the preset score threshold, the weight parameters are deployed based on the target weight combination, that is, new parameters are deployed. In some embodiments, if the performance score of the target weight combination is less than the preset score threshold, the weight parameter combination is continuously optimized until the performance score of the optimized weight parameter combination is greater than or equal to the preset score threshold, at which time the weight parameters are deployed.
[0097] In some embodiments, the method further includes: establishing a knowledge base; and visually displaying the results.
[0098] In this embodiment, a knowledge base is established to store domain knowledge and historical comparison data. This knowledge base can continuously accumulate knowledge such as component compatibility rules and firmware version evolution relationships, record historical configuration similarity cases, store optimized parameter versions, and provide data query services. By providing historical benchmarks and domain rules, the targeted nature of feature extraction and the interpretability of similarity calculations are enhanced, avoiding the repetitive learning of known patterns.
[0099] Furthermore, visualization of results allows for intuitive presentation of comparison results and difference analysis. Specifically, based on similarity scores, radar charts (multi-dimensional comparison) and heat maps (difference distribution) are generated. These provide detailed component-level differences, display parameter optimization trajectories, and support interactive analysis with users. Abstract calculation results can be transformed into understandable visual presentations for engineers. Threshold warnings and difference location functions facilitate rapid decision-making regarding configuration changes.
[0100] The embodiment of the present application obtains the target configuration data of the server in the current test log, performs structured processing on the target configuration data, obtains a target structured configuration object, performs feature extraction on the target structured configuration object, obtains a multidimensional target feature vector corresponding to the target configuration data, and obtains the multidimensional feature vectors corresponding to each group of configuration data of the server in the historical test. Further, based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vector corresponding to each group of configuration data, the similarity score between each group of configuration data and the target configuration data is calculated, and the reference configuration data that matches the target configuration data is determined from each group of configuration data. Then, multiple groups of similarity calculation samples recorded in the historical configuration matching process are obtained, the multiple groups of similarity calculation samples are divided into a test set and a validation set, and the performance scores of numerical feature similarity, discrete feature similarity, and path feature similarity in the current weight combination are evaluated based on the test set. If the performance score of the current weight combination is less than a preset score threshold, the current weight combination is optimized using a genetic algorithm to obtain the target weight combination. Then, based on the validation set, the performance scores of numerical feature similarity, discrete feature similarity, and path feature similarity in the target weight combination are evaluated. If the performance score in the target weight combination is greater than or equal to the preset score threshold, the weight parameters are deployed based on the target weight combination. Through this method, the embodiment of the present application can support the refined comparison of complex configuration lists, effectively reduce omissions and deficiencies, improve comparison efficiency, and enhance comparison effects. Moreover, through the parameter optimization mechanism, the similarity calculation strategy can be automatically adjusted according to the actual test performance, ensuring that the algorithm comparison results are consistent with the actual test business requirements, and screening out the most reference configurations from the massive test configurations.
[0101] Figure 4 A flow chart of a server configuration matching method provided in another embodiment of the present application is shown in FIG. Figure 4 As shown, the method includes the following steps:
[0102] S401: Obtain target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object.
[0103] Specifically, the implementation process and principle of S401 and S101 are the same and will not be described in detail here.
[0104] S402: Extract features of the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data.
[0105] Specifically, the implementation process and principle of S402 and S102 are the same and will not be repeated here.
[0106] S403: Obtain multi-dimensional feature vectors corresponding to each set of configuration data of the server in the historical test.
[0107] Specifically, the implementation process and principle of S403 and S103 are the same and will not be described in detail here.
[0108] S404 . For the multidimensional feature vectors corresponding to each set of configuration data, combine the multidimensional feature vectors with the multidimensional target feature vector to form a feature vector pair.
[0109] In this step, if Figure 6 As shown, for a multidimensional feature vector corresponding to any set of configuration data, the multidimensional feature vector corresponding to the set of configuration data and the multidimensional target feature vector are combined to form a feature vector pair (A, B).
[0110] S405 : Calculate the similarity of the quantitative features of the feature vector pair based on the weighted cosine similarity algorithm to obtain the numerical feature similarity.
[0111] In this step, if Figure 6 As shown, the electronic device calculates the similarity of the quantitative features of the feature vector pair based on the weighted cosine similarity algorithm to obtain the numerical feature similarity.
[0112] Optionally, the weighted cosine similarity algorithm formula is:
[0113] cos (A, B) = A·B / ||A|| * ||B||
[0114] Special treatment: If AA or BB is a zero vector (i.e. no quantity distribution), define:
[0115]
[0116] Among them, A and B represent the multidimensional feature vector and the multidimensional target feature vector respectively.
[0117] S406 , calculating the similarity of the component features of the feature vector pair based on the Jaccard similarity coefficient algorithm to obtain the discrete feature similarity.
[0118] In this step, if Figure 6 As shown, the electronic device calculates the similarity of the component features of the feature vector pair based on the Jaccard similarity coefficient algorithm to obtain the discrete feature similarity.
[0119] Optionally, the Jaccard similarity coefficient algorithm formula is:
[0120] J(A,B)=∣A∩B∣∣A∪B∣J(A,B)=∣A∪B∣∣A∩B∣
[0121] Calculation logic: Calculates the similarity between the component PN number (weight 70%) and the firmware version (weight 30%).
[0122] The discrete feature similarity is: Spart=0.7×J(PNA,PNB)+0.3×J(FWA,FWB).
[0123] S407 : Calculate the similarity of the structural features of the feature vector pair based on the edit distance algorithm to obtain the path feature similarity.
[0124] In this step, if Figure 6 As shown, the electronic device calculates the similarity of the structural features of the feature vector pair based on the edit distance algorithm to obtain the path feature similarity.
[0125] Optionally, the edit distance algorithm formula is:
[0126] Level matching degree = matchLevelsmin / MIN(depthA, depthB)
[0127] Depth penalty = 0.9 | depthA - depthB |
[0128] Path feature similarity Spos = level matching × depth penalty
[0129] Among them, matchLevels represents the number of levels of continuous matching starting from the root node, and depth represents the total depth of the path (number of levels).
[0130] S408 : Perform weighted calculation based on the numerical feature similarity, the discrete feature similarity, the path feature similarity, and their corresponding weights to obtain a similarity score between each group of configuration data and the target configuration data.
[0131] In this step, if Figure 6 As shown, the electronic device performs a weighted calculation based on the numerical feature similarity, discrete feature similarity, path feature similarity, and their corresponding weights to obtain a similarity score between each set of configuration data and the target configuration data. Optionally, the weights corresponding to the discrete feature similarity, path feature similarity, and numerical feature similarity are W1=0.4, W2=0.3, and W3=0.3, respectively, without limitation.
[0132] Optional, weighted calculation formula:
[0133] Similarity score Sbase=∑i(Wi×Si) / ∑iWi
[0134] Among them, Si represents the similarity of each dimension (discrete feature similarity S1, path feature similarity S2, numerical feature similarity S3), and Wi represents the configurable weight corresponding to the similarity of each dimension (default: W1=0.4, W2=0.3, W3=0.3).
[0135] S409 : For any set of configuration data, if the similarity score between the set of configuration data and the target configuration data is greater than a preset score threshold, the set of configuration data is determined as reference configuration data that matches the target configuration data.
[0136] In this step, for any set of configuration data, if it is determined that the similarity score between the set of configuration data and the target configuration data is greater than the preset score threshold, the set of configuration data is determined as the reference configuration data that matches the target configuration data. By setting the preset score threshold, the accuracy of server configuration matching can be improved.
[0137] The embodiment of the present application obtains the target configuration data of the server in the current test log, performs structured processing on the target configuration data to obtain a target structured configuration object, performs feature extraction on the target structured configuration object to obtain a multidimensional target feature vector corresponding to the target configuration data, and obtains the multidimensional feature vectors corresponding to each group of configuration data of the server in the historical test. Furthermore, for the multidimensional feature vectors corresponding to each group of configuration data, the multidimensional feature vector and the multidimensional target feature vector are combined to form a feature vector pair, and the similarity of the quantitative features of the feature vector pair is calculated based on the weighted cosine similarity algorithm to obtain the numerical feature similarity. The similarity of the component features of the feature vector pair is calculated based on the Jaccard similarity coefficient algorithm to obtain the discrete feature similarity. The similarity of the structural features of the feature vector pair is calculated based on the edit distance algorithm to obtain the path feature similarity. Then, based on the numerical feature similarity, discrete feature similarity, path feature similarity and their respective corresponding weights, a weighted calculation is performed to obtain a similarity score between each group of configuration data and the target configuration data. For any group of configuration data, if the similarity score between the group of configuration data and the target configuration data is greater than a preset score threshold, then the group of configuration data is determined to be the reference configuration data that matches the target configuration data. Through this method, the embodiment of the present application obtains a similarity score between each group of configuration data and the target configuration data by performing a weighted calculation based on the numerical feature similarity, discrete feature similarity, path feature similarity and their respective corresponding weights. Similarity calculation can be performed for different scenarios, and can support refined comparison of complex configuration lists. Then, for any group of configuration data, if the similarity score between the group of configuration data and the target configuration data is greater than a preset score threshold, then the group of configuration data is determined to be the reference configuration data that matches the target configuration data. This can simplify the comparison process of the server configuration, effectively reduce omissions and deficiencies, improve the comparison efficiency of the server configuration, and improve the accuracy of the server configuration matching.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0139] Figure 9 The embodiment of the present application provides a server configuration matching device, which can be an electronic device as described in the above embodiment, or the server configuration matching device can be a component or assembly in the electronic device. The server configuration matching device provided by the embodiment of the present disclosure can execute the processing flow provided by the embodiment of the server configuration matching method, such as Figure 9 As shown, the server configuration matching device 50 includes: a structured processing module 51, an extraction module 52, an acquisition module 53, and a matching module 54; wherein the structured processing module 51 is used to obtain the target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object; the extraction module 52 is used to perform feature extraction on the target structured configuration object to obtain a multidimensional target feature vector corresponding to the target configuration data; the acquisition module 53 is used to obtain the multidimensional feature vectors corresponding to each group of configuration data of the server in the historical test; the matching module 54 is used to calculate the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, and determine the reference configuration data that matches the target configuration data from each group of configuration data.
[0140] Optionally, the server configuration matching device 50 also includes: a correction module 55; the correction module 55 is used to test the current test case based on the test data corresponding to the reference configuration data to obtain the current test result, and the current test result includes the pass rate and the fault point; based on the current test result, test indicators are extracted to obtain test feature indicators; a pass rate analysis is performed on the indicators related to the pass rate in the test feature indicators to obtain the pass rate analysis result, and consistency quantification is performed based on the pass rate analysis result to obtain the consistency quantification result; fault point location is performed on the indicators related to the fault point in the test feature indicators to obtain the fault point location result, and feature correlation analysis is performed based on the fault point location result to obtain the feature correlation analysis result; a similarity correction factor is generated according to the consistency quantification result and the feature correlation analysis result, and the similarity score is corrected based on the similarity correction factor.
[0141] Optionally, the server configuration matching device 50 also includes: an optimization module 56; the optimization module 56 is used to obtain multiple groups of similarity calculation samples recorded in the historical configuration matching process, and divide the multiple groups of similarity calculation samples into a test set and a verification set; based on the test set, the performance score of the numerical feature similarity, discrete feature similarity and path feature similarity in the current weight combination is evaluated; if the performance score of the current weight combination is less than a preset score threshold, the current weight combination is optimized using a genetic algorithm to obtain a target weight combination; based on the verification set, the performance score of the numerical feature similarity, discrete feature similarity and path feature similarity in the target weight combination is evaluated; if the performance score of the target weight combination is greater than or equal to the preset score threshold, the weight parameters are deployed based on the target weight combination.
[0142] Optionally, when the structured processing module 51 performs structured processing on the target configuration data to obtain a target structured configuration object, it is specifically used to: perform data cleaning on the target configuration data to obtain cleaned target configuration data; perform encoding conversion on the cleaned target configuration data to obtain standardized target configuration data; and add the association relationship between each configuration component in the standardized target configuration data to obtain the target structured configuration object.
[0143] Optionally, when the extraction module 52 performs feature extraction on the target structured configuration object and obtains a multidimensional target feature vector corresponding to the target configuration data, it is specifically used to: extract basic features from the target structured configuration object, the basic features including component features, structural features and quantity features; perform feature combination on the basic features to generate combined features; and construct a multidimensional target feature vector corresponding to the target configuration data based on the component features, structural features, quantity features and combined features.
[0144] Optionally, when the acquisition module 53 obtains the multidimensional feature vectors corresponding to each group of configuration data of the server in the historical test, it is specifically used to: obtain multiple groups of configuration data of the server in the historical test; perform structured processing on each group of configuration data in the multiple groups of configuration data to obtain each group of structured configuration objects; perform feature extraction on each group of structured configuration objects to obtain the multidimensional feature vectors corresponding to each group of configuration data.
[0145] Optionally, the matching module 54 calculates the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vector corresponding to each group of configuration data, and determines the reference configuration data matching the target configuration data from each group of configuration data. Specifically, it is used to: for the multidimensional feature vectors corresponding to each group of configuration data, form a feature vector pair with the multidimensional feature vector and the multidimensional target feature vector; calculate the similarity of the quantitative features of the feature vector pair based on the weighted cosine similarity algorithm to obtain the numerical feature similarity; calculate the similarity of the component features of the feature vector pair based on the Jaccard similarity coefficient algorithm to obtain the discrete feature similarity; calculate the similarity of the structural features of the feature vector pair based on the edit distance algorithm to obtain the path feature similarity; perform weighted calculation based on the numerical feature similarity, discrete feature similarity, path feature similarity and their respective corresponding weights to obtain the similarity score between each group of configuration data and the target configuration data; for any group of configuration data, if the similarity score between the group of configuration data and the target configuration data is greater than a preset score threshold, then the group of configuration data is determined as the reference configuration data matching the target configuration data.
[0146] For the description of the features in the embodiment corresponding to the server configuration matching device, reference can be made to the relevant description of the embodiment corresponding to the server configuration matching method, which will not be repeated here.
[0147] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above server configuration matching method embodiments.
[0148] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned server configuration matching method embodiments when running.
[0149] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0150] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned server configuration matching method embodiments are implemented.
[0151] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned server configuration matching method embodiments are implemented.
[0152] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0153] The above is a detailed introduction to the server configuration matching method, device, equipment and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A server configuration matching method, characterized in that: The method comprises: Obtain target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object; Performing feature extraction on the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data; Obtaining multidimensional feature vectors corresponding to each set of configuration data of the server in the historical test; Calculating a similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, and determining reference configuration data that matches the target configuration data from each group of configuration data; The multi-dimensional target feature vector includes basic features and combined features of target configuration data, wherein the basic features are extracted from the target structured configuration object, and the basic features include component features, structural features, and quantity features; The calculating the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data includes: For the multidimensional feature vectors corresponding to each set of configuration data, the multidimensional feature vector and the multidimensional target feature vector are combined into a feature vector pair; Calculating the similarity of the quantitative features of the feature vector pair based on a weighted cosine similarity algorithm to obtain a numerical feature similarity; Calculating the similarity of the component features of the feature vector pair based on the Jaccard similarity coefficient algorithm to obtain discrete feature similarity; Calculating the similarity of the structural features of the feature vector pair based on the edit distance algorithm to obtain the path feature similarity; Based on the numerical feature similarity, discrete feature similarity, path feature similarity and their corresponding weights, a weighted calculation is performed to obtain the similarity score between each group of configuration data and the target configuration data.
2. The method according to claim 1, characterized in that The method further comprises: Testing the current test case based on the test data corresponding to the reference configuration data to obtain a current test result, wherein the current test result includes a pass rate and a failure point; Extract test indicators based on current test results to obtain test feature indicators; Performing a pass rate analysis on an indicator related to the pass rate in the test characteristic indicators to obtain a pass rate analysis result, and performing consistency quantification based on the pass rate analysis result to obtain a consistency quantification result; Performing fault point location on the indicators related to the fault point in the test characteristic indicators to obtain a fault point location result, and performing feature correlation analysis based on the fault point location result to obtain a feature correlation analysis result; A similarity correction factor is generated according to the consistency quantification result and the feature association analysis result, and the similarity score is corrected based on the similarity correction factor.
3. The method according to claim 1, characterized in that The method further comprises: Obtain multiple sets of similarity calculation samples recorded in the historical configuration matching process, and divide the multiple sets of similarity calculation samples into a test set and a validation set; Evaluate the performance scores of the numerical feature similarity, discrete feature similarity, and path feature similarity in the current weight combination based on the test set; If the performance score of the current weight combination is less than the preset score threshold, the current weight combination is optimized using a genetic algorithm to obtain the target weight combination; Evaluate the performance scores of numerical feature similarity, discrete feature similarity, and path feature similarity on the target weight combination based on the validation set; If the performance score of the target weight combination is greater than or equal to the preset score threshold, the weight parameters are deployed based on the target weight combination.
4. The method according to claim 1, wherein The structurally processing the target configuration data to obtain a target structured configuration object includes: performing data cleaning on the target configuration data to obtain cleaned target configuration data; Performing encoding conversion on the cleaned target configuration data to obtain standardized target configuration data; The association relationship between the configuration components is added to the standardized target configuration data to obtain a target structured configuration object.
5. The method according to claim 1, wherein The step of extracting features from the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data includes: Extracting basic features from the target structured configuration object, wherein the basic features include component features, structural features, and quantity features; Performing feature combination on the basic features to generate combined features; Based on the component features, the structural features, the quantity features and the combination features, a multi-dimensional target feature vector corresponding to the target configuration data is constructed.
6. The method according to claim 1, characterized in that The obtaining of the multidimensional feature vectors corresponding to each set of configuration data of the server in the historical test includes: Get multiple sets of server configuration data in historical tests; Performing structured processing on each set of configuration data in the plurality of sets of configuration data to obtain each set of structured configuration objects; Feature extraction is performed on each group of structured configuration objects to obtain a multi-dimensional feature vector corresponding to each group of configuration data.
7. The method according to claim 1, characterized in that Determining reference configuration data matching the target configuration data from each set of configuration data includes: For any set of configuration data, if the similarity score between the set of configuration data and the target configuration data is greater than a preset score threshold, the set of configuration data is determined as reference configuration data that matches the target configuration data.
8. A server configuration matching device, characterized in that: include: A structured processing module is used to obtain target configuration data of the server in the current test log, perform structured processing on the target configuration data, and obtain a target structured configuration object; An extraction module, configured to extract features from the target structured configuration object to obtain a multi-dimensional target feature vector corresponding to the target configuration data; An acquisition module, used to obtain the multi-dimensional feature vectors corresponding to each set of configuration data of the server in the historical test; a matching module, configured to calculate a similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, and to determine reference configuration data that matches the target configuration data from each group of configuration data; The multi-dimensional target feature vector includes basic features and combined features of target configuration data, wherein the basic features are extracted from the target structured configuration object, and the basic features include component features, structural features, and quantity features; The matching module calculates the similarity score between each group of configuration data and the target configuration data based on the multidimensional target feature vector corresponding to the target configuration data and the multidimensional feature vectors corresponding to each group of configuration data, specifically for: For the multidimensional feature vectors corresponding to each set of configuration data, the multidimensional feature vector and the multidimensional target feature vector are combined into a feature vector pair; Calculating the similarity of the quantitative features of the feature vector pair based on a weighted cosine similarity algorithm to obtain a numerical feature similarity; Calculating the similarity of the component features of the feature vector pair based on the Jaccard similarity coefficient algorithm to obtain discrete feature similarity; Calculating the similarity of the structural features of the feature vector pair based on the edit distance algorithm to obtain the path feature similarity; Based on the numerical feature similarity, discrete feature similarity, path feature similarity and their corresponding weights, a weighted calculation is performed to obtain the similarity score between each group of configuration data and the target configuration data.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the server configuration matching method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server configuration matching method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Test method of server system, storage medium, electronic equipment and program product
CN120144385A
Server configuration optimization method and device, storage medium and electronic equipment
CN120295882A