WO2022267364A1 - 一种信息推荐方法、设备及存储介质 - Google Patents

一种信息推荐方法、设备及存储介质 Download PDF

Info

Publication number
WO2022267364A1
WO2022267364A1 PCT/CN2021/136325 CN2021136325W WO2022267364A1 WO 2022267364 A1 WO2022267364 A1 WO 2022267364A1 CN 2021136325 W CN2021136325 W CN 2021136325W WO 2022267364 A1 WO2022267364 A1 WO 2022267364A1
Authority
WO
WIPO (PCT)
Prior art keywords
recommended
target
test cases
value
test case
Prior art date
Application number
PCT/CN2021/136325
Other languages
English (en)
French (fr)
Inventor
杨喜红
卢道和
周杰
翁玉萍
黄涛
陈文龙
袁文静
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2022267364A1 publication Critical patent/WO2022267364A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Definitions

  • the present application relates to the technical field of testing, and in particular to an information recommendation method, device and storage medium.
  • test cases are usually determined by simple retrieval using keywords, and the test is performed through the retrieved test cases.
  • test case determination method is relatively simple, resulting in a low matching degree of the determined test cases, resulting in poor test results.
  • the embodiment of the present application expects to provide an information recommendation method, device and storage medium, which solves the problem that the current test case recommendation method is relatively single, and implements a test case recommendation method that can accurately recommend matching Test cases, and improve the testing effect of the test cases on the application.
  • an information recommendation method the method includes:
  • m test cases to be recommended including the target tag If a request message for requesting a test case including a target tag is detected, obtain m test cases to be recommended including the target tag; wherein, m is an integer greater than or equal to 1;
  • n reference labels include the target label, and n is an integer greater than or equal to 1;
  • the n reference labels and the m test cases to be recommended determine the first prediction value of each test case to be recommended for the target label and each test case to be recommended a second predicted value for the target label;
  • an information recommendation device the device includes: a memory, a processor, and a communication bus; wherein:
  • the memory is used to store executable instructions
  • the communication bus is used to realize the communication connection between the processor and the memory
  • the processor is configured to execute the information recommendation program stored in the memory to implement the steps of the information recommendation method described in any one of the above.
  • a storage medium stores an information recommendation program, and when the information recommendation program is executed by a processor, the steps of the information recommendation method described in any one of the foregoing are implemented.
  • the information recommendation device detects a request message for requesting a test case including a target tag, after obtaining m test cases to be recommended of the target tag, determine the tags included in each test case to be recommended, and obtain m N reference labels included in each test case to be recommended, and based on the target label, n reference labels and m test cases to be recommended, determine the first prediction value of each test case to be recommended for the target label and each test case to be recommended Use the second predicted value of the target label, and determine the dynamic weight corresponding to each test case to be recommended, and then determine m third predictions based on each dynamic weight, the corresponding first predicted value, and the corresponding second predicted value value, and based on the m third predicted values, after determining the first preset number of target recommended test cases from the m test cases to be recommended, responding to the request message, displaying the first preset number of target recommended test cases, thus, The first predictive value representing the similarity between test cases and the test cases and the second predictive value representing the similarity between
  • FIG. 1 is a schematic flow diagram of an information recommendation method provided in an embodiment of the present application
  • FIG. 2 is a schematic flow chart of another information recommendation method provided by the embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another information recommendation method provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of a target relationship diagram provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of data transmission provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an information recommendation device provided by an embodiment of the present application.
  • An embodiment of the present application provides an information recommendation method. Referring to FIG. 1, the method is applied to an information recommendation device, and the method includes the following steps:
  • Step 101 if a request message for requesting test cases including target tags is detected, obtain m test cases to be recommended including target tags.
  • n is an integer greater than or equal to 1.
  • the request message for requesting a test case including a target label may be generated by the user performing a target label selection operation on the information recommendation device, that is, the user selects parameters for the label on the test interface displayed on the information recommendation device Make a selection, select it as the target label and click OK, and a request message will be generated.
  • the label is used to identify the test case, for example, it may be a kind of identification information for classifying the category of the test case, the test function, etc., and a test case may have multiple different labels.
  • the target label includes at least one label, but in some application scenarios, the target label can also be empty, that is, when the user selects a test case, no label is selected.
  • the corresponding m is the total number of test cases with the target label in the test case set; when the target label is empty, m is a preset experience value, for example, it can be a user, usually a test An experience value set by personnel according to their actual needs, or an experience value obtained from a large number of experiments, the specific situation can be determined by the actual situation, and no specific limitation is made here.
  • Step 102 Determine the tags included in each test case to be recommended, and obtain n reference tags included in the m test cases to be recommended.
  • n reference labels include the target label, and n is an integer greater than or equal to 1.
  • the included label statistics are performed on the determined m test cases to be recommended that include the target label, and all n reference labels included in the m test cases to be recommended are obtained.
  • Step 103 based on the target label, n reference labels and m test cases to be recommended, determine the first prediction value of each test case to be recommended for the target label and the second prediction value of each test case to be recommended for the target label.
  • the first prediction value is determined by the similarity between each test case to be recommended and the test cases to be recommended except for each test case to be recommended in the m test cases to be recommended
  • the second prediction value is determined by the target label The similarity between the n reference tags and the tags other than the target tag is determined.
  • the similarity analysis and calculation between each test case to be recommended and other test cases Determine the first prediction value of each test case to be recommended for the target label; for the target label, n reference labels included in m test cases to be recommended and m test cases to be recommended, for the target label and n reference labels except The similarity analysis and calculation between other labels other than the target label is performed to obtain the second predicted value of each test case to be recommended for the target label.
  • Step 104 determining the dynamic weight corresponding to each test case to be recommended.
  • the dynamic weight corresponding to each test case to be recommended is dynamically changed in different scenarios, and is not the only constant. According to each test case to be recommended in different scenarios, different tags and Individual differences between test cases.
  • Step 105 Determine m third predictive values based on each dynamic weight, the corresponding first predictive value, and the corresponding second predictive value.
  • each dynamic weight is used to dynamically adjust the corresponding first predicted value and the corresponding second predicted value to obtain the third predicted value corresponding to each test case to be recommended, thereby obtaining m to-be-recommended m third predictive values respectively corresponding to the recommended test cases.
  • Step 106 based on the m third predicted values, determine a first preset number of target recommended test cases from the m test cases to be recommended.
  • the m third prediction values corresponding to the m test cases to be recommended are analyzed to determine a first preset number of target recommended test cases from the m test cases to be recommended.
  • the target recommended test case is a test case to be recommended with a high degree of conformity with the target label, which can meet the testing needs of testers.
  • the first preset number may be an empirical value obtained based on a large number of experiments, or an empirical value determined based on an empirical algorithm based on the relationship between m, which may be determined by actual conditions, and is not specifically limited here.
  • Step 107 responding to the request message, displaying a first preset number of target recommended test cases.
  • the information recommendation device responds to the request message, and displays the determined first preset number of target recommendation test cases, so that the tester can decide whether to test the object to be tested based on the target recommendation test cases, such as the application program to be tested.
  • the target recommendation test cases such as the application program to be tested.
  • the information recommendation device detects a request message for requesting a test case including a target tag, after obtaining m test cases to be recommended of the target tag, determine the tags included in each test case to be recommended, and obtain m N reference labels included in each test case to be recommended, and based on the target label, n reference labels and m test cases to be recommended, determine the first prediction value of each test case to be recommended for the target label and each test case to be recommended Use the second predicted value of the target label, and determine the dynamic weight corresponding to each test case to be recommended, and then determine m third predictions based on each dynamic weight, the corresponding first predicted value, and the corresponding second predicted value value, and based on the m third predicted values, after determining the first preset number of target recommended test cases from the m test cases to be recommended, responding to the request message, displaying the first preset number of target recommended test cases, thus, The first predictive value representing the similarity between test cases and the test cases and the second predictive value representing the similarity between
  • the embodiments of the present application provide an information recommendation method.
  • the method is applied to an information recommendation device, and the method includes the following steps:
  • Step 201 if a request message for requesting test cases including target tags is detected, obtain m test cases to be recommended including target tags.
  • n is an integer greater than or equal to 1.
  • the information recommended test equipment is used as an example for illustration.
  • the test equipment may be a device with computing functions, such as a computer device.
  • the tester performs corresponding operations on the test equipment, such as the test equipment
  • the test application interface of the currently displayed test application is operated, and the target label is input from the displayed multiple labels, or the tester directly inputs the program code including the user's acquisition of the test case including the target label to generate a corresponding request message, and the test
  • the device receives the request message, it selects all test cases to be recommended including target tags from the test case library corresponding to the test device, and then obtains m test cases to be recommended including target tags.
  • test cases corresponding to the test device may be stored in a local storage area of the test device, or may be stored in a cloud storage space accessible by the test device. All test cases corresponding to the test equipment may be all test cases in the entire test case library, or may be some test cases in the entire test case library that the test equipment can only access.
  • Step 202 Determine the tags included in each test case to be recommended, and obtain n reference tags included in the m test cases to be recommended.
  • n reference labels include the target label, and n is an integer greater than or equal to 1.
  • test cases to be recommended including target tags are 6 test cases to be recommended, including test case 1, test case 2, test case 3, test case 4, Test case 5 and test case 6, correspondingly, make statistics on the tags included in each test case to be recommended, for example, test case 1 includes tag A and tag C, test case 2 includes tag A and tag B, test case 3 Including label A and label C, test case 4 includes label A and label D, test case 5 includes label A, test case 6 includes label A and label B, since it can be determined that these 6 test cases to be recommended include n equal to 4
  • the reference labels are label A, label B, label C, and label D in sequence. Among them, suppose the target label is A.
  • Step 203 based on the n reference labels and m test cases to be recommended, determine the reference score of each test case to be recommended for each reference label.
  • the reference score for each reference tag of each test case to be recommended is determined.
  • the relationship between the n reference labels and the labels included in the m test cases to be recommended may be the relationship whether each test case to be recommended in the m test cases to be recommended includes the labels in the n reference labels.
  • test case 1A of test case 1 for label A
  • the reference score S 1B of test case 1 for label B the reference score S 1C of test case 1 for label C
  • test case 1 for label D Score S 1D
  • test case 3 for label A
  • label B label Reference scores S 3A , S 3B , S 3C and S 3D for C and label D
  • Step 204 Determine the similarity parameters between each test case to be recommended and other test cases based on the reference scores of m test cases to be recommended for n reference labels, and obtain m-1 test cases corresponding to each test case to be recommended The first similarity parameter.
  • test cases are each test case to be recommended except for each corresponding test case to be recommended among the m test cases to be recommended.
  • the reference scores for n reference tags for m test cases to be recommended are obtained, and the reference scores for n reference tags of other test cases are obtained.
  • the score and use the preset similarity calculation method to perform similarity calculation and analysis on the two, and determine the first similarity parameter between each test case to be recommended and other test cases. Since there are a total of m to be recommended test case, so for each test case to be recommended, the first similarity parameter between the test case to be recommended and other m-1 test cases to be recommended can be obtained, therefore, for each test case to be recommended, it can be obtained m-1 first similarity parameters.
  • the first similarity parameter X 12 of the test case 1 is used to calculate the reference scores S 1A , S 1B , S 1C and S 1D for the four tags and the reference scores S 3A , S 3B , S 3C for the four tags of the test case 3 and the first similarity parameter X 13 between S 3D , calculate the reference scores S 1A , S 1B , S 1C and S 1D of test case 1 for the 4 tags and the reference scores S 4A , S 1D of test case 4 for the 4 tags
  • For the first similarity parameter X 14 between S 4B , S 4C and S 4D calculate the reference scores S 1A , S 1B , S 1C and S 1D of test case 1 for the four tags and test case 5 for
  • first similarity parameters X 21 , X 23 , X 24 , X 25 and X 26 between test case 2 and other five test cases can be obtained, and between test case 3 and other five test cases 5 first similarity parameters X 31 , X 32 , X 34 , X 35 and X 36 , and 5 first similarity parameters X 41 , X 42 , X 43 between test case 4 and other 5 test cases , X 45 and X 46 , the first similarity parameters X 51 , X 52 , X 53 , X 54 and X 56 between test case 5 and other 5 test cases, between test case 6 and other 5 test cases
  • the first similarity parameters X 61 , X 62 , X 63 , X 64 and X 65 are examples of the first similarity parameters X 61 , X 62 , X 63 , X 64 and X 65 .
  • Step 205 Based on the m-1 first similarity parameters corresponding to each test case to be recommended, determine the first prediction value of each test case to be recommended for the target label.
  • test case 1 the five first similarity parameters X 12 , X 13 , X 14 , X 15 and X 16 of test case 1 are analyzed and processed to obtain the first Predictive value. The same is true for other test cases, which will not be described in detail here.
  • Step 206 Determine the error similarity parameters between the target tag and other tags based on the reference scores of the m test cases to be recommended for the n reference tags, and obtain n-1 second similarity parameters.
  • the reference scores of m test cases to be recommended for n reference tags select the reference scores of m test cases to be recommended for target tags, and the reference scores of m test cases to be recommended for other tags.
  • the two sets of reference scores are calculated and analyzed to obtain the second similarity parameter of the target tag with respect to the other tag. Since there are n reference tags in total, it can be determined to obtain the second similarity parameters between the target tag and other n-1 other tags, thereby obtaining n-1 second similarity parameters.
  • the reference scores of the 6 test cases to be recommended for the 4 reference labels are obtained, and S 1A , S 2A , S 3A , S 4A , S 5A and S 6A , assuming that other labels are B, obtain the reference scores of the 6 test cases to be recommended for other labels B, and obtain S 1B , S 2B , S 3B , S 4B , S 5B and S 6B , therefore, S 1A , S 2A , S 3A , S 4A , S 5A and S 6A as well as S 1B , S 2B , S 3B , S 4B , S 5B and S 6B can be analyzed to determine the relationship between target tag A and other tags B between the second similarity parameter X AB ; similarly, the second similarity parameter X AC between the target tag A and other tags C, the second similarity parameter X AD between the target tag A and other tags D , thus obtaining
  • Step 207 based on the n-1 second similarity parameters, determine the second predicted value of each test case to be recommended for the target label.
  • the first prediction value is determined by the similarity between each test case to be recommended and the test cases to be recommended except for each test case to be recommended in the m test cases to be recommended
  • the second prediction value is determined by the target label The similarity between the n reference tags and the tags other than the target tag is determined.
  • the n-1 second similarity parameters are analyzed and processed for each test case to be recommended to obtain the second predicted value of each test case to be recommended for the target label.
  • test case 1 is aimed at the target label A the second predicted value of .
  • second predicted values for the target labels of the test case 2, the test case 3, the test case 4, the test case 5 and the test case 6 can be obtained.
  • Step 208 determining the dynamic weight corresponding to each test case to be recommended.
  • the number of tags included in each test case to be recommended and the number of tags included in m test cases to be recommended are analyzed to determine the dynamic weight corresponding to each test case to be recommended.
  • Step 209 Determine m third predictive values based on each dynamic weight, the corresponding first predictive value, and the corresponding second predictive value.
  • the dynamic weight corresponding to test case 1, the first predicted value of test case 1 and the second predicted value of test case 2 are analyzed, and the third predicted value corresponding to test case 1 is determined, similarly , the third predicted values corresponding to test case 2, test case 3, test case 4, test case 5 and test case 6 can be obtained respectively.
  • Step 210 based on the m third predicted values, determine a first preset number of target recommended test cases from the m test cases to be recommended.
  • the m third predictive values are analyzed, for example, the m third predictive values can be sorted according to the size relationship to obtain the sorting results, and then the first preset number of the largest values are selected. three predicted values, and determine a first preset number of test cases to be recommended corresponding to the third predicted value from the m test cases to be recommended as the first preset number of target recommended test cases.
  • Step 211 responding to the request message, displaying a first preset number of target recommended test cases.
  • the first preset number of target recommendation test cases are displayed in the corresponding display area in response to the request message, so that testers can use the first prediction Number of target recommended test cases for test analysis.
  • step 203 may be implemented by steps 203a-203d:
  • Step 203a determine the preset score of each test case to be recommended for each reference label, and obtain n preset scores of each test case to be recommended.
  • different preset scores are used for identification according to whether the test case to be recommended includes a reference tag. For example, when the test case to be recommended includes a reference tag, the preset score of the test case to be recommended for the reference tag can be If it is set to a non-zero value, when the test case to be recommended does not include a reference tag, the preset score of the test case to be recommended for the reference tag can be set to zero.
  • the preset score of the test case to be recommended for the reference tag can be set to 1; Set score can be set to zero.
  • Step 203b Perform calculation processing on the n preset scores of each test case to be recommended to obtain a first value.
  • the first value can be obtained by performing a simple accumulation operation on the n preset scores of each test case to be recommended. In some application scenarios, the first value can also be obtained by performing mean calculation on the n preset scores of each test case to be recommended.
  • Step 203c Perform calculation processing on each preset score and m of each test case to be recommended to obtain the second value of each reference label corresponding to each test case to be recommended.
  • each preset score and m of each test case to be recommended for example, an operation method that can perform a simple product operation, or other operation methods such as a weighted product operation, can be used for operation processing to obtain, The second value of each reference tag corresponding to each test case to be recommended.
  • Step 203d perform calculation processing on the second value and the first value of each reference tag corresponding to each test case to be recommended to obtain a reference score for each reference tag of each test case to be recommended.
  • the second value and the first value of each reference tag corresponding to each test case to be recommended can be calculated using, for example, a ratio operation, or an operation method such as seeking a quotient, and each test to be recommended can be obtained Use case reference score for each reference label.
  • the reference score of each test case to be recommended for each reference label is determined through the same reference score calculation method, which effectively ensures the consistency of the determined reference scores and improves the reliability of the determined reference scores.
  • step 205 may be implemented by steps 205a-205c:
  • Step 205a From the m-1 first similarity parameters corresponding to each test case to be recommended, select a second preset number of first target similarity parameters corresponding to each test case to be recommended.
  • the second preset quantity can be an empirical value obtained from a large number of experiments, or an empirical value calculated from an empirical formula obtained from a large number of experiments, or it can also be an empirical value obtained by testers according to their actual needs. An experience value obtained by setting.
  • the second preset quantity can be determined by calculating the product of m-1 and the preset ratio, and the preset ratio can be an empirical value obtained based on a large number of experiments, or it can be determined by a tester Set according to your actual needs.
  • the first m-1 first target similarity parameters corresponding to each test case to be recommended A similarity parameter is sorted in order based on the size relationship, and then from the sorted m-1 first similarity parameters, select the largest first second preset number of first similarity parameters, so as to obtain the second preset number A first target similarity parameter.
  • the second preset number is 3, correspondingly, for the 5 first similarity parameters X 12 , X 13 , X 14 , X 15 and X 16 of test case 1, the 3 first similarity parameters selected therefrom A target similarity parameter is X 12 , X 13 and X 14 .
  • Step 205b From the reference scores of the m test cases to be recommended for the n reference labels, determine the reference scores of other test cases corresponding to the target labels in each first target similarity parameter, and obtain a second preset number of first A target score.
  • test case 1 from the reference scores of m test cases to be recommended for n reference tags, for test case 1, based on the three first target similarity parameters X 12 , X 13 and X 14 , the test The use case 2, the test case 3 and the test case 4 aim at the reference score of the target label A, and obtain three first target scores S 2A , S 3A and S 4A .
  • Step 205c based on the second preset number of first target scores and the second preset number of first target similarity parameters, determine the first predictive value of each test case to be recommended.
  • the three first target scores and three first target similarity parameters are analyzed to determine the first predictive value of each test case to be recommended.
  • test case 1 the three first target scores S 2A , S 3A and S 4A , and the three first target similarity parameters X 12 , X 13 and X 14 are analyzed to determine the test case 1 the first predicted value of .
  • the implementation process of determining the first predicted value of other test cases refer to the implementation process of determining the first predicted value of test case 1, which will not be described in detail here.
  • the application specifically defines the method for determining the first predictive value of each test case to be recommended, and the unification of the method for determining the first predictive value of each test case to be recommended effectively ensures the determination of each test case to be recommended. Test the accuracy of the first predicted value of the case, improving the high reliability of the final recommendation.
  • step 205c may be implemented by steps a11-a14:
  • Step a11 Perform calculation processing on each first target score of each test case to be recommended and the corresponding first target similarity parameter to obtain a second preset number of first values for each test case to be recommended.
  • each first target score of each test case to be recommended and the corresponding first target similarity parameter for example, multiplication or other calculation methods can be used for calculation and processing to obtain each test case to be recommended Since each test case to be recommended includes a second preset number of first target similarities, a second preset number of first values can be determined for each test case to be recommended.
  • Step a12 Perform calculation processing on the second preset number of first values of each test case to be recommended to obtain the second value of each test case to be recommended.
  • the second preset number of first values of each test case to be recommended can be calculated by using an accumulation operation method or a weighted accumulation operation method to obtain the second value of each test case to be recommended .
  • Step a13 performing calculation processing on the second preset number of first target similarity parameters of each test case to be recommended to obtain a third value of each test case to be recommended.
  • the second preset number of first target similarity parameters of each test case to be recommended can be calculated by using an accumulation operation method or a weighted accumulation operation method to obtain the number of each test case to be recommended. third value.
  • Step a14 Perform calculation processing on the second value of each test case to be recommended and the third value of each test case to be recommended to obtain the first predicted value of each test case to be recommended.
  • the second value of each test case to be recommended and the third value of each test case to be recommended can be calculated by using ratio calculation or quotient calculation method to obtain each test case to be recommended the first predicted value of .
  • the calculation formula for the first predicted value PDBR(1, A) of test case 1 can be written as In the same way, the first predicted value PDBR(2, A) of test case 2, the first predicted value PDBR(3, A) of test case 3, the first predicted value PDBR(4, A) of test case 4, test Use the first predicted value PDBR(5,A) of case 5, and test the first predicted value PDBR(6,A) of case 6.
  • the specific implementation method for determining the first predictive value of each test case to be recommended is defined, and the unification of the method for determining the first predictive value of each test case to be recommended is carried out, effectively ensuring the determination of each test case to be recommended.
  • the accuracy of the first predicted value improves the high reliability of the final recommendation.
  • step 206 may be implemented by steps 206a-206b:
  • Step 206a from the reference scores of m test cases to be recommended for n reference labels, obtain the reference scores of each test case to be recommended for the target label and the corresponding test cases for each test case to be recommended for n-1 other labels Reference score.
  • the reference scores of each test case to be recommended for the target label are obtained, and S 1A , S 2A , S 3A , S 4A are obtained , S 5A and S 6A ; get S 1B , S 1C and S 1D , S 2B , S 2C and S 2D , S 3B , S 3C and S 3D , S 4B , S 4C and S 4D , S 5B , S 5C and S 5D , and S 6B , S 6C and S 6D .
  • Step 206b Use the preset similarity algorithm to calculate the similarity between the reference scores of the n test cases to be recommended for the target label and the corresponding reference scores of the n test cases to be recommended for other labels, and obtain n-1 second similarity degree parameter.
  • the preset similarity algorithm may be a Pearson similarity algorithm, or a modified cosine similarity algorithm, or a cosine similarity algorithm, or the like.
  • step 207 may be implemented by steps 207a-207d:
  • Step 207a Select a third preset number of second target similarity parameters from the n-1 second similarity parameters.
  • the third preset number is less than or equal to n-1.
  • the third preset number may be an empirical value obtained according to a large number of experiments, or may be an empirical value obtained by calculating n-1 using an empirical formula. Sorting the n-1 second similarity parameters in order according to the size relationship, and then selecting the third preset number of second target similarity parameters with the largest value from the sorted n-1 second similarity parameters .
  • the second similarity parameter of the previous preset ratio is selected from X AB , X AC and X AD , assuming that the third preset number is 2, and the corresponding two second target similarity parameters are X AB and X AC .
  • Step 207b Obtain m second target scores corresponding to the reference tags corresponding to each second target similarity parameter from the reference scores of the m test cases to be recommended for the n reference tags.
  • the second target score is a reference score corresponding to a reference label other than the target label corresponding to each second target similarity parameter for each test case to be recommended.
  • two second target similarity parameters are obtained, which are m test cases to be recommended for target tag A in X AB and X AC m reference scores of m test cases to be recommended for other labels B, m second target scores for other labels B, and m reference scores of m test cases to be recommended for other labels C Score, get m second target scores for other labels C.
  • Step 207c using the average value processing method to perform calculation processing on the m second target scores corresponding to the reference tags corresponding to each second target similarity parameter, to obtain the third preset number plus one fourth value.
  • the average processing method may be a simple average calculation method, or other weighted average algorithms.
  • the m second target scores of the target label A are calculated using the mean value processing method to obtain the fourth value corresponding to the target label A;
  • the m second target scores of the other label B are calculated using the mean value processing method processing to obtain the fourth value corresponding to other label B;
  • the mean value processing method to obtain the fourth value corresponding to other label C, so that three fourth values can be obtained value.
  • Step 207d based on the third preset number of second target similarity parameters, the second target score of each test case to be recommended corresponding to the third preset number of second target similarity parameters, and the third preset number of second target similarity parameters Four numeric values that determine the second predicted value.
  • the second target of each test case to be recommended corresponding to the third preset number of second target similarity parameters
  • the score and the third preset quantity plus a fourth numerical value are analyzed and calculated to obtain a second predicted value.
  • the unification of the method for determining the second predicted value of each test case to be recommended is carried out, effectively ensuring the determination of the second predicted value of each test case to be recommended accuracy and improve the high reliability of the final recommendation.
  • step 207d may be implemented by steps b11-b15:
  • Step b11 Perform calculation processing on the second target score and the corresponding fourth value of each test case to be recommended corresponding to each second target similarity parameter, and obtain each to-be-recommended test case corresponding to each second target similarity parameter.
  • the second target score and the corresponding fourth value of each test case to be recommended corresponding to each second target similarity parameter can be calculated using a difference operation or a weighted difference operation method, to obtain the fifth numerical value of each test case to be recommended corresponding to each second target similarity parameter.
  • Step b12 performing calculation processing on each second target similarity parameter and the corresponding fifth value to obtain a sixth value corresponding to each second target similarity parameter.
  • the multiplication operation method or the weighted product operation method can be used to perform calculation processing on each second target similarity parameter and the corresponding fifth value, and the sixth value corresponding to each second target similarity parameter can be obtained .
  • Step b13 performing arithmetic processing on the third preset number of sixth values to obtain a seventh value.
  • the cumulative sum calculation method or the weighted cumulative sum calculation method may be used to perform calculation processing on the third preset number of sixth values to obtain the seventh value.
  • Step b14 performing calculation processing on the third preset number of second target similarity parameters to obtain an eighth value.
  • the cumulative sum calculation method or the weighted cumulative sum calculation method may be used to perform calculation processing on the third preset number of second target similarity parameters to obtain the eighth value.
  • Step b15 performing arithmetic processing on the seventh value and the eighth value to obtain the first reference value.
  • Step b16 accumulating the first reference value and the fourth value corresponding to the target label to obtain a second predicted value.
  • the second predicted value P PCC (1, A) of test case 2 for target label A can be calculated, the second predicted value P PCC (3, A) of test case 3 for target label A, and test case 4 for The second predicted value P PCC (4, A) of the target label A, the second predicted value P PCC (5, A) of the test case 5 for the target label A, the second predicted value P PCC of the test case 6 for the target label A (6, A).
  • the aforementioned is the fourth value corresponding to the target label A, is the fourth numerical value corresponding to the reference label B, is the fourth value corresponding to the reference label C.
  • step 208 may be implemented by steps 208a-208d:
  • Step 208a determine the number of tags included in each test case to be recommended.
  • the number of tags included in test case 1 is 2
  • the number of tags included in test case 2 is 2
  • the number of tags included in test case 3 is 2
  • the number of tags included in test case 4 is The number of tags is 2
  • the number of tags included in test case 5 is 1, and the number of tags included in test case 6 is 2.
  • Step 208b Perform calculations on the first preset weight value corresponding to each test case to be recommended and the corresponding label quantity to obtain a ninth value corresponding to each test case to be recommended.
  • the first preset weight value corresponding to each test case to be recommended may be the experience value set by the tester according to each test case, or it may be based on a large number of first weight values corresponding to each test case to be recommended.
  • the model adopted when using a model training method to determine the first preset weight value according to a large number of test samples of the first preset weight value corresponding to each test case to be recommended, the model adopted may be as follows: Among them, L ij represents the historical prediction recommendation score when a test case to be recommended recommends tag i, R ij represents the real recommendation score when a test case to be recommended recommends tag i, and n is a test case to be recommended The total number of samples for recommendation on i-label.
  • Step 208c determine the ratio of the ninth value corresponding to each test case to be recommended to n, and obtain the tenth value corresponding to each test case to be recommended.
  • Step 208d determines the minimum value of the tenth numerical value corresponding to each test case to be recommended and the second preset weight value to obtain the dynamic weight corresponding to each test case to be recommended.
  • the second preset weight value is an empirical value obtained from a large number of experiments. Usually, the second preset weight value can be set to 1.
  • step 209 may be implemented by steps 209a-209c:
  • Step 209a performing calculations on each dynamic weight and the corresponding second predicted value to obtain a second reference value.
  • the product operation method may be used for each dynamic weight and the corresponding second predicted value to obtain the second reference value corresponding to each test case to be recommended.
  • Step 209b Calculate the difference between 1 and each dynamic weight and the corresponding first predicted value to obtain a third reference value.
  • the difference between 1 and each dynamic weight and the corresponding first predicted value may be calculated by using a multiplication method to obtain the third reference value.
  • a division operation method or a quotient operation method may also be performed on the difference between 1 and each dynamic weight and the corresponding first predicted value.
  • step 209c perform an operation on each second reference value and the corresponding third reference value to obtain m third predicted values.
  • the second reference value of each to-be-recommended test case and the corresponding third reference value may be summed or ratio calculated to obtain m third predicted values.
  • the third predicted value P(1, A) D1*P PCC (1, A)+(1-D1)*P DBR (1, A) for the test case 1, wherein, D1 is the test case 1 corresponds to the dynamic weight.
  • the unity of the method for determining the third predicted value for each test case to be recommended is realized, and the third prediction for each test case to be recommended is effectively guaranteed.
  • the uniformity among the values ensures the comparability between the third predicted values of each test case to be recommended, and improves the high reliability of the final recommendation.
  • step 209c may be implemented by steps c11-c12:
  • Step c11 if the target tags include p, calculate each second reference value of each target tag for each test case to be recommended and the corresponding third reference value to obtain P targets for each test case to be recommended The P fourth predictors of labels.
  • p is an integer greater than or equal to 2.
  • the aforementioned method is used to determine the second reference value and the corresponding third reference value for each target tag for each test case to be recommended, and calculate Obtain the fourth predicted value of each target label for each test case to be recommended.
  • test case 1 includes target label A and target label B
  • the fourth prediction value of test case 2 for target label A is P(2, A) and P(2, B)
  • test case 3 is for target
  • the fourth predicted value of label A is P(3, A) and P(3, B)
  • the fourth predicted value of test case 4 for target label A is P(4, A) and P(4, B)
  • the test The fourth predicted value of use case 5 for target label A is P(5, A) and P(5, B)
  • the fourth predicted value of test case 6 for target label A is P(6, A) and P(6, B).
  • Step c12 Perform calculation processing on the P fourth predicted values of the P target labels for each test case to be recommended to obtain m third predicted values.
  • the P fourth predicted values for the P target tags can be calculated by using the calculation method of summing or averaging, and the value of each test case to be recommended is obtained.
  • the third predicted value, and then the third predicted value of the m test cases to be recommended can be obtained.
  • test case 1 performs a summation calculation on the two fourth predicted values corresponding to target label A and target label B respectively, and obtains the third predicted value of test case 1 as P(1, A)+ P(1,B).
  • step 211 may be implemented by steps 211a-211c:
  • Step 211a in response to the request message, determine the objects to be tested corresponding to the first preset number of target recommended test cases.
  • the object to be tested is a software product that testers need to test with the first preset number of target recommended test cases, such as an updated and upgraded application program to be tested, which will be delivered to the user after passing the test use.
  • Step 211b generating a target relationship diagram based on the object to be tested, the first preset number of target recommendation test cases and target labels.
  • a target relationship diagram is generated according to various functional modules included in the object to be tested, a first preset number of target recommended test cases, and target labels.
  • the target relationship graph may be obtained by using the first preset number of target recommended test cases and target labels to update the information parameters of the preset relationship graph corresponding to the test object.
  • the third predicted value of each target recommendation test case for each target label may also be displayed in the target relationship diagram.
  • Step 211c displaying the target relationship diagram.
  • the target relationship diagram is displayed in the target display area of the test test, so that the tester can visually see the impact of the first preset number of target recommended test cases on the test object according to the target relationship diagram, Quickly call the first preset number of target recommended test cases to test the object to be tested, which improves the test efficiency during the test process and reduces the complicated operation process that testers need to manually find test cases by themselves.
  • the embodiment of the present application provides an information recommendation method, as shown in FIG. 3 , and the specific implementation process is shown in the following steps: step 31, determine the target label; step 32, determine the test case to be recommended with the target label and The dynamic weight of the test case to be recommended; step 33, using the hybrid weight algorithm to calculate the third predicted value of each test case to be recommended for the target label; step 34, based on the third predicted value of each test case to be recommended for the target label , determine the target recommendation test case; step 35, update the preset relationship diagram with the target recommendation test case and the corresponding third predicted value; step 36, send the target recommendation test case to the test platform to realize the test process; step 37, if the detection When a new test case or a new label is found, the preset relationship diagram is updated; step 38 , based on the third predicted value of the target recommended test case for the target label, update the dynamic weight of the corresponding to-be-recommended test case.
  • step 33 determines the target label
  • step 34 determine the hybrid weight algorithm to calculate the third predicted
  • An obtained target relationship diagram can be shown in Figure 4, which includes: the product to be tested Y; each functional module implemented by the product to be tested, including at least a payment module Y11, a payment method Y12, a risk assessment Y13, and an account module Y14 , Participation tool Y15, knowledge base Y16 and insurance module Y17; test cases include at least: SMS 1Y21, SMS 2Y22, SMS 3Y23, SMS 3Y24, pay attention now Y25, usage scenario Y26, management console fill Y27, pull Timing Y28, question and answer push Y29, and stock Y210; labels include at least: applet Y31, web page Y32, inline Y33, front end Y34, and result page Y35, among them, the arrow connecting the arrow between every two circles in the target relationship diagram The direction indicates the relationship between the objects represented by the two circles.
  • the product to be tested is referred to as product
  • the functional modules implemented by the product to be tested are referred to as modules
  • the test cases are referred to as test cases
  • the relationship between labels can be referred to as shown in Figure 5, that is, the product to be tested is composed of various functional modules, each function Modules are tested with different test cases, and each test case is identified with a different label.
  • the information recommendation device detects a request message for requesting a test case including a target tag, after obtaining m test cases to be recommended of the target tag, determine the tags included in each test case to be recommended, and obtain m N reference labels included in each test case to be recommended, and based on the target label, n reference labels and m test cases to be recommended, determine the first prediction value of each test case to be recommended for the target label and each test case to be recommended Use the second predicted value of the target label, and determine the dynamic weight corresponding to each test case to be recommended, and then determine m third predictions based on each dynamic weight, the corresponding first predicted value, and the corresponding second predicted value value, and based on the m third predicted values, after determining the first preset number of target recommended test cases from the m test cases to be recommended, responding to the request message, displaying the first preset number of target recommended test cases, thus, The first predictive value representing the similarity between test cases and the test cases and the second predictive value representing the similarity between
  • the information recommendation device 4 may include: a processor 41, a memory 42, and a communication bus 43, wherein:
  • Memory 42 used to store executable instructions
  • a communication bus 43 is used to realize the communication connection between the processor 41 and the memory 42;
  • the processor 41 is configured to execute the information recommendation program stored in the memory 42, so as to realize the following steps:
  • m test cases to be recommended including the target label If a request message for requesting a test case including the target label is detected, obtain m test cases to be recommended including the target label; wherein, m is an integer greater than or equal to 1;
  • n reference labels include the target label, and n is an integer greater than or equal to 1;
  • n reference labels and m test cases to be recommended determine the first predicted value of each test case to be recommended for the target label and the second predicted value of each test case to be recommended for the target label;
  • a predictive value is determined by the similarity between each test case to be recommended and m test cases to be recommended except for each corresponding test case to be recommended, and the second predictive value is determined by the target label and n Determination of the similarity between tags other than the target tag in the reference tag;
  • the processor 41 executes steps to determine the first predicted value and The second predicted value of each test case to be recommended for the target label can be achieved by the following steps:
  • test cases to be recommended Based on the reference scores of m test cases to be recommended for n reference labels, determine the similarity parameters between each test case to be recommended and other test cases, and obtain the m-1 first similarities corresponding to each test case to be recommended Degree parameter; Wherein, other test cases are each test case to be recommended except each corresponding test case to be recommended in the m test cases to be recommended;
  • n reference tags Based on the reference scores of m test cases to be recommended for n reference tags, determine the error similarity parameters between the target tag and other tags, and obtain n-1 second similarity parameters; where other tags are n reference tags Every reference label in , except the target label;
  • the second prediction value of each test case to be recommended for the target label is determined.
  • Operational processing is performed on the second value and the first value of each reference label corresponding to each test case to be recommended to obtain a reference score for each reference label of each test case to be recommended.
  • the processor 41 executes the step of determining the first predictive value of each test case to be recommended based on m-1 first similarity parameters corresponding to each test case to be recommended. , can be achieved by the following steps:
  • the first predictive value of each test case to be recommended is determined.
  • the processor 41 executes the step of determining each test case to be recommended based on the second preset number of first target scores and the second preset number of first target similarity parameters
  • the processor 41 executes the step of determining each test case to be recommended based on the second preset number of first target scores and the second preset number of first target similarity parameters
  • Operational processing is performed on the second value of each test case to be recommended and the third value of each test case to be recommended to obtain the first predicted value of each test case to be recommended.
  • the processor 41 performs steps to determine the error similarity parameters between the target tag and other tags based on the reference scores of m test cases to be recommended for n reference tags, and obtain n
  • steps to determine the error similarity parameters between the target tag and other tags based on the reference scores of m test cases to be recommended for n reference tags and obtain n
  • -1 second similarity parameter it can be realized by the following steps:
  • a preset similarity algorithm is used to calculate the similarity between the reference scores of n test cases to be recommended for the target label and the corresponding reference scores of n test cases to be recommended for other labels to obtain n-1 second similarity parameters.
  • m second target scores corresponding to reference labels other than the target label corresponding to each second target similarity parameter are obtained; wherein, the second target score A reference score corresponding to a reference label other than the target label corresponding to each second target similarity parameter for each test case to be recommended;
  • a second predicted value is determined.
  • the processor 41 executes steps based on the third preset number of second target similarity parameters, and each to-be-recommended target corresponding to the third preset number of second target similarity parameters.
  • steps can be implemented:
  • An operation is performed on the seventh value and the eighth value to obtain a second predicted value.
  • the processor 41 when the processor 41 executes the step of determining the dynamic weight corresponding to each test case to be recommended, it may be implemented by the following steps:
  • the processor 41 executes steps to perform operations on each eighth numerical value and the corresponding ninth numerical value to obtain m third predicted values, which can be achieved by the following steps:
  • each test case to be recommended for each eighth value of each target tag and the corresponding ninth value are calculated to obtain the Pth values of each test case to be recommended for P target tags Four predicted values; wherein, p is an integer greater than or equal to 2;
  • the P fourth predictive values for the P target labels are calculated to obtain m third predictive values.
  • the processor 41 when the processor 41 executes the step of responding to the request message and displaying the first preset number of target recommended test cases, it may be implemented by the following steps:
  • the information recommendation device detects a request message for requesting a test case including a target tag, after obtaining m test cases to be recommended of the target tag, determine the tags included in each test case to be recommended, and obtain m N reference labels included in each test case to be recommended, and based on the target label, n reference labels and m test cases to be recommended, determine the first prediction value of each test case to be recommended for the target label and each test case to be recommended Use the second predicted value of the target label, and determine the dynamic weight corresponding to each test case to be recommended, and then determine m third predictions based on each dynamic weight, the corresponding first predicted value, and the corresponding second predicted value value, and based on the m third predicted values, after determining the first preset number of target recommended test cases from the m test cases to be recommended, responding to the request message, displaying the first preset number of target recommended test cases, thus, The first predictive value representing the similarity between test cases and the test cases and the second predictive value representing the similarity between
  • the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium for short, where one or more programs are stored in the computer-readable storage medium, and the one or more programs can be used by one or more
  • the processor executes to realize the implementation process of the information recommendation method provided in the embodiments corresponding to FIGS. 1 to 2 , which will not be repeated here.
  • An embodiment of the present application provides an information recommendation method, device, and storage medium, the method including: if a request message for requesting a test case including a target tag is detected, acquiring m test cases to be recommended including the target tag; Wherein, m is an integer greater than or equal to 1; determine the labels included in each of the test cases to be recommended, and obtain n reference labels included in the m test cases to be recommended; wherein, the n reference labels include the target label, n is an integer greater than or equal to 1; based on the target label, the n reference labels and the m test cases to be recommended, determine the first test case for each of the test cases to be recommended for the target label predictive value and the second predictive value of each of the test cases to be recommended for the target label; determine the dynamic weight corresponding to each of the test cases to be recommended; based on each of the dynamic weights, the corresponding first The predicted value and the corresponding second predicted value determine m third predicted values; based on the m third predicted values, determine a first preset number of

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Complex Calculations (AREA)

Abstract

一种信息推荐方法、设备和存储介质,其中上述方法包括:若检测到用于请求包括目标标签的测试用例的请求消息,获取包括目标标签的m个待推荐测试用例(101);确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签(102);基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值(103);确定每一待推荐测试用例对应的动态权重(104);基于每一动态权重、对应的第一预测值和第二预测值,确定m个第三预测值(105);基于m个第三预测值从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例(106);显示第一预设数量个目标推荐测试用例(107)。

Description

一种信息推荐方法、设备及存储介质
相关申请的交叉引用
本申请基于申请号为202110694029.4、申请日为2021年6月22日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及测试技术领域,尤其涉及一种信息推荐方法、设备及存储介质。
背景技术
随着计算机技术的飞速发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性和实时性要求,也对技术提出了更高的要求。随着互联网技术的飞速发展,互联网对人们的生活、学习、娱乐等方面均造成了重大影响。在发布各种应用程序前,需要对发布的应用程序采用各种测试用例进行各种测试,以保证发布的应用程序的性能最稳定。目前,在确定测试用例对应用程序进行测试时,通常是采用关键词进行简单检索的方式来确定得到测例用例,并通过检索到的测试用例来进行测试的。
但是,目前常用的测试用例确定方式较为简单,导致确定的测试用例匹配度较低,造成测试效果较差。
发明内容
为解决上述技术问题,本申请实施例期望提供一种信息推荐方法、设备及存储介质,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。
本申请的技术方案是这样实现的:
第一方面,一种信息推荐方法,所述方法包括:
若检测到用于请求包括目标标签的测试用例的请求消息,获取包括所述目标标签的m个待推荐测试用例;其中,m为大于或等于1的整数;
确定每一所述待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签;其中,n个所述参考标签包括所述目标标签,n为大于或等于1的整数;
基于所述目标标签、n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对所述目标标签的第一预测值和每一所述待推荐测试用例针对所述目标标签的第二预测值;
确定每一所述待推荐测试用例对应的动态权重;
基于每一所述动态权重、对应的所述第一预测值和对应的所述第二预测值,确定m个第三预测值;
基于m个所述第三预测值,从m个所述待推荐测试用例中确定第一预设数量个目标推荐测试用例;
响应所述请求消息,显示所述第一预设数量个所述目标推荐测试用例。
第二方面,一种信息推荐设备,所述设备包括:存储器、处理器和通信总线;其中:
所述存储器,用于存储可执行指令;
所述通信总线,用于实现所述处理器和所述存储器之间的通信连接;
所述处理器,用于执行所述存储器中存储的信息推荐程序,实现如上述任一项所述的信息推荐方法的步骤。
第三方面,一种存储介质,所述存储介质上存储有信息推荐程序,所述信息推荐程序被处理器执行时实现如上述任一项所述的信息推荐方法的步骤。
本申请实施例中,若信息推荐设备监测到用于请求包括目标标签的测试用例的请求消息,获取目标标签的m个待推荐测试用例后,确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签,并基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值,以及确定每一待推荐测试用例对应的动态权重,然后基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值,并基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例后,响应请求消息,显示第一预设数量个目标推荐测试用例,这样,通过每一测试用例的动态权重来权衡表示测试用例与测试用例之间的相似度的第一预测值和表示标签与标签之间的相似度的第二预测值,确定得到每一测试用例针对目标标签的第三预测值,并根据多个测试用例的第三预测值之间的关系来选择最终可推荐的目标推荐测试用例,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。
附图说明
图1为本申请实施例提供的一种信息推荐方法的流程示意图;
图2为本申请实施例提供的另一种信息推荐方法的流程示意图;
图3为本申请实施例提供的又一种信息推荐方法的流程示意图;
图4为本申请实施例提供的一种目标关系图的示意图;
图5为本申请实施例提供的一种数据传输示意图;
图6为本申请实施例提供的一种信息推荐设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
本申请的实施例提供一种信息推荐方法,参照图1所示,方法应用于信息推荐设备,该方法包括以下步骤:
步骤101、若检测到用于请求包括目标标签的测试用例的请求消息,获取包括目标标签的m个待推荐测试用例。
其中,m为大于或等于1的整数。
在本申请实施例中,用于请求包括目标标签的测试用例的请求消息可以是用户对信息推荐设备进行目标标签选择操作生成的,即用户对信息推荐设备上显示的测试界面上的标签选择参数进行选择,选择为目标标签后点击确认时,生成得到请求消息。标签用于对测试用例进行标识,例如可以是对测试用例的类别、测试功能等进行分类的一种标识信息,一个测试用例可以由多个不同的标签。目标标签至少包括一个标签,但是在一些应用场景下,目标标签也可以为空,即用户选择测试用例时,并未选定任何一个标签。在目标标签不为空时,对应的m为测试用例集合中具有目标标签的测试用例的全部数量;在目标标签为空时,m为预先设置的一个经验值,例如可以是用户,通常为测试人员根据自己实际需求进行设定的一个经验值,也可以是根据大量实验得到一个经验值,具体情况可以由实际情况来决定,此处不做具体限定。
步骤102、确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签。
其中,n个参考标签包括目标标签,n为大于或等于1的整数。
在本申请实施例中,对确定的包括目标标签的m个待推荐测试用例进行包括的标签统计,得到m个待推荐测试用例包括的全部n个参考标签。
步骤103、基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值。
其中,第一预测值由每一待推荐测试用例与m个待推荐测试用例中除对应的每一待推荐测试用例外的待推荐测试用例之间的相似度确定,第二预测值由目标标签与n个参考标签中除目标标签外的标签之间的相似度确定。
在本申请实施例中,对目标标签、m个待推荐测试用例包括的n个参考标签和m个待推荐测试用例,对每一待推荐测试用例与其他测试用例之间的相似度分析计算,确定每一待推荐测试用例针对目标标签的第一预测值;对目标标签、m个待推荐测试用例包括的n个参考标签和m个待推荐测试用例,对目标标签与n个参考标签中除目标标签外的其他标签之间的相似度分析计算,得到每一待推荐测试用例针对目标标签的第二预测值。
步骤104、确定每一待推荐测试用例对应的动态权重。
在本申请实施例中,每一待推荐测试用例对应的动态权重在不同场景下,是动态改变的,并不是唯一不变的,能够根据每一待推荐测试用例在不同场景下,不同标签与测试用例之间的个性差异。
步骤105、基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值。
在本申请实施例中,采用每一动态权重,对对应的第一预测值和对应的第二预测值进行动态调整,得到每一待推荐测试用例对应的第三预测值,从而得到m个待推荐测试用例分别对应的m个第三预测值。
步骤106、基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例。
在本申请实施例中,对m个待推荐测试用例对应的m个第三预测值进行分析,以从m个待推荐测试用例中确定得到第一预设数量个目标推荐测试用例。目标推荐测试用例是与目标标签符合度较高的待推荐测试用例,能够满足测试人员的测试需求。第一预设数量可以是根据大量实验得到的一个经验值,也可以是根据经验算法基于m之间的关系确定得到的一个经验值,具体可以由实际情况来决定,此处不做具体限定。
步骤107、响应请求消息,显示第一预设数量个目标推荐测试用例。
在本申请实施例中,信息推荐设备响应请求消息,将确定得到的第一预设数量个目标推荐测试用例进行显示,以供测试人员决定是否基于目标推荐测试用例对待测试对象例如待测试应用程序的某一项或者几项功能进行测试。
本申请实施例中,若信息推荐设备监测到用于请求包括目标标签的测试用例的请求消息,获取目标标签的m个待推荐测试用例后,确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签,并基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值,以及确定每一待推荐测试用例对应的动态权重,然后基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值,并基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例后,响应请求消息,显示第一预设数量个目标推荐测试用例,这样,通过每一测试用例的动态权重来权衡表示测试用例与测试用例之间的相似度的第一预测值和表示标签与标签之间的相似度的第二预测值,确定得到每一测试用例针对目标标签的第三预测值,并根据多个测试用例的第三预测值之间的关系来选择最终可推荐的目标推荐测试用例,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。
基于前述实施例,本申请的实施例提供一种信息推荐方法,参照图2所示,方法应用于信息推荐设备,该方法包括以下步骤:
步骤201、若检测到用于请求包括目标标签的测试用例的请求消息,获取包括目标标签的m个待推荐测试用例。
其中,m为大于或等于1的整数。
在本申请实施例中,以信息推荐测试设备为测试设备为例进行说明,测试设备可以是具有计算功能的设备,例如可以是计算机设备,测试人员对测试设备进行相应的操作,例如对测试设备当前显示的测试应用程序的测试应用界面进行操作,从显示的多个标签中输入目标标签,或者测试人员直接输入包括用户获取包括目标标签的测试用例的程序代码,以生成对应的请求消息,测试设备接收到请求消息后,从测试设备对应的测试用例库中选取包括目标标签的全部待推荐测试用例,即得到包括目标标签的m个待推荐测试用例。需说明的是,测试设备对应的全部测试用例可以存储在测试设备的本地存储区域中,也可以存储在测试设备可以访问的云端存储空间中。测试设备对应的全部测试用例可以是整个测试用例库中的全部测试用例,也可以是测试设备只能访问的整个测试用例库中的部分测试用例。
步骤202、确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签。
其中,n个参考标签包括目标标签,n为大于或等于1的整数。
在本申请实施例中,示例性的,假设获取到的包括目标标签的m个待推荐测试用例为6个待推荐测试用例,包括测试用例1、测试用例2、测试用例3、测试用例4、测试用例5和测试用例6,对应的,对每一待推荐测试用例包括的标签进行统计,例如统计得到测试用例1包括标签A和标签C,测试用例2包括标签A和标签B,测试用例3包括标签A和标签C,测试用例4包括标签A和标签D,测试用例5包括标签A,测试用例6包括标签A和标签B,由于可以确定这6个待推荐测试用例共包括n等于4个参考标签,依次为标签A、标签B、标签C和标签D。其中,假设目标标签为A。
步骤203、基于n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对每一参考标签的参考评分。
在本申请实施例中,对n个参考标签和m个待推荐测试用例包括的标签之间的关系,确定每一待推荐测试用例针对每一参考标签的参考评分。其中,n个参考标签和m个待推荐测试用例包括的标签之间的关系可以是m个待推荐测试用例中每一待推荐测试用例是否包括n个参考标签中的标签的关系。
示例性的,基于4个标签包括标签A、标签B、标签C和标签D以及6个待推荐测试用例,包括测试用例1、测试用例2、测试用例3、测试用例4、测试用例5和测试用例6,可以确定得到测试用例1针对标签A的参考评分S 1A,测试用例1针对标签B的参考评分S 1B,测试用例1针对标签C的参考评分S 1C,测试用例1 针对标签D的参考评分S 1D;同理,可以得到测试用例2针对标签A、标签B、标签C和标签D的参考评分S 2A、S 2B、S 2C和S 2D,测试用例3针对标签A、标签B、标签C和标签D的参考评分S 3A、S 3B、S 3C和S 3D,测试用例4针对标签A、标签B、标签C和标签D的参考评分S 4A、S 4B、S 4C和S 4D,测试用例5针对标签A、标签B、标签C和标签D的参考评分S 5A、S 5B、S 5C和S 5D,测试用例6针对标签A、标签B、标签C和标签D的参考评分S 6A、S 6B、S 6C和S 6D
步骤204、基于m个待推荐测试用例针对n个参考标签的参考评分,确定每一待推荐测试用例与其他测试用例之间的相似度参数,得到每一待推荐测试用例对应的m-1个第一相似度参数。
其中,其他测试用例为m个待推荐测试用例中除对应的每一待推荐测试用例外的每一待推荐测试用例。
在本申请实施例中,针对m个待推荐测试用例针对n个参考标签的参考评分,获取每一待推荐测试用例的针对n个参考标签的参考评分,与其他测试用例针对n个参考标签的参考评分,并对这两者采用预设的相似度计算方法进行相似度计算分析,确定得到每一待推荐测试用例与其他测试用例之间的第一相似度参数,由于总共有m个待推荐测试用例,所以针对每一待推荐测试用例,可以得到该待推荐测试用例与其他m-1个待推荐测试用例之间的第一相似度参数,因此,针对每一待推荐测试用例,可以得到m-1个第一相似度参数。
示例性的,计算测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例2针对4个标签的参考评分S 2A、S 2B、S 2C和S 2D之间的第一相似度参数X 12,计算测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例3针对4个标签的参考评分S 3A、S 3B、S 3C和S 3D之间的第一相似度参数X 13,计算测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例4针对4个标签的参考评分S 4A、S 4B、S 4C和S 4D之间的第一相似度参数X 14,计算测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例5针对4个标签的参考评分S 5A、S 5B、S 5C和S 5D之间的第一相似度参数X 15,计算测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例6针对4个标签的参考评分S 6A、S 6B、S 6C和S 6D之间的第一相似度参数X 16,得到测试用例1与其他5个测试用例之间的5个第一相似度参数。其中,以测试用例1针对4个标签的参考评分S 1A、S 1B、S 1C和S 1D与测试用例2针对4个标签的参考评分S 2A、S 2B、S 2C和S 2D之间的第一相似度参数X 12的计算方法可以以下通过公式计算得到。
Figure PCTCN2021136325-appb-000001
同理,可得到X 13,X 14、X 15和X 16
同理,可以得到测试用例2与其他5个测试用例之间的5个第一相似度参数X 21、 X 23、X 24、X 25和X 26,测试用例3与其他5个测试用例之间的5个第一相似度参数X 31、X 32、X 34、X 35和X 36,测试用例4与其他5个测试用例之间的5个第一相似度参数X 41、X 42、X 43、X 45和X 46,测试用例5与其他5个测试用例之间的第一相似度参数X 51、X 52、X 53、X 54和X 56,测试用例6与其他5个测试用例之间的第一相似度参数X 61、X 62、X 63、X 64和X 65
步骤205、基于每一待推荐测试用例对应的m-1个第一相似度参数,确定每一待推荐测试用例针对目标标签的第一预测值。
在本申请实施例中,针对每一待推荐测试用例,对其对应的m-1个第一相似度参数进行分析处理,确定得到其针对目标标签的第一预测值。
示例性的,针对测试用例1,对测试用例1的5个第一相似度参数X 12、X 13、X 14、X 15和X 16进行分析处理,得到测试用例1针对目标标签A的第一预测值。针对其他测试用例同理,此处不再详细赘述。
步骤206、基于m个待推荐测试用例针对n个参考标签的参考评分,确定目标标签与其他标签之间的误差相似度参数,得到n-1个第二相似度参数。
其中,其他标签为n个参考标签中除目标标签外的每一参考标签。
在本申请实施例中,对m个待推荐测试用例针对n个参考标签的参考评分选择m个待推荐测试用例针对目标标签的参考评分,以及m个待推荐测试用例针对其他标签的参考评分,并对这两组参考评分进行误差相似度计算分析处理,得到目标标签针对该其他标签的第二相似度参数。由于总共有n个参考标签,因此可以确定得到目标标签与其他n-1个其他标签之间的第二相似度参数,从而得到n-1个第二相似度参数。
示例性的,从6个待推荐测试用例针对4个参考标签的参考评分中,获取6个待推荐测试用例针对目标标签A对应的参考评分,得到S 1A、S 2A、S 3A、S 4A、S 5A和S 6A,假设其他标签为B时,获取6个待推荐测试用例针对其他标签B对应的参考评分,得到S 1B、S 2B、S 3B、S 4B、S 5B和S 6B,因此,可以对S 1A、S 2A、S 3A、S 4A、S 5A和S 6A以及S 1B、S 2B、S 3B、S 4B、S 5B和S 6B进行分析,确定得到目标标签A与其他标签B之间的第二相似度参数X AB;同理,可以得到目标标签A与其他标签C之间的第二相似度参数X AC、目标标签A与其他标签D之间的第二相似度参数X AD,如此得到针对目标标签A对应的3个第二相似度参数X AB、X AC和X AD
步骤207、基于n-1个第二相似度参数,确定每一待推荐测试用例针对目标标签的第二预测值。
其中,第一预测值由每一待推荐测试用例与m个待推荐测试用例中除对应的每一待推荐测试用例外的待推荐测试用例之间的相似度确定,第二预测值由目标标签与n个参考标签中除目标标签外的标签之间的相似度确定。
在本申请实施例中,对n-1个第二相似度参数针对每一待推荐测试用例进行分析处理,得到每一待推荐测试用例针对目标标签的第二预测值。
示例性的,针对目标标签A对应的3个第二相似度参数X AB、X AC和X AD以及对应测试用例1与目标标签之间的关系进行分析,确定得到的测试用例1针对目标标签A的第二预测值。同理,可以得到测试用例2、测试用例3、测试用例4、测试用例5以及测试用例6各自针对目标标签的第二预测值。
步骤208、确定每一待推荐测试用例对应的动态权重。
在本申请实施例中,对每一待推荐测试用例包括的标签数与m个待推荐测试用例包括的标签数进行分析,确定得到每一待推荐测试用例对应的动态权重。
步骤209、基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值。
在本申请实施例中,对测试用例1对应的动态权重、测试用例1的第一预测值和测试用例2的第二预测值进行分析,确定得到测试用例1对应的第三预测值,同理,可以分别得到测试用例2、测试用例3、测试用例4、测试用例5和测试用例6对应的第三预测值。
步骤210、基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例。
在本申请其他实施例中,对m个第三预测值进行分析,例如可以对m个第三预测值进行按照大小关系排序,得到排序结果,然后选择值最大的前第一预设数量个第三预测值,并从m个待推荐测试用例中确定第一预设数量个第三预测值对应的待推荐测试用例,作为第一预设数量个目标推荐测试用例。
步骤211、响应请求消息,显示第一预设数量个目标推荐测试用例。
在本申请实施例中,确定得到第一预设数量个目标推荐测试用例后,响应请求消息,将第一预设数量个目标推荐测试用例显示于对应的显示区域,以便测试人员使用第一预测数量个目标推荐测试用例进行测试分析。
这样,对m个待推荐测试用例以及m个待推荐测试用例对应的n个参考标签,从总体上对测试用例与测试用例之间的相似度性,以及目标标签与其他标签之间的相似度性进行综合分析,有效提高了推荐的第一预设数量个目标推荐测试用例的准确性。
基于前述实施例,在本申请其他实施例中,步骤203可以由步骤203a~203d来实现:
步骤203a、确定每一待推荐测试用例针对每一参考标签的预设评分,得到每一待推荐测试用例的n个预设评分。
在本申请实施例中,根据待推荐测试用例是否包括参考标签,来采用不同的预设评分进行标识,例如待推荐测试用例包括参考标签时,待推荐测试用例针对该参考标签的预设评分可以设置为一个非零的值,待推荐测试用例不包括参考标签时,待推荐测试用例针对该参考标签的预设评分可以设置为零。
示例性的,待推荐测试用例包括参考标签时,待推荐测试用例针对该参考标签 的预设评分可以设置为1,待推荐测试用例不包括参考标签时,待推荐测试用例针对该参考标签的预设评分可以设置为零。
步骤203b、对每一待推荐测试用例的n个预设评分进行运算处理,得到第一数值。
在本申请实施例中,可以对每一待推荐测试用例的n个预设评分进行简单的累加运算处理,即可得到第一数值。在一些应用场景中,也可以对每一待推荐测试用例的n个预设评分进行均值运算处理,即可得到第一数值。
步骤203c、对每一待推荐测试用例的每一预设评分与m进行运算处理,得到每一待推荐测试用例对应的每一参考标签的第二数值。
在本申请实施例中,对每一待推荐测试用例的每一预设评分与m可以采用例如可以进行简单的乘积运算的运算方法,或者进行加权乘积运算等其他运算方法进行运算处理,得到,每一待推荐测试用例对应的每一参考标签的第二数值。
步骤203d、对每一待推荐测试用例对应的每一参考标签的第二数值和第一数值进行运算处理,得到每一待推荐测试用例针对每一参考标签的参考评分。
在本申请试试中,对每一待推荐测试用例对应的每一参考标签的第二数值和第一数值可以采用例如比值运算,或者求商等运算方式进行运算处理,得到每一待推荐测试用例针对每一参考标签的参考评分。这样,通过同一的参考评分运算方法来确定每一待推荐测试用例针对每一参考标签的参考评分,有效保证了确定的参考评分的一致性,提高了确定得到的参考评分的可靠性。
基于前述实施例,在本申请其他实施例中,步骤205可以由步骤205a~205c来实现:
步骤205a、从每一待推荐测试用例对应的m-1个第一相似度参数中,选取每一待推荐测试用例对应的第二预设数量个第一目标相似度参数。
在本申请实施例中,第二预设数量可以是根据大量实验得到的一个经验值,也可以是根据大量实验得到的一个经验公式计算得到的经验值,或者还可以是测试人员根据自己实际需求进行设定得到的一个经验值。在一些应用场景中,第二预设数量可以是通过计算m-1与预设比例之间的乘积来确定得到的,预设比例可以是根据大量实验得到的一个经验值,也可以是测试人员根据自己实际需求设定得到的。
从每一待推荐测试用例对应的m-1个第一相似度参数中,选取第二预设数量个第一目标相似度参数时,先对每一待推荐测试用例对应的m-1个第一相似度参数基于大小关系按顺序排序,然后从排序后的m-1个第一相似度参数中,选择最大的前第二预设数量个第一相似度参数,从而得到第二预设数量个第一目标相似度参数。
示例性的,假设第二预设数量为3,对应的,针对测试用例1的5个第一相似度参数X 12、X 13、X 14、X 15和X 16,从中选取到的3个第一目标相似度参数为X 12、X 13和X 14
步骤205b、从m个待推荐测试用例针对n个参考标签的参考评分中,确定每一 第一目标相似度参数中对应的其他测试用例针对目标标签的参考评分,得到第二预设数量个第一目标评分。
在本申请实施例中,从m个待推荐测试用例针对n个参考标签的参考评分中,针对测试用例1,基于3个第一目标相似度参数为X 12、X 13和X 14,确定测试用例2、测试用例3和测试用例4针对目标标签A的参考评分,得到3个第一目标评分S 2A、S 3A和S 4A
步骤205c、基于第二预设数量个第一目标评分和第二预设数量个第一目标相似度参数,确定每一待推荐测试用例的第一预测值。
在本申请实施例中,对3个第一目标评分和3个第一目标相似度参数进行分析,确定得到每一待推荐测试用例的第一预测值。
示例性的,针对测试用例1,对3个第一目标评分S 2A、S 3A和S 4A,和3个第一目标相似度参数X 12、X 13和X 14进行分析,确定得到测试用例1的第一预测值。其他测试用例的第一预测值的确定实现过程可以参照测试用例1的第一预测值的确定实现过程,此处不再详细赘述。
这样,本申请具体限定了确定每一待推荐测试用例的第一预测值的确定实现方法,进行每一待推荐测试用例的第一预测值的确定方法的统一,有效保证了确定每一待推荐测试用例的第一预测值的准确性,提高最终推荐的高可靠性。
基于前述实施例,在本申请其他实施例中,步骤205c可以由步骤a11~a14来实现:
步骤a11、对每一待推荐测试用例的每一第一目标评分和对应的第一目标相似度参数进行运算处理,得到每一待推荐测试用例的第二预设数量个第一数值。
在本申请实施例中,对每一待推荐测试用例的每一第一目标评分和对应的第一目标相似度参数可以采用例如乘法运算或者其他运算方法进行运算处理,得到每一待推荐测试用例的第一数值,由于每一待推荐测试用例的包括第二预设数量个第一目标相似度,因此,针对每一待推荐测试用例可以确定得到第二预设数量个第一数值。
步骤a12、对每一待推荐测试用例的第二预设数量个第一数值进行运算处理,得到每一待推荐测试用例的第二数值。
在本申请实施例中,对每一待推荐测试用例的第二预设数量个第一数值可以采用累加运算方法或加权累加运算方法来进行运算处理,得到每一待推荐测试用例的第二数值。
步骤a13、对每一待推荐测试用例的第二预设数量个第一目标相似度参数进行运算处理,得到每一待推荐测试用例的第三数值。
在本申请实施例中,对每一待推荐测试用例的第二预设数量个第一目标相似度参数可以采用累加运算方法或加权累加运算方法来进行运算处理,得到每一待推荐测试用例的第三数值。
步骤a14、对每一待推荐测试用例的第二数值和每一待推荐测试用例的第三数值进行运算处理,得到每一待推荐测试用例的第一预测值。
在本申请实施例中,对每一待推荐测试用例的第二数值和每一待推荐测试用例的第三数值可以采用比值运算或求商等运算方法进行运算处理,得到每一待推荐测试用例的第一预测值。
示例性的,针对测试用例1的第一预测值PDBR(1,A)的计算公式可以记为
Figure PCTCN2021136325-appb-000002
同理可得到测试用例2的第一预测值PDBR(2,A),测试用例3的第一预测值PDBR(3,A),测试用例4的第一预测值PDBR(4,A),测试用例5的第一预测值PDBR(5,A),测试用例6的第一预测值PDBR(6,A)。
这样,限定了确定每一待推荐测试用例的第一预测值的具体实现方法,进行每一待推荐测试用例的第一预测值的确定方法的统一,有效保证了确定每一待推荐测试用例的第一预测值的准确性,提高最终推荐的高可靠性。
基于前述实施例,在本申请其他实施例中,步骤206可以由步骤206a~206b来实现:
步骤206a、从m个待推荐测试用例针对n个参考标签的参考评分中,获取每一待推荐测试用例针对目标标签的参考评分和对应的每一待推荐测试用例针对n-1个其他标签的参考评分。
在本申请实施例中,从m个待推荐测试用例针对n个参考标签的参考评分中,获取每一待推荐测试用例针对目标标签的参考评分,得到S 1A、S 2A、S 3A、S 4A、S 5A和S 6A;得到S 1B、S 1C和S 1D,S 2B、S 2C和S 2D,S 3B、S 3C和S 3D,S 4B、S 4C和S 4D,S 5B、S 5C和S 5D,以及S 6B、S 6C和S 6D
步骤206b、采用预设相似度算法对n个待推荐测试用例针对目标标签的参考评分和对应的n个待推荐测试用例针对其他标签的参考评分进行相似度计算,得到n-1个第二相似度参数。
在本申请实施例中,预设相似度算法可以是皮尔逊相似度算法,也可以是修正余弦相似度算法,或者余弦相似度算法等。
示例性的,采用皮尔逊相似度算法确定目标标签A与其他标签B的第二相似度参数的计算公式可以记为:
Figure PCTCN2021136325-appb-000003
同理,可以计算得到X AC和X AD
基于前述实施例,在本申请其他实施例中,步骤207可以由步骤207a~207d来实现:
步骤207a、从n-1个第二相似度参数中,选取第三预设数量个第二目标相似度参数。
其中,第三预设数量小于或等于n-1。
在本申请实施例中,第三预设数量可以是根据大量实验得到的一个经验值,也可以是根据采用经验公式对n-1进行计算得到的经验值。对n-1个第二相似度参数根据大小关系进行顺序排序,然后从排序后的n-1个第二相似度参数中,选取值最大的第三预设数量个第二目标相似度参数。
示例性的,从X AB、X AC和X AD中选取得到前预设占比的第二相似度参数,假设第三预设数量为2,对应的2个第二目标相似度参数为X AB和X AC
步骤207b、从m个待推荐测试用例针对n个参考标签的参考评分中,获取每一第二目标相似度参数对应的参考标签对应的m个第二目标评分。
其中,第二目标评分为每一待推荐测试用例针对每一第二目标相似度参数对应的除目标标签外的参考标签对应的参考评分。
在本申请实施例中,从m个待推荐测试用例针对n个参考标签的参考评分中,获取2个第二目标相似度参数为X AB和X AC中m个待推荐测试用例针对目标标签A的m个参考评分,m个待推荐测试用例针对其他标签B的m个参考评分,得到针对其他标签B的m个第二目标评分,和m个待推荐测试用例针对其他标签C的m个参考评分,得到针对其他标签C的m个第二目标评分。
步骤207c、采用均值处理方法对每一第二目标相似度参数对应参考标签对应的m个第二目标评分进行运算处理,得到第三预设数量加1个第四数值。
在本申请实施例中,均值处理方法可以是简单的平均值计算方法,也可以是其他加权平均值算法。示例性的,对目标标签A的m个第二目标评分采用均值处理方法进行运算处理,得到目标标签A对应的第四数值;对其他标签B的m个第二目标评分采用均值处理方法进行运算处理,得到其他标签B对应的第四数值;对其他标签C的m个第二目标评分采用均值处理方法进行运算处理,得到其他标签C对应的第四数值,这样,即可得到3个第四数值。
步骤207d、基于第三预设数量个第二目标相似度参数、第三预设数量个第二目标相似度参数对应的每一待推荐测试用例的第二目标评分和第三预设数量个第四数值,确定第二预测值。
在本申请实施例中,对第三预设数量第三预设数量个第二目标相似度参数、第三预设数量个第二目标相似度参数对应的每一待推荐测试用例的第二目标评分和第三预设数量加1个第四数值进行分析计算,得到第二预测值。
这样,通过限定确定标签与标签之间的相似度计算的方法,进行每一待推荐测试用例的第二预测值的确定方法的统一,有效保证了确定每一待推荐测试用例的第二预测值的准确性,提高最终推荐的高可靠性。
基于前述实施例,在本申请其他实施例中,步骤207d可以由步骤b11~b15来实现:
步骤b11、对每一第二目标相似度参数对应的每一待推荐测试用例的第二目标 评分与对应的第四数值进行运算处理,得到每一第二目标相似度参数对应的每一待推荐测试用例的第五数值。
在本申请实施例中,对每一第二目标相似度参数对应的每一待推荐测试用例的第二目标评分与对应的第四数值可以采用差值运算或者加权差值运算方法进行运算处理,以得到每一第二目标相似度参数对应的每一待推荐测试用例的第五数值。
步骤b12、对每一第二目标相似度参数与对应的第五数值进行运算处理,得到每一第二目标相似度参数对应的第六数值。
在本申请实施例中,对每一第二目标相似度参数与对应的第五数值可以采用乘法运算方法或加权乘积运算方法进行运算处理,得到每一第二目标相似度参数对应的第六数值。
步骤b13、对第三预设数量个第六数值进行运算处理,得到第七数值。
在本申请实施例中,对第三预设数量个第六数值可以采用累加和运算方法或者加权累加和运算方法进行运算处理,得到第七数值。
步骤b14、对第三预设数量个第二目标相似度参数进行运算处理,得到第八数值。
在本申请实施例中,对第三预设数量个第二目标相似度参数可以采用累计和运算方法或加权累加和运算方法进行运算处理,得到第八数值。
步骤b15、对第七数值与第八数值进行运算处理,得到第一参考数值。
在本申请实施例中,对第七数值与第八数值进行比值运算或者求商等运算处理,得到第一参考数值。
步骤b16、对第一参考数值与目标标签对应的第四数值进行累加计算,得到第二预测值。
在本申请实施例中,针对测试用例1针对目标标签A的第二预测值
Figure PCTCN2021136325-appb-000004
Figure PCTCN2021136325-appb-000005
同理,可以计算得到测试用例2针对目标标签A的第二预测值P PCC(1,A),测试用例3针对目标标签A的第二预测值P PCC(3,A),测试用例4针对目标标签A的第二预测值P PCC(4,A),测试用例5针对目标标签A的第二预测值P PCC(5,A),测试用例6针对目标标签A的第二预测值P PCC(6,A)。其中,前述
Figure PCTCN2021136325-appb-000006
为目标标签A对应的第四数值,
Figure PCTCN2021136325-appb-000007
为参考标签B对应的第四数值,
Figure PCTCN2021136325-appb-000008
为参考标签C对应的第四数值。
基于前述实施例,在本申请其他实施例中,步骤208可以由步骤208a~208d来实现:
步骤208a、确定每一待推荐测试用例包括的标签的标签数量。
在本申请实施例中,测试用例1包括的标签的标签数量为2,测试用例2包括的标签的标签数量为2,测试用例3包括的标签的标签数量为2,测试用例4包括的标签的标签数量为2,测试用例5包括的标签的标签数量为1,测试用例6包括的标 签的标签数量为2。
步骤208b、对每一待推荐测试用例对应的第一预设权重值与对应的标签数量进行运算,得到每一待推荐测试用例对应的第九数值。
在本申请实施例中,每一待推荐测试用例对应的第一预设权重值可以是测试人员根据每一测试用例设定的经验值,还可以是根据每一待推荐测试用例对应的大量第一预设权重值的测试样本采用模型训练的方法进行训练得到的一个经验值。
其中,根据每一待推荐测试用例对应的大量第一预设权重值的测试样本采用模型训练的方法来确定第一预设权重值时,采用的模型可以如下所示:
Figure PCTCN2021136325-appb-000009
其中,L ij表示某一待推荐测试用例对i标签进行推荐时的历史预测推荐评分,R ij表示某一待推荐测试用例对i标签进行推荐时真实推荐分数,n为某一待推荐测试用例对i标签进行推荐的总样本数。
步骤208c、确定每一待推荐测试用例对应的第九数值与n的比值,得到每一待推荐测试用例对应的第十数值。
步骤208d确定每一待推荐测试用例对应的第十数值和第二预设权重值中的最小值,得到每一待推荐测试用例对应的动态权重。
在本申请实施例中,第二预设权重值为根据大量实验得到的一个经验值,通常情况下,第二预设权重值可以设定为1。
这样,针对每一待推荐测试用例确定不同的动态权重,来权衡每一待推荐测试用例的第一预测值和对应的第二预测值之间对每一待推荐测试用例的最终第三预测值的影响,有效提高了第三预测值的可靠性,提高了每一待推荐测试用例的推荐结果的可靠性。
基于前述实施例,在本申请其他实施例中,步骤209可以由步骤209a~209c来实现:
步骤209a、对每一动态权重与对应的第二预测值进行运算,得到第二参考数值。
在本申请实施例中,对每一动态权重与对应的第二预测值可以采用乘积运算方法来进行运算,得到每一待推荐测试用例对应的第二参考数值。
步骤209b、对1与每一动态权重的差值与对应的第一预测值进行运算,得到第三参考数值。
在本申请实施例中,对1与每一动态权重的差值与对应的第一预测值可以采用乘法运算方法来进行运算,得到第三参考数值。在一些应用场景中,对1与每一动态权重的差值与对应的第一预测值也可以进行除法运算方法或者求商运算方法进行运算。
步骤209c、对每一第二参考数值与对应的第三参考数值进行运算,得到m个第三预测值。
在本申请实施例中,将每一待推荐测试用例的第二参考数值与对应的第三参考数值可以采用求和运算或者比值运算等,即可以得到m个第三预测值。
示例性的,针对测试用例1的第三预测值P(1,A)=D1*P PCC(1,A)+(1-D1)*P DBR(1,A),其中,D1为测试用例1对应的动态权重。
这样,通过具体限定确定第三预测值的具体方法,实现了针对每一待推荐测试用例之间确定第三预测值的方法的统一性,有效保证了针对每一待推荐测试用例的第三预测值之间的统一性,保证了每一待推荐测试用例的第三预测值之间的可比性,提高最终推荐的高可靠性。
基于前述实施例,在本申请其他实施例中,步骤209c可以由步骤c11~c12来实现:
步骤c11、若目标标签包括p个,对每一待推荐测试用例针对每一目标标签的每一第二参考数值与对应的第三参考数值进行运算,得到每一个待推荐测试用例针对P个目标标签的P个第四预测值。
其中,p为大于或等于2的整数。
在本申请实施例中,在测试人员输入的目标标签为至少两个时,采用前述方法确定每一待推荐测试用例针对每一目标标签的第二参考数值与对应的第三参考数值后,计算得到每一待推荐测试用例针对每一目标标签的第四预测值。
示例性的,假设针对测试用例1,其包括目标标签A和目标标签B时,可以计算得到测试用例1针对目标标签A的第四预测值为P(1,A)=D1*P PCC(1,A)+(1-D1)*P DBR(1,A),测试用例1针对目标标签B的第四预测值为P(1,B)=D1*P PCC(1,B)+(1-D1)*P DBR(1,B),同理,可以计算得到测试用例2针对目标标签A的第四预测值为P(2,A)和P(2,B),测试用例3针对目标标签A的第四预测值为P(3,A)和P(3,B),测试用例4针对目标标签A的第四预测值为P(4,A)和P(4,B),测试用例5针对目标标签A的第四预测值为P(5,A)和P(5,B),测试用例6针对目标标签A的第四预测值为P(6,A)和P(6,B)。
步骤c12、对每一待推荐测试用例针对P个目标标签的P个第四预测值进行运算处理,得到m个第三预测值。
在本申请实施例中,对每一待推荐测试用例针对P个目标标签的P个第四预测值可以采用求和或者求平均值的运算方法来进行运算处理,得到每一待推荐测试用例的第三预测值,进而可以得到m个待推荐测试用例的第三预测值。示例性,针对测试用例1,测试用例1针对目标标签A和目标标签B各自对应的2个第四预测值进行求和计算,得到测试用例1的第三预测值为P(1,A)+P(1,B)。
这样,充分考虑了目标标签为多个时,如何推荐测试用例的方法,有效增加了信息推荐方法的可适用性,保证了较宽的应用场景。
基于前述实施例,在本申请其他实施例中,步骤211可以由步骤211a~211c来实现:
步骤211a、响应请求消息,确定第一预设数量个目标推荐测试用例对应的待测试对象。
在本申请实施例中,待测试对象为测试人员需要用第一预设数量个目标推荐测试用例进行测试的软件产品,例如更新升级后的待测试应用程序,在通过测试后,会投放给用户使用。
步骤211b、基于待测试对象、第一预设数量个目标推荐测试用例以及目标标签,生成目标关系图。
在本申请实施例中,根据待测试对象包括的各项功能模块、第一预设数量个目标推荐测试用例以及目标标签,来生成目标关系图。在一些应用场景下,目标关系图可以是采用第一预设数量个目标推荐测试用例以及目标标签来对待测试对象对应的预设关系图进行信息参数更新得到的。进一步的,还可以将每一目标推荐测试用例针对每一目标标签的第三预测值也在目标关系图中显示。
步骤211c、显示目标关系图。
在本申请实施例中,将目标关系图显示于测试测试的目标显示区域内,这样,测试人员可以根据目标关系图直观地看到第一预设数量个目标推荐测试用例对待测对象的影响,快速地调用第一预设数量个目标推荐测试用例对待测试对象进行测试,提高了测试过程中的测试效率,降低了测试人员需要自己手动寻找测试用例的复杂操作流程。
示例性的,本申请实施例提供一种信息推荐方法,参照图3所示,具体实现过程参照以下步骤所示:步骤31、确定目标标签;步骤32、确定具有目标标签的待推荐测试用例以及待推荐测试用例的动态权重;步骤33、采用混合权重算法计算得到每一待推荐测试用例针对目标标签的第三预测值;步骤34、基于每一待推荐测试用例针对目标标签的第三预测值,确定目标推荐测试用例;步骤35、将目标推荐测试用例以及对应的第三预测值更新预设关系图;步骤36、将目标推荐测试用例发送至测试平台,实现测试过程;步骤37、若检测到新的测试用例或者新的标签,对预设关系图进行更新;步骤38、基于目标推荐测试用例针对目标标签的第三预测值,对对应的待推荐测试用例的动态权重进行更新。其中,步骤33的具体实现过程可以参照步骤102~105或者步骤203~209对应的实施例的具体实现过程,此处不再详细赘述。
得到的一种目标关系图可以如图4所示,图4中包括:待测试产品Y;待测试产品实现的各个功能模块,至少包括支付模块Y11、支付方式Y12、风险测评Y13、账户模块Y14、加参工具Y15、知识库Y16和投保模块Y17;测试用例至少包括:手机短信1Y21、手机短信2Y22、手机短信3Y23、手机短信3Y24、现在关注Y25、使用场景Y26、管理台填Y27、拉取定时Y28、问答推送Y29和存量Y210;标签至少包括:小程序Y31、网页Y32、行内Y33、前端Y34和结果页Y35,其中,在目标关系图中每两个圆圈之间的箭头连线的箭头方向表明这两个圆圈代表的对象之间 的关联关系。
其中,待测试产品简称产品、待测试产品实现的各个功能模块简称模块、测试用例简称测例以及标签之间的关系可以参照图5所示,即待测试产品由各个功能模块组成,每一功能模块采用不同的测试用例进行测试,每一测试用例又标识有不同的标签。
需要说明的是,本实施例中与其它实施例中相同步骤和相同内容的说明,可以参照其它实施例中的描述,此处不再赘述。
本申请实施例中,若信息推荐设备监测到用于请求包括目标标签的测试用例的请求消息,获取目标标签的m个待推荐测试用例后,确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签,并基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值,以及确定每一待推荐测试用例对应的动态权重,然后基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值,并基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例后,响应请求消息,显示第一预设数量个目标推荐测试用例,这样,通过每一测试用例的动态权重来权衡表示测试用例与测试用例之间的相似度的第一预测值和表示标签与标签之间的相似度的第二预测值,确定得到每一测试用例针对目标标签的第三预测值,并根据多个测试用例的第三预测值之间的关系来选择最终可推荐的目标推荐测试用例,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。
基于前述实施例,本申请的实施例提供一种信息推荐设备,参照图6所示,该信息推荐设备4可以包括:处理器41、存储器42和通信总线43,其中:
存储器42,用于存储可执行指令;
通信总线43,用于实现处理器41和存储器42之间的通信连接;
处理器41,用于执行存储器42中存储的信息推荐程序,以实现以下步骤:
若检测到用于请求包括目标标签的测试用例的请求消息,获取包括目标标签的m个待推荐测试用例;其中,m为大于或等于1的整数;
确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签;其中,n个参考标签包括目标标签,n为大于或等于1的整数;
基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值;其中,第一预测值由每一待推荐测试用例与m个待推荐测试用例中除对应的每一待推荐测试用例外的待推荐测试用例之间的相似度确定,第二预测值由目标标签与n个参考标签中除目标标签外的标签之间的相似度确定;
确定每一待推荐测试用例对应的动态权重;
基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值;
基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例;
响应请求消息,显示第一预设数量个目标推荐测试用例。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值时,可以由以下步骤来实现:
基于n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对每一参考标签的参考评分;
基于m个待推荐测试用例针对n个参考标签的参考评分,确定每一待推荐测试用例与其他测试用例之间的相似度参数,得到每一待推荐测试用例对应的m-1个第一相似度参数;其中,其他测试用例为m个待推荐测试用例中除对应的每一待推荐测试用例外的每一待推荐测试用例;
基于每一待推荐测试用例对应的m-1个第一相似度参数,确定每一待推荐测试用例针对目标标签的第一预测值;
基于m个待推荐测试用例针对n个参考标签的参考评分,确定目标标签与其他标签之间的误差相似度参数,得到n-1个第二相似度参数;其中,其他标签为n个参考标签中除目标标签外的每一参考标签;
基于n-1个第二相似度参数,确定每一待推荐测试用例针对目标标签的第二预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对每一参考标签的参考评分时,可以由以下步骤来实现:
确定每一待推荐测试用例针对每一参考标签的预设评分,得到每一待推荐测试用例的n个预设评分;
对每一待推荐测试用例的n个预设评分进行运算处理,得到第一数值;
对每一待推荐测试用例的每一预设评分与m进行运算处理,得到每一待推荐测试用例对应的每一参考标签的第二数值;
对每一待推荐测试用例对应的每一参考标签的第二数值和第一数值进行运算处理,得到每一待推荐测试用例针对每一参考标签的参考评分。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于每一待推荐测试用例对应的m-1个第一相似度参数,确定每一待推荐测试用例的第一预测值时,可以由以下步骤来实现:
从每一待推荐测试用例对应的m-1个第一相似度参数中,选取每一待推荐测试用例对应的第二预设数量个第一目标相似度参数;
从m个待推荐测试用例针对n个参考标签的参考评分中,确定每一第一目标相似度参数中对应的其他测试用例针对目标标签的参考评分,得到第二预设数量个第一目标评分;
基于第二预设数量个第一目标评分和第二预设数量个第一目标相似度参数,确定每一待推荐测试用例的第一预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于第二预设数量个第一目标评分和第二预设数量个第一目标相似度参数,确定每一待推荐测试用例的第一预测值时,可以由以下步骤来实现:
对每一待推荐测试用例的每一第一目标评分和对应的第一目标相似度参数进行运算处理,得到每一待推荐测试用例的第二预设数量个第一数值;
对每一待推荐测试用例的第二预设数量个第一数值进行运算处理,得到每一待推荐测试用例的第二数值;
对每一待推荐测试用例的第二预设数量个第一目标相似度参数进行运算处理,得到每一待推荐测试用例的第三数值;
对每一待推荐测试用例的第二数值和每一待推荐测试用例的第三数值进行运算处理,得到每一待推荐测试用例的第一预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于m个待推荐测试用例针对n个参考标签的参考评分,确定目标标签与其他标签之间的误差相似度参数,得到n-1个第二相似度参数时,可以由以下步骤来实现:
从m个待推荐测试用例针对n个参考标签的参考评分中,获取每一待推荐测试用例针对目标标签的参考评分和对应的每一待推荐测试用例针对n-1个其他标签的参考评分;
采用预设相似度算法对n个待推荐测试用例针对目标标签的参考评分和对应的n个待推荐测试用例针对其他标签的参考评分进行相似度计算,得到n-1个第二相似度参数。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于n-1个第二相似度参数,确定每一待推荐测试用例针对目标标签的第二预测值时,可以由以下步骤来实现:
从n-1个第二相似度参数中,选取第三预设数量个第二目标相似度参数;其中,第三预设数量小于或等于n-1;
从m个待推荐测试用例针对n个参考标签的参考评分中,获取每一第二目标相似度参数对应的除目标标签外的参考标签对应的m个第二目标评分;其中,第二目标评分为每一待推荐测试用例针对每一第二目标相似度参数对应的除目标标签外的参考标签对应的参考评分;
采用均值处理方法对每一第二目标相似度参数对应的除目标标签外的参考标签对应的m个第二目标评分进行运算处理,得到第三预设数量个第四数值;
基于第三预设数量个第二目标相似度参数、第三预设数量个第二目标相似度参数对应的每一待推荐测试用例的第二目标评分和第三预设数量个第四数值,确定第二预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于第三预设数量个第二目标相似度参数、第三预设数量个第二目标相似度参数对应的每一待推荐测试用例的第二目标评分和第三预设数量个第四数值,确定第二预测值时,可以由以下步骤来实现:
对每一第二目标相似度参数对应的每一待推荐测试用例的第二目标评分与对应的第四数值进行运算处理,得到每一第二目标相似度参数对应的每一待推荐测试用例的第五数值;
对每一第二目标相似度参数与对应的第五数值进行运算处理,得到每一第二目标相似度参数对应的第六数值;
对第三预设数量个第六数值进行运算处理,得到第七数值;
对第三预设数量个第二目标相似度参数进行运算处理,得到第八数值;
对第七数值与第八数值进行运算处理,得到第二预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤确定每一待推荐测试用例对应的动态权重时,可以由以下步骤来实现:
确定每一待推荐测试用例包括的标签的标签数量;
对每一待推荐测试用例对应的第一预设权重值与对应的标签数量进行运算,得到每一待推荐测试用例对应的第九数值;
确定每一待推荐测试用例对应的第九数值与n的比值,得到每一待推荐测试用例对应的第十数值;
确定每一待推荐测试用例对应的第十数值和第二预设权重值中的最小值,得到每一待推荐测试用例对应的动态权重。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值时,可以由以下步骤来实现:
对每一动态权重与对应的第二预测值进行运算,得到第八数值;
对1与每一动态权重的差值与对应的第一预测值进行运算,得到第九数值;
对每一第八数值与对应的第九数值进行运算,得到m个第三预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤对每一第八数值与对应的第九数值进行运算,得到m个第三预测值时,可以由以下步骤来实现:
若目标标签包括p个,对每一待推荐测试用例针对每一目标标签的每一第八数值与对应的第九数值进行运算,得到每一待推荐测试用例针对P个目标标签的P个 第四预测值;其中,p为大于或等于2的整数;
对每一待推荐测试用例针对P个目标标签的P个第四预测值进行运算处理,得到m个第三预测值。
基于前述实施例,在本申请其他实施例中,处理器41执行步骤响应请求消息,显示第一预设数量个目标推荐测试用例时,可以由以下步骤来实现:
响应请求消息,确定第一预设数量个目标推荐测试用例对应的待测试对象;
基于待测试对象、第一预设数量个目标推荐测试用例以及目标标签,生成目标关系图;
显示目标关系图。
需要说明的是,本申请实施例中个或者多个程序可被一个或者多个处理器的步骤的解释说明,可以参照图1~2对应的实施例提供的方法实现过程,此处不再赘述。
本申请实施例中,若信息推荐设备监测到用于请求包括目标标签的测试用例的请求消息,获取目标标签的m个待推荐测试用例后,确定每一待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签,并基于目标标签、n个参考标签和m个待推荐测试用例,确定每一待推荐测试用例针对目标标签的第一预测值和每一待推荐测试用例针对目标标签的第二预测值,以及确定每一待推荐测试用例对应的动态权重,然后基于每一动态权重、对应的第一预测值和对应的第二预测值,确定m个第三预测值,并基于m个第三预测值,从m个待推荐测试用例中确定第一预设数量个目标推荐测试用例后,响应请求消息,显示第一预设数量个目标推荐测试用例,这样,通过每一测试用例的动态权重来权衡表示测试用例与测试用例之间的相似度的第一预测值和表示标签与标签之间的相似度的第二预测值,确定得到每一测试用例针对目标标签的第三预测值,并根据多个测试用例的第三预测值之间的关系来选择最终可推荐的目标推荐测试用例,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。
基于前述实施例,本申请的实施例提供一种计算机可读存储介质,简称为存储介质,该计算机可读存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,以实现如图1~2对应的实施例提供的信息推荐方法实现过程,此处不再赘述。
以上,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。
工业实用性
本申请实施例提供一种信息推荐方法、设备及存储介质,该方法包括:若检测到用于请求包括目标标签的测试用例的请求消息,获取包括所述目标标签的m个待 推荐测试用例;其中,m为大于或等于1的整数;确定每一所述待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签;其中,n个所述参考标签包括所述目标标签,n为大于或等于1的整数;基于所述目标标签、n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对所述目标标签的第一预测值和每一所述待推荐测试用例针对所述目标标签的第二预测值;确定每一所述待推荐测试用例对应的动态权重;基于每一所述动态权重、对应的所述第一预测值和对应的所述第二预测值,确定m个第三预测值;基于m个所述第三预测值,从m个所述待推荐测试用例中确定第一预设数量个目标推荐测试用例;响应所述请求消息,显示所述第一预设数量个所述目标推荐测试用例,解决了目前测试用例推荐方法较为单一的问题,实现了一种测试用例的推荐方法,能够准确推荐匹配的测试用例,并提高了测试用例对应用程序的测试效果。

Claims (14)

  1. 一种信息推荐方法,所述方法包括:
    若检测到用于请求包括目标标签的测试用例的请求消息,获取包括所述目标标签的m个待推荐测试用例;其中,m为大于或等于1的整数;
    确定每一所述待推荐测试用例包括的标签,得到m个待推荐测试用例包括的n个参考标签;其中,n个所述参考标签包括所述目标标签,n为大于或等于1的整数;
    基于所述目标标签、n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对所述目标标签的第一预测值和每一所述待推荐测试用例针对所述目标标签的第二预测值;
    确定每一所述待推荐测试用例对应的动态权重;
    基于每一所述动态权重、对应的所述第一预测值和对应的所述第二预测值,确定m个第三预测值;
    基于m个所述第三预测值,从m个所述待推荐测试用例中确定第一预设数量个目标推荐测试用例;
    响应所述请求消息,显示所述第一预设数量个所述目标推荐测试用例。
  2. 根据权利要求1所述的方法,其中,所述基于所述目标标签、n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对所述目标标签的第一预测值和每一所述待推荐测试用例针对所述目标标签的第二预测值,包括:
    基于n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对每一所述参考标签的参考评分;
    基于m个所述待推荐测试用例针对n个所述参考标签的参考评分,确定每一所述待推荐测试用例与其他测试用例之间的相似度参数,得到每一所述待推荐测试用例对应的m-1个第一相似度参数;其中,所述其他测试用例为m个所述待推荐测试用例中除对应的每一所述待推荐测试用例外的每一待推荐测试用例;
    基于每一所述待推荐测试用例对应的m-1个所述第一相似度参数,确定每一所述待推荐测试用例针对所述目标标签的所述第一预测值;
    基于m个所述待推荐测试用例针对n个所述参考标签的参考评分,确定目标标签与其他标签之间的误差相似度参数,得到n-1个第二相似度参数;其中,所述其他标签为n个所述参考标签中除所述目标标签外的每一参考标签;
    基于n-1个所述第二相似度参数,确定每一所述待推荐测试用例针对所述目标标签的所述第二预测值。
  3. 根据权利要求2所述的方法,其中,所述基于n个所述参考标签和m个所述待推荐测试用例,确定每一所述待推荐测试用例针对每一所述参考标签的参考评分,包括:
    确定每一所述待推荐测试用例针对每一所述参考标签的预设评分,得到每一所述待推荐测试用例的n个预设评分;
    对每一所述待推荐测试用例的n个所述预设评分进行运算处理,得到第一数值;
    对每一所述待推荐测试用例的每一所述预设评分与m进行运算处理,得到每一所述待推荐测试用例对应的每一所述参考标签的第二数值;
    对每一所述待推荐测试用例对应的每一所述参考标签的所述第二数值和所述第一数值进行运算处理,得到每一所述待推荐测试用例针对每一所述参考标签的参考评分。
  4. 根据权利要求2所述的方法,其中,所述基于每一所述待推荐测试用例对应的m-1个所述第一相似度参数,确定每一所述待推荐测试用例的所述第一预测值,包括:
    从每一所述待推荐测试用例对应的m-1个所述第一相似度参数中,选取每一所述待推荐测试用例对应的第二预设数量个第一目标相似度参数;
    从m个所述待推荐测试用例针对n个所述参考标签的参考评分中,确定每一所述第一目标相似度参数中对应的所述其他测试用例针对所述目标标签的参考评分,得到所述第二预设数量个第一目标评分;
    基于所述第二预设数量个所述第一目标评分和所述第二预设数量个所述第一目标相似度参数,确定每一所述待推荐测试用例的所述第一预测值。
  5. 根据权利要求4所述的方法,其中,所述基于所述第二预设数量个所述第一目标评分和所述第二预设数量个所述第一目标相似度参数,确定每一所述待推荐测试用例的所述第一预测值,包括:
    对每一所述待推荐测试用例的每一所述第一目标评分和对应的所述第一目标相似度参数进行运算处理,得到每一所述待推荐测试用例的所述第二预设数量个第一数值;
    对每一所述待推荐测试用例的所述第二预设数量个第一数值进行运算处理,得到每一所述待推荐测试用例的第二数值;
    对每一所述待推荐测试用例的所述第二预设数量个所述第一目标相似度参数进行运算处理,得到每一所述待推荐测试用例的第三数值;
    对每一所述待推荐测试用例的所述第二数值和每一所述待推荐测试用例的所述第三数值进行运算处理,得到每一所述待推荐测试用例的所述第一预测值。
  6. 根据权利要求2所述的方法,其中,所述基于m个所述待推荐测试用例针对n个所述参考标签的参考评分,确定目标标签与其他标签之间的误差相似度参数,得到n-1个第二相似度参数,包括:
    从m个所述待推荐测试用例针对n个所述参考标签的参考评分中,获取每一所述待推荐测试用例针对所述目标标签的参考评分和对应的每一所述待推荐测试用例针对n-1个所述其他标签的参考评分;
    采用预设相似度算法对n个所述待推荐测试用例针对所述目标标签的参考评分和对应的n个所述待推荐测试用例针对所述其他标签的参考评分进行相似度计算, 得到n-1个所述第二相似度参数。
  7. 根据权利要求2所述的方法,其中,所述基于n-1个所述第二相似度参数,确定每一所述待推荐测试用例针对所述目标标签的所述第二预测值,包括:
    从n-1个所述第二相似度参数中,选取第三预设数量个第二目标相似度参数;其中,所述第三预设数量小于或等于n-1;
    从m个所述待推荐测试用例针对n个所述参考标签的参考评分中,获取每一所述第二目标相似度参数对应的参考标签对应的m个第二目标评分;其中,所述第二目标评分为每一所述待推荐测试用例针对每一所述第二目标相似度参数对应的除所述目标标签外的参考标签对应的参考评分;
    采用均值处理方法对每一所述第二目标相似度参数对应的参考标签对应的m个所述第二目标评分进行运算处理,得到所述第三预设数量加1个第四数值;
    基于所述第三预设数量个所述第二目标相似度参数、所述第三预设数量个所述第二目标相似度参数对应的每一所述待推荐测试用例的所述第二目标评分和所述第三预设数量加1个所述第四数值,确定所述第二预测值。
  8. 根据权利要求7所述的方法,其中,所述基于所述第三预设数量个所述第二目标相似度参数、所述第三预设数量个所述第二目标相似度参数对应的每一所述待推荐测试用例的所述第二目标评分和所述第三预设数量加1个所述第四数值,确定所述第二预测值,包括:
    对每一所述第二目标相似度参数对应的每一所述待推荐测试用例的所述第二目标评分与对应的第四数值进行运算处理,得到每一所述第二目标相似度参数对应的每一所述待推荐测试用例的第五数值;
    对每一所述第二目标相似度参数与对应的所述第五数值进行运算处理,得到每一所述第二目标相似度参数对应的第六数值;
    对所述第三预设数量个所述第六数值进行运算处理,得到第七数值;
    对所述第三预设数量个所述第二目标相似度参数进行运算处理,得到第八数值;
    对所述第七数值与所述第八数值进行运算处理,得到第一参考数值;
    对所述第一参考数值与所述目标标签对应的所述第四数值进行累加计算,得到所述第二预测值。
  9. 根据权利要求2所述的方法,其中,所述确定每一所述待推荐测试用例对应的动态权重,包括:
    确定每一所述待推荐测试用例包括的标签的标签数量;
    对每一所述待推荐测试用例对应的第一预设权重值与对应的标签数量进行运算,得到每一所述待推荐测试用例对应的第九数值;
    确定每一所述待推荐测试用例对应的所述第九数值与n的比值,得到每一所述待推荐测试用例对应的第十数值;
    确定每一所述待推荐测试用例对应的所述第十数值和第二预设权重值中的最小 值,得到每一所述待推荐测试用例对应的所述动态权重。
  10. 根据权利要求1至9任一项所述的方法,其中,所述基于每一所述动态权重、对应的所述第一预测值和对应的所述第二预测值,确定m个第三预测值,包括:
    对每一所述动态权重与对应的所述第二预测值进行运算,得到第二参考数值;
    对1与每一所述动态权重的差值与对应的所述第一预测值进行运算,得到第三参考数值;
    对每一所述第二参考数值与对应的所述第三参考数值进行运算,得到m个所述第三预测值。
  11. 根据权利要求10所述的方法,其中,所述对每一所述第二参考数值与对应的所述第三参考数值进行运算,得到m个所述第三预测值,包括:
    若所述目标标签包括p个,对每一所述待推荐测试用例针对每一所述目标标签的每一所述第二参考数值与对应的所述第三参考数值进行运算,得到每一所述待推荐测试用例针对P个所述目标标签的P个第四预测值;其中,p为大于或等于2的整数;
    对每一所述待推荐测试用例针对P个所述目标标签的P个所述第四预测值进行运算处理,得到m个所述第三预测值。
  12. 根据权利要求1至9和11任一项所述的方法,其中,所述响应所述请求消息,显示所述第一预设数量个所述目标推荐测试用例,包括:
    响应所述请求消息,确定所述第一预设数量个所述目标推荐测试用例对应的待测试对象;
    基于所述待测试对象、所述第一预设数量个所述目标推荐测试用例以及所述目标标签,生成目标关系图;
    显示所述目标关系图。
  13. 一种信息推荐设备,所述设备包括:存储器、处理器和通信总线;其中:
    所述存储器,用于存储可执行指令;
    所述通信总线,用于实现所述处理器和所述存储器之间的通信连接;
    所述处理器,用于执行所述存储器中存储的信息推荐程序,实现如权利要求1至12中任一项所述的信息推荐方法的步骤。
  14. 一种存储介质,所述存储介质上存储有信息推荐程序,所述信息推荐程序被处理器执行时实现如权利要求1至12中任一项所述的信息推荐方法的步骤。
PCT/CN2021/136325 2021-06-22 2021-12-08 一种信息推荐方法、设备及存储介质 WO2022267364A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110694029.4A CN113326203B (zh) 2021-06-22 2021-06-22 一种信息推荐方法、设备及存储介质
CN202110694029.4 2021-06-22

Publications (1)

Publication Number Publication Date
WO2022267364A1 true WO2022267364A1 (zh) 2022-12-29

Family

ID=77424327

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136325 WO2022267364A1 (zh) 2021-06-22 2021-12-08 一种信息推荐方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113326203B (zh)
WO (1) WO2022267364A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326203B (zh) * 2021-06-22 2022-08-12 深圳前海微众银行股份有限公司 一种信息推荐方法、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190146903A1 (en) * 2017-11-13 2019-05-16 Hyundai Motor Company Test case management system and method
CN109800169A (zh) * 2019-01-24 2019-05-24 拉扎斯网络科技(上海)有限公司 测试用例的获取方法、装置、可读存储介质和电子设备
CN110825975A (zh) * 2019-12-10 2020-02-21 腾讯科技(深圳)有限公司 一种信息推荐方法、装置、设备及计算机可读存储介质
CN111310053A (zh) * 2020-03-03 2020-06-19 上海喜马拉雅科技有限公司 信息的推荐方法、装置、设备和存储介质
CN111639034A (zh) * 2020-06-03 2020-09-08 深圳前海微众银行股份有限公司 测试方法、装置、设备及计算机存储介质
CN113326203A (zh) * 2021-06-22 2021-08-31 深圳前海微众银行股份有限公司 一种信息推荐方法、设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391509B (zh) * 2016-05-16 2023-06-02 中兴通讯股份有限公司 标签推荐方法及装置
CN114202370A (zh) * 2018-03-07 2022-03-18 创新先进技术有限公司 一种信息推荐方法和装置
CN109658206B (zh) * 2019-01-14 2022-07-26 京东方科技集团股份有限公司 信息推荐方法和装置
CN111522886B (zh) * 2019-01-17 2023-05-09 中国移动通信有限公司研究院 一种信息推荐方法、终端及存储介质
CN111368192A (zh) * 2020-03-03 2020-07-03 上海喜马拉雅科技有限公司 信息的推荐方法、装置、设备和存储介质
CN112632405B (zh) * 2020-12-31 2024-05-10 数字广东网络建设有限公司 一种推荐方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190146903A1 (en) * 2017-11-13 2019-05-16 Hyundai Motor Company Test case management system and method
CN109800169A (zh) * 2019-01-24 2019-05-24 拉扎斯网络科技(上海)有限公司 测试用例的获取方法、装置、可读存储介质和电子设备
CN110825975A (zh) * 2019-12-10 2020-02-21 腾讯科技(深圳)有限公司 一种信息推荐方法、装置、设备及计算机可读存储介质
CN111310053A (zh) * 2020-03-03 2020-06-19 上海喜马拉雅科技有限公司 信息的推荐方法、装置、设备和存储介质
CN111639034A (zh) * 2020-06-03 2020-09-08 深圳前海微众银行股份有限公司 测试方法、装置、设备及计算机存储介质
CN113326203A (zh) * 2021-06-22 2021-08-31 深圳前海微众银行股份有限公司 一种信息推荐方法、设备及存储介质

Also Published As

Publication number Publication date
CN113326203B (zh) 2022-08-12
CN113326203A (zh) 2021-08-31

Similar Documents

Publication Publication Date Title
CN109003028B (zh) 用于划分物流区域的方法和装置
EP3893154A1 (en) Recommendation model training method and related apparatus
CN110070391B (zh) 数据处理方法、装置、计算机可读介质及电子设备
CN113435602A (zh) 确定机器学习样本的特征重要性的方法及系统
EP3893169A2 (en) Method, apparatus and device for generating model and storage medium
CN110738527A (zh) 一种特征重要性排序方法、装置、设备和存储介质
CN111523678A (zh) 业务的处理方法、装置、设备及存储介质
CN116882520A (zh) 针对预定预测问题的预测方法及系统
CN114090838A (zh) 大数据可视化展示的方法、系统、电子装置和存储介质
CN113254542A (zh) 数据可视化处理方法及装置、电子设备
CN110362481A (zh) 自动测试方法及终端设备
WO2022267364A1 (zh) 一种信息推荐方法、设备及存储介质
CN111179055A (zh) 授信额度调整方法、装置和电子设备
AU2021204470A1 (en) Benefit surrender prediction
JPWO2018185899A1 (ja) ライブラリ検索装置、ライブラリ検索システム、及びライブラリ検索方法
Bielecki et al. Estimation of execution time for computing tasks
JP2023029604A (ja) 特許情報処理装置、特許情報処理方法、およびプログラム
CN115344495A (zh) 批量任务测试的数据分析方法、装置、计算机设备及介质
CN113780666B (zh) 一种缺失值的预测方法及装置、可读存储介质
CN113420165B (zh) 二分类模型的训练、多媒体数据的分类方法及装置
CN114881227A (zh) 模型压缩方法、图像处理方法、装置和电子设备
CN111859985B (zh) Ai客服模型测试方法、装置、电子设备及存储介质
CN110471586B (zh) 项目推荐方法、装置、计算机设备和存储介质
CN113779116A (zh) 对象排序方法、相关设备及介质
WO2020188043A1 (en) Method and system to deliver time-driven activity-based-costing in a healthcare setting in an efficient and scalable manner

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE