A differential extraction method, device, electronic device and computer-readable storage medium

By adopting differentiated extraction methods in the financial testing system, the degree of difference in test cases is calculated and displayed according to preset attribute classification, the problem of difficulty in checking subtle changes in the existing technology is solved, and the testing efficiency and value are improved.

CN112132176BActive Publication Date: 2024-11-26CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010818243.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-14
Publication Date
2024-11-26
Estimated Expiration
2040-08-14

AI Technical Summary

Technical Problem

When the financial system is updated with software or hardware configuration, it is difficult for the existing technology to effectively check and distinguish subtle changes between test cases, resulting in low inspection value and consuming a lot of energy from testers, and the inability to quantify the rate of difference and priority display.

Method used

The differentiated extraction method is used to divide the test cases into different categories by presetting the test case attribute classification indicators, calculate the difference between each test sample and case, display differentiated content, and improve inspection efficiency and priority display.

Benefits of technology

The difference measurement and priority display of test cases are realized, which improves the inspection speed and work value of testers, and simplifies the selective inspection of multiple test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112132176B_ABST
    Figure CN112132176B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of financial technology, and specifically to a method, device, electronic device and computer-readable storage medium for differential extraction, the method comprising obtaining N target test cases; wherein N≥2 natural numbers; according to a preset test case attribute classification index, each target test case is divided into M types of target test samples; wherein 1≤M≤4 natural numbers; according to a first preset rule, the difference of the M types of target test samples is calculated respectively; according to a second preset rule and the difference of the M types of target test samples, the difference of each target test case is calculated respectively; and the difference data of the N target test cases is extracted and displayed. This scheme realizes the quantification and display of the difference of different versions of test cases, and improves the speed of test personnel in checking test cases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to a differential extraction method, device, electronic device and computer-readable storage medium Background Art

[0002] The security and real-time requirements of the financial industry require a large number of tests on the financial system to ensure that there will be no security vulnerabilities or malfunctions in the financial system due to the update of the software configuration and / or hardware configuration of the financial system. At present, the existing technology often requires a large number of real-time test cases for the financial system to ensure the security of the financial system. During the testing process, in order to effectively ensure product quality, the test manager needs to check the content of the modified test cases almost every day, but most of the test case modifications are mainly concentrated on minor changes in the text description, which makes it difficult for testers to check the changes in the test cases. Sometimes, the two versions of the test case are only very minor and non-substantial changes, with low inspection value and high inspection difficulty, but it consumes a lot of energy of the testers. Summary of the invention

[0003] The purpose of this application is to solve at least one of the above technical defects. The technical solution adopted by this application is as follows:

[0004] In a first aspect, an embodiment of the present application provides a differentiation extraction method, which is applied to a financial testing system. The method includes:

[0005] Obtain N target test cases; where N is a natural number ≥ 2;

[0006] According to the preset test case attribute classification index, each target test case is divided into M types of target test samples; where 1≤M≤4 natural numbers;

[0007] According to the first preset rule, the difference of the M types of target test samples is calculated respectively;

[0008] According to the second preset rule and the difference between the M types of target test samples, respectively calculate the difference between each target test case;

[0009] Extract and display the difference data of N target test cases.

[0010] Optionally, calculating the differences of the M types of target test samples respectively according to the first preset rule includes:

[0011] Determine the type of the target test sample as M1;

[0012] The i-th M1 target test sample is processed into a characterization vector to obtain the characterization vector P i ; Where i is a natural number greater than or equal to 1;

[0013] Assign weight a to the i-th M1 target test sample i ;

[0014] Get the difference a of the i-th M1 target test sample i P i ;

[0015] We further obtain the difference of the M1 target test sample as M 1Q =a1P1+a2P2+…a i P i ; where M 1Q Indicates the difference of M1 target test samples.

[0016] Optionally, calculating the difference of each target test case according to the second preset rule and the difference of the M target test samples includes:

[0017] Assign weight b to the k-th target test sample k ;

[0018] The difference of the nth test case is N nQ =b1M 1Q +b2M 2Q +…b n M nQ ; Among them, N Nq Indicates the difference of the nth target test case.

[0019] Optionally, the method further includes, after acquiring N target test cases, performing denoising processing on the target test cases.

[0020] Optionally, the method further comprises:

[0021] Displaying the N target test versions in order according to the difference and test case attributes of each target test case obtained;

[0022] Optionally, the method further includes: displaying differentiated content of each target test case.

[0023] On the other hand, the embodiment of the present application provides a differential extraction device, which is applied to a financial testing system. The device includes: an interface module, a storage module, a classification module, a calculation module and a display module; wherein:

[0024] The interface module is used to obtain N target test cases; where N is a natural number ≥ 2;

[0025] The classification module is used to classify each target test case into M types of target test samples according to the preset test case attribute classification index; wherein 1≤M≤4 natural numbers;

[0026] The calculation module is used to calculate the difference of the M types of target test samples according to the first preset rule; and is also used to calculate the difference of each target test case according to the second preset rule and the difference of the M types of target test samples;

[0027] The display module is also used to extract and display the difference data of N target test cases;

[0028] The storage module is used to store the preset test case attribute classification index, the first preset rule and the second preset rule.

[0029] Optionally, the classification module is further used to determine that the type of the target test sample is M1;

[0030] The calculation module is specifically used to perform characterization vector processing on the i-th M1 target test sample to obtain a characterization vector P i ; where i is a natural number greater than or equal to 1; it is also used to assign weight a to the i-th M1 target test sample i ; Get the difference a of the i-th M1 target test sample i P i ; Further, the difference of the M1 target test sample is M 1Q =a1P1+a2P2+…a i P i ; where M 1Q Indicates the difference of M1 target test samples.

[0031] Optionally, the calculation module is further used for:

[0032] Assign weight b to the k-th target test sample k ;

[0033] The difference of the nth test case is calculated to be N nQ =b1M 1Q +b2M 2Q +…b n M nQ ; Among them, N Nq Indicates the difference of the nth target test case.

[0034] Optionally, the device includes a denoising module, wherein the denoising module is used to perform denoising processing on the target test cases after acquiring N target test cases.

[0035] Optionally, the display module is further used for:

[0036] Displaying the N target test versions in order according to the difference and test case attributes of each target test case obtained;

[0037] Optionally, the display module is further used to: display the differentiated content of each target test case.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;

[0039] The memory is used to store operation instructions;

[0040] The processor is used to execute the method described in any of the above embodiments by calling the operation instruction.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0042] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0043] The solution provided in the embodiment of the present application obtains N target test cases; wherein N is a natural number ≥ 2; according to the preset test case attribute classification index, each target test case is divided into M types of target test samples; wherein 1≤M≤4 natural numbers; according to the first preset rule, the difference of the M types of target test samples is calculated respectively; according to the second preset rule and the difference of the M types of target test samples, the difference of each target test case is calculated respectively; the difference data of the N target test cases is extracted and displayed. This solution divides the test cases into multiple different types of test samples according to the attributes, and uses a specific algorithm to calculate the difference of the different types of test samples and then calculate the difference of each test case, thereby realizing the differentiated display of the test cases by extracting the differences of multiple test cases, which is beneficial for the test personnel to conduct selective inspection according to the difference, and this solution improves the speed of the test personnel to check the test cases by displaying the differentiated content of different test cases. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0045] Figure 1 A schematic diagram of a differential extraction method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of the structure of a differential extraction device provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0049] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0051] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0052] Test cases are a type of test asset that is frequently modified. In a project, testers add, modify, and delete test cases, and the test tool records the entire life cycle of the test case and the detailed content of each version in the form of a timestamp. During the testing process, in order to effectively ensure product quality, the test manager needs to check the content of the modified test cases every day. Most test case modifications are mainly concentrated on subtle changes in text descriptions. First, the comparison is difficult, and if it is not a key transaction, the inspection value is low. The current test case inspection method cannot quantify the difference rate between the versions of the test case; it cannot display the priority according to the test case change rate and the importance of the corresponding transaction; it cannot compare items according to the changes in the test case. The above defects cause the test manager to find the part of the content he is concerned about in a large number of change records of the test case, which is inefficient and has poor functional availability. The following embodiments of the present invention are improvements to the above defects, thereby improving the efficiency of test case inspection.

[0053] Figure 1 A schematic diagram of a recommended method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may mainly include:

[0054] S101, obtaining N target test cases, where N is a natural number ≥ 2;

[0055] S102, according to the preset test case attribute classification index, each target test case is divided into M types of target test samples; wherein 1≤M≤4 natural numbers;

[0056] S103, calculating the difference of M types of target test samples respectively according to the first preset rule;

[0057] S104, calculating the difference of each target test case according to the second preset rule and the difference of the M types of target test samples;

[0058] S105: Extract and display the differences of N target test cases.

[0059] In an embodiment of the present application, the preset test case attribute indicators specifically include character typical and text type. Character typical attribute refers to an attribute whose attribute value is character typical; text type attribute refers to an attribute whose value is text type; text type attribute can be further divided into foreign key text attribute and plain text attribute. Among them, foreign key text attribute means that the attribute points to other entity objects; plain text attribute means that the attribute only contains the meaning described by the text itself and does not point to any other entity; plain text attribute can be further divided into long text attribute and short text attribute. Long text attribute refers to plain text attribute with a longer field length; short text attribute refers to plain text attribute with a shorter field length; long text attribute and short text attribute can be distinguished according to the input length judgment when the test case is input.

[0060] In an optional embodiment of the present application, the calculation of the difference of the M types of target test samples according to the first preset rule includes: determining that the target test sample is of type M1; performing characterization vector processing on the i-th M1 target test sample to obtain a characterization vector P i ; where i is a natural number greater than or equal to 1; assign weight a to the i-th M1 target test sample i ; Get the difference a of the i-th M1 target test sample i P i ; Further, the difference of the M1 target test sample is M 1Q =a1P1+a2P2+…a i P i ; where M 1QFurther, in the embodiment of the present application, the calculation of the difference of each target test case according to the second preset rule and the difference of the M target test samples includes: assigning a weight b to the k-th target test sample k ; The difference of the nth test case is N nQ =b1M 1Q +b2M 2Q +…b n M nQ ; Among them, N Nq Indicates the difference of the nth target test case.

[0061] In order to introduce the technical solution of the present application in more detail, the technical solution disclosed in the present application is now described in detail in combination with the above-mentioned preset test case attribute classification standard. First, N target test cases are obtained, wherein the N target test cases are test cases formed at different time points. The said classification of each target test case into M types of target test samples can correspond to the classification of each of the N target test cases into the following 4 categories (M is 4 in this case) according to the classification standard according to the above-mentioned preset test case attribute classification standard: typical character attributes, foreign key text attributes, long text attributes, and short text attributes.

[0062] First embodiment

[0063] In an optional embodiment, determining the target test sample as type M1 specifically includes determining the target test sample type as a typical S D (That is, M1 determined at this time is a typical S D ), multiple S D The target test samples of the type are vectorized to obtain the characterization vector P D , P D Each dimension in P represents a dictionary attribute, with a value of 0 or 1, 0 means that the attribute has not been modified, and 1 means that the attribute has been modified. D The vector is as follows:

[0064] P D =(d1,d2,d3…di)

[0065] Further give S D The feature vector P of a typical target test sample D The weights are as follows:

[0066] W D =(W d1 ,W d2 ,W d3 …W di )

[0067] The above di represents whether the typical target test sample of the i-th word is modified, Wdi Represents the weight value of the i-th dictionary attribute (i.e., a in the invention content) i ), and meet the following conditions:

[0068] W d1 +W d2 +W d3 +…+W di =1

[0069] Furthermore, S D The specific differences of the typical character target test samples are:

[0070] V D =d1*W d1 +d2*W d2 +d3*W d3 +…+di*W di

[0071] In the above embodiment, di is the same as the above invention content in which the i-th M1 target test sample is subjected to characterization vector processing to obtain the characterization vector P i Corresponding to; W di That is, the i-th M1 target test sample in the above invention content is given weight a i Corresponding to; di*W di That is, the difference a of the i-th M1 target test sample obtained in the invention content is i P i ; Further multiple S D The difference V is obtained from the typical target test sample of the word D That is, the difference M from the M1 target test sample in the above invention content 1Q correspond.

[0072] Second embodiment

[0073] Similarly, in an optional embodiment, the determination of the target test sample as a type M1 in the optional embodiment specifically includes determining the target test sample type as a foreign key text type target test sample S F (That is, M1 is determined to be a foreign key text type S F ), multiple S F The target test samples of the type are vectorized to obtain the characterization vector P F , P F Each dimension in represents a foreign key text attribute value, and the value is in the interval [0,1] to represent the difference of each dimension. The difference of each dimension is obtained by calculating the difference of the object pointed by the attribute. The calculation method of the difference of the attribute pointing to the object is the same as the calculation method of the test case difference. The vector is as follows:

[0074] P F=(f1,f2,f3…fi)

[0075] Assign a weight vector of the following form to the foreign key text attribute feature vector:

[0076] W F =(W f1 ,W f2 ,W f3 …W fi )

[0077] The fi above represents the difference calculated by the i-th foreign key text attribute, W fi Represents the weight value of the i-th foreign key text attribute and satisfies the following conditions:

[0078] W f1 +W f2 +W f3 +…+W fi =1

[0079] Furthermore, multiple S F The specific differences of the target test samples are as follows:

[0080] V F =f1*W f1 +f2*W f2 +f3*W f3 +…+fi*W fi

[0081] In the above embodiment, fi is the same as the above invention content in which the i-th M1 target test sample is subjected to characterization vector processing to obtain the characterization vector P i Corresponding to; W fi That is, the i-th M1 target test sample in the above invention content is given weight a i Corresponding to; fi*W fi That is, the difference a of the i-th M1 target test sample obtained in the invention content is i P i ; Further multiple S F The foreign key type target test sample obtains the difference V F That is, the difference M from the M1 target test sample in the above invention content 1Q correspond.

[0082] Third embodiment

[0083] Similarly, in an optional embodiment, the determination of the target test sample as type M1 in the optional embodiment specifically includes determining the target test sample type as a long text target test sample S L (That is, M1 is determined to be a long text type S L ), multiple S LThe target test samples of the type are vectorized to obtain the characterization vector P L , P L Each dimension in represents a long text attribute, and the value is in the interval [0,1], which represents the difference of each dimension. The difference of each dimension can be calculated by algorithms such as TF / IDF and BM25. The vector is as follows:

[0084] P L =(l1,l2,l3…ln)

[0085] Assign weight vectors of the following form to multiple long text target test sample feature vectors:

[0086] W L =(W l1 ,W l2 ,W l3 …W li )

[0087] The above li represents the attribute difference of the i-th long text, W li Represents the weight value of the i-th long text attribute and satisfies the following conditions:

[0088] W l1 +W l2 +W l3 +…+W li =1

[0089] Furthermore, multiple S L The specific differences of the target test samples are as follows:

[0090] V L =l1*W l1 +l2*W l2 +l3*W l3 +…li*W li

[0091] In the above embodiment, li is the same as the above invention content in which the i-th M1 target test sample is subjected to characterization vector processing to obtain the characterization vector P i Corresponding to; W li That is, the i-th M1 target test sample in the above invention content is given weight a i Corresponding to; li*W li That is, the difference a of the i-th M1 target test sample obtained in the invention content is i P i ; Further multiple S L The difference V is obtained from the long text type target test sample L That is, the difference M from the M1 target test sample in the above invention content 1Q correspond.

[0092] Fourth embodiment

[0093] Similarly, in an optional embodiment, the determination of the target test sample as type M1 in the optional embodiment specifically includes determining the target test sample type as a short text type target test sample S S (That is, M1 is determined to be a short text type S S ), multiple S S The target test samples of the type are vectorized to obtain the characterization vector P S , P S Each dimension in represents a short text attribute, and the value is in the interval [0,1], which represents the difference of each dimension. The difference of each dimension can be calculated by calculating the edit distance and then normalizing it. The vector is as follows:

[0094] P S =(s1,s2,s3…si)

[0095] Assign a weight vector of the following form to the short text target test sample feature vector:

[0096] W S =(W s1 ,W S2 ,W S3 …W Si )

[0097] The above si represents the attribute difference of the i-th short text, W si Represents the weight value of the i-th short text attribute and satisfies the following conditions:

[0098] W s1 +W s2 +W s3 +…+W si =1

[0099] Furthermore, multiple S S The specific differences of the target test samples are as follows:

[0100] V S =s1*W s1 +s2*W s2 +s3*W s3 +…si*W si

[0101] In the above embodiment, si is the same as the above invention content in which the i-th M1 target test sample is subjected to characterization vector processing to obtain the characterization vector P i Corresponding to; W si That is, the i-th M1 target test sample in the above invention content is given weight a i Corresponding to; si*W siThat is, the difference a of the i-th M1 target test sample obtained in the invention content is i P i ; Further multiple S S The difference V is obtained from the short text type target test sample S That is, the difference M from the M1 target test sample in the above invention content 1Q correspond.

[0102] Fifth embodiment

[0103] Based on the first to fourth embodiments, in the fifth embodiment, according to the version difference of the target test samples of each attribute classification obtained in the first to fourth embodiments, the version difference of each target test case is calculated, and the calculation formula is as follows:

[0104] V all =α*V D +β*V F +γ*V L +δ*V S

[0105] Among them, α, β, γ, δ are decimals in the range of [0,1], which are weight values ​​determined according to the importance and frequency of target test samples of different classification attributes. α represents the weight value of the difference of typical character target test samples, β represents the weight value of the difference of foreign key text type target test samples, γ represents the weight value of the long text type target test samples, and δ represents the weight value of the difference of short text target test samples. In this embodiment, α, β, γ, δ correspond to b1, b2, b3, b4 in the above invention content, respectively. D 、V F 、V L 、V S Corresponding to M in the above invention content respectively 1Q 、M 2Q 、M 3Q 、M 4Q , the V all The N in the above invention content nQ correspond.

[0106] The differentiated extraction method disclosed in the above embodiment classifies the target test cases according to preset attribute classification standards, divides the target test cases into target test samples of different attribute classes, and quantifies the differences between versions in the life cycle of the test cases by combining feature vectors and weighted algorithm rules.

[0107] In an optional embodiment, the method further includes denoising the target test cases after obtaining N target test cases. There are many test case attributes, but the attribute utilization rate is different according to different test case classifications. For example, the interface type test case has no case steps, so the case step fields are all empty. When calculating the interface case difference, such attributes can be removed as noise data. Furthermore, data that is empty in both the previous and next versions of the test case can be eliminated. In an optional embodiment, the long text attributes in the target test case attributes are segmented, and after removing stop words, the word formation rate is calculated, wherein stop words refer to modal particles, adverbs, prepositions, conjunctions, and other words that have no clear meaning in themselves. The word formation rate calculation formula is as follows:

[0108] Word formation rate = Num(length(word)>2) / Num(word)

[0109] In the above formula, Num(length(word)>2) represents the number of words with a length greater than 2, and Num(word) represents the total number of words. For fields with a small word rate, the removal operation is performed, and it is considered that this field has low validity and is not qualified to become a factor in calculating the similarity of the test case.

[0110] In an optional embodiment of the present application, the method further includes: sequentially displaying the N target test versions according to the difference and test case attributes of each target test case obtained. In a specific embodiment, the test case can be displayed on a page based on the test case difference calculation result and in combination with the important attributes of the test case. The display elements include but are not limited to the test case ID, case version, version difference, transaction information, change elements and comparison results, and case details. The display order priority includes that the case with a higher difference calculation result has a higher priority; the case with a financial transaction has the second highest priority; and the case with a high frequency transaction has the second highest priority.

[0111] In an optional embodiment, the method further includes displaying the differentiated content of each target test case so that the tester can clearly see the differences between different versions of the test cases.

[0112] based on Figure 1 The differential extraction method shown in the figure, on the other hand, the embodiment of the present application provides a differential extraction device, such as Figure 2 As shown, the device is applied to a financial testing system, and includes: an interface module 201, a storage module 202, a classification module 203, a calculation module 204, and a display module 205; wherein,

[0113] The interface module 201 is used to obtain N target test cases, where N is a natural number ≥ 2;

[0114] The classification module 203 is used to classify each target test case into M types of target test samples according to the preset test case attribute classification index; wherein 1≤M≤4 natural numbers;

[0115] The calculation module 204 is used to calculate the difference of the M types of target test samples according to the first preset rule; and is also used to calculate the difference of each target test case according to the second preset rule and the difference of the M types of target test samples;

[0116] The display module 205 is also used to extract and display the difference data of N target test cases;

[0117] The storage module 202 is used to store the preset test case attribute classification index, the first preset rule and the second preset rule.

[0118] In an optional embodiment, the classification module is further used to determine that the type of the target test sample is M1; the calculation module is specifically used to perform characterization vector processing on the i-th M1 target test sample to obtain a characterization vector P i ; where i is a natural number greater than or equal to 1; it is also used to assign weight a to the i-th M1 target test sample i ; Get the difference a of the i-th M1 target test sample i P i ; Further, the difference of the M1 target test sample is M 1Q =a1P1+a2P2+…a i P i ; where M 1Q Indicates the difference of M1 target test samples.

[0119] In an optional embodiment, the calculation module is further used to: assign a weight b to the k-th target test sample k ; The difference of the nth test case is calculated as:

[0120] N nQ =b1M 1Q +b2M 2Q +…b n M nQ

[0121] Among them, N Nq Indicates the difference of the nth target test case.

[0122] In an optional embodiment, the device includes a denoising module, wherein the denoising module is used to perform denoising processing on the target test cases after acquiring N target test cases.

[0123] In an optional embodiment, the display module is further used to display the N target test versions in order according to the difference degree and test case attribute of each target test case obtained;

[0124] In an optional embodiment, the display module is further used to display the differentiated content of each target test case.

[0125] It can be understood that the above modules of the recommended device in this embodiment have the function of realizing Figure 1 The functions of the corresponding steps of the method in the embodiment shown in . The function can be implemented by hardware, or by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The above modules can be software and / or hardware, and the above modules can be implemented separately or integrated with multiple modules. For the functional description of the above modules, please refer to Figure 1 The corresponding description of the method in the embodiment shown in will not be repeated here.

[0126] An embodiment of the present application provides an electronic device, including a processor and a memory;

[0127] A memory, used for storing operation instructions;

[0128] The processor is used to execute the recommended method provided in any embodiment of the present application by calling an operation instruction.

[0129] As an example, Figure 3 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown. Figure 3 As shown, the electronic device 2000 includes: a processor 2001 and a memory 2003. The processor 2001 and the memory 2003 are connected, such as through a bus 2002. Optionally, the electronic device 2000 may also include a transceiver 2004. It should be noted that in actual applications, the transceiver 2004 is not limited to one, and the structure of the electronic device 2000 does not constitute a limitation on the embodiments of the present application.

[0130] The processor 2001 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 2004 may include a receiver and a transmitter. The transceiver 2004 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0131] Processor 2001 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0132] The bus 2002 may include a path to transmit information between the above components. The bus 2002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 2002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0133] The memory 2003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0134] Optionally, the memory 2003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 2001. The processor 2001 is used to execute the application code stored in the memory 2003 to implement the recommended method provided in any embodiment of the present application.

[0135] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method and will not be described in detail here.

[0136] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the recommended method shown in the above method embodiment is implemented.

[0137] The computer-readable storage medium provided in the embodiments of the present application is applicable to any embodiment of the above method and will not be described in detail here.

[0138] The solution provided in the embodiment of the present application obtains N target test cases; wherein N≥2 natural numbers; according to the preset test case attribute classification index, each target test case is divided into M types of target test samples; wherein 1≤M≤4 natural numbers; according to the first preset rule, the difference of the M types of target test samples is calculated respectively; according to the second preset rule and the difference of the M types of target test samples, the difference of each target test case is calculated respectively; the difference data of N target test cases is extracted and displayed. This solution divides the test cases into multiple different types of test samples according to the attributes, and uses a specific algorithm to calculate the difference of the different types of test samples and then calculate the difference of each test case, thereby realizing the differentiated display of the test cases by extracting the differences of multiple test cases, which is conducive to the test personnel to conduct selective inspection according to the difference, and this solution improves the speed of the test personnel to check the test cases by displaying the differentiated content of different test cases, and can display the priorities according to the difference and importance of different test cases, thereby improving the value of the test work of the test personnel.

[0139] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0140] The above are only some embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A differential extraction method, applied to a financial testing system, characterized in that: The method comprises: Obtain N target test cases; where N is a natural number and N ≥ 2; According to the preset test case attribute classification index, each target test case is divided into M types of target test samples; where M is a natural number and 1≤M≤4; According to the first preset rule, the difference of the M types of target test samples is calculated respectively; According to the second preset rule and the difference between the M types of target test samples, respectively calculate the difference between each target test case; Extract and display the difference data of N target test cases; The classification indicators according to the preset test case attributes include: Dividing each target test case into M target test samples may correspond to dividing each of the N target test cases into the following four categories according to the above preset test case attribute classification standard: word typical attribute, foreign key text attribute, long text attribute, short text attribute, and M is 4 at this time; The step of calculating the differences of the M types of target test samples respectively according to the first preset rule includes: Determine the type of the target test sample as M1; The i-th M1 target test sample is processed into a characterization vector to obtain the characterization vector P i ; Where i is a natural number greater than or equal to 1; Assign weight a to the i-th M1 target test sample i ; Get the difference a of the i-th M1 target test sample i P i ; We further obtain the difference of the M1 target test sample as M 1Q =a1P1+a2P2+…a i P i ; where M 1Q Indicates the difference of M1 target test samples; W di Represents the weight value of the i-th dictionary attribute, that is, the a mentioned above i , and meet the following conditions: IN d1 +W d2 +W d3 +…+In di =1; Calculating the difference of each target test case according to the second preset rule and the difference of the M target test samples includes: The difference of the nth test case is N nQ =b1M 1Q +b2M 2Q +…b n M nQ ; Among them, N nQ represents the difference of the nth target test case, b n Assign weights to the nth target test samples; According to the above-obtained version differences of the target test samples for each attribute classification, the version difference of each target test case is calculated. The calculation formula is as follows: V all =α*V D +β*V F +γ*V L +δ*V S Among them, α, β, γ, δ are decimals in the range of [0,1], which are weight values ​​determined according to the importance and frequency of target test samples of different classification attributes. α represents the weight value of the difference of typical target test samples, β represents the weight value of the difference of foreign key text type target test samples, γ represents the weight value of the long text type target test samples, and δ represents the weight value of the difference of short text target test samples; α, β, γ, δ correspond to b1, b2, b3, b4 respectively, and V D 、V F 、V L 、V S Corresponding to M 1Q 、M 2Q 、M 3Q 、M 4Q , the V all With N nQ correspond.

2. The differential extraction method according to any one of claim 1, characterized in that: The method further includes, after acquiring N target test cases, performing denoising processing on the target test cases.

3. The differential extraction method according to claim 1, characterized in that: The method further comprises: The N target test versions are displayed in order according to the difference of each target test case obtained and the attributes of the test case.

4. The differential extraction method according to claim 1, characterized in that: The method further comprises: The differentiated content of each target test case is displayed.

5. A differential extraction device, applied to a financial testing system, characterized in that: The device comprises: an interface module, a storage module, a classification module, a calculation module and a display module; wherein, The interface module is used to obtain N target test cases, where N is a natural number and N≥2; The classification module is used to classify each target test case into M types of target test samples according to a preset test case attribute classification index; wherein M is a natural number and 1≤M≤4; The calculation module is used to calculate the difference of the M types of target test samples according to the first preset rule; and is also used to calculate the difference of each target test case according to the second preset rule and the difference of the M types of target test samples; The display module is also used to extract and display the difference data of N target test cases; The storage module is used to store the preset test case attribute classification index, the first preset rule and the second preset rule; The classification indicators according to the preset test case attributes include: Dividing each target test case into M target test samples may correspond to dividing each of the N target test cases into the following four categories according to the above preset test case attribute classification standard: word typical attribute, foreign key text attribute, long text attribute, short text attribute, and M is 4 at this time; The step of calculating the differences of the M types of target test samples respectively according to the first preset rule includes: The classification module is further used to determine that the type of the target test sample is M1; The calculation module is specifically used to perform characterization vector processing on the i-th M1 target test sample to obtain a characterization vector P i ; Where i is a natural number greater than or equal to 1; Assign weight a to the i-th M1 target test sample i ; Get the difference a of the i-th M1 target test sample i P i ; We further obtain the difference of the M1 target test sample as M 1Q =a1P1+a2P2+…a i P i ; where M 1Q Indicates the difference of M1 target test samples; W di Represents the weight value of the i-th dictionary attribute, that is, the a mentioned above i , and meet the following conditions: IN d1 +W d2 +W d3 +…+In di =1; Calculating the difference of each target test case according to the second preset rule and the difference of the M target test samples includes: The difference of the nth test case is N nQ =b1M 1Q +b2M 2Q +…b n M nQ ; Among them, N nQ represents the difference of the nth target test case, b n Assign weights to the nth target test samples; According to the above-obtained version differences of the target test samples for each attribute classification, the version difference of each target test case is calculated. The calculation formula is as follows: V all =α*V D +β*V F +γ*V L +δ*V S Among them, α, β, γ, δ are decimals in the range of [0,1], which are weight values ​​determined according to the importance and frequency of target test samples of different classification attributes. α represents the weight value of the difference of typical target test samples, β represents the weight value of the difference of foreign key text type target test samples, γ represents the weight value of the long text type target test samples, and δ represents the weight value of the difference of short text target test samples; α, β, γ, δ correspond to b1, b2, b3, b4 respectively, and V D 、V F 、V L 、V S Corresponding to M 1Q 、M 2Q 、M 3Q 、M 4Q , the V all With N nQ correspond.

6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 4 by calling the operation instruction.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.