CN117708201A - Association rule mining method and device, electronic equipment and storage medium - Google Patents

Association rule mining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117708201A
CN117708201A CN202311734321.XA CN202311734321A CN117708201A CN 117708201 A CN117708201 A CN 117708201A CN 202311734321 A CN202311734321 A CN 202311734321A CN 117708201 A CN117708201 A CN 117708201A
Authority
CN
China
Prior art keywords
rule
node
data
association
mining
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311734321.XA
Other languages
Chinese (zh)
Inventor
赵莉
王智忠
赵峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311734321.XA priority Critical patent/CN117708201A/en
Publication of CN117708201A publication Critical patent/CN117708201A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a mining method and device of association rules, electronic equipment and a storage medium. The method comprises the following steps: acquiring test data of a plurality of transactions associated with a test scene, and determining a data set according to the test data; determining whether a pre-stored rule set comprises a target association rule corresponding to a test scene according to the data set; if the target association rule is not included, determining a node execution sequence set according to the data set; generating an association rule mining space according to the data set and the node execution sequence set; and mining a target association rule according to the association rule mining space, wherein the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of a regression testing range, and the second association sub-rule is used for guiding node cutting of a batch of templates. According to the scheme, the association rule between the data and the nodes can be mined and used for guiding node cutting of the batch template, so that labor and time cost of regression or joint measurement running batch is saved.

Description

Association rule mining method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data mining technologies, and in particular, to a method and apparatus for mining association rules, an electronic device, and a storage medium.
Background
With the continuous development of informatization and intellectualization technologies, banking business has higher and higher requirements on information and intellectualization. The daily user can conduct various business transactions through various channels, and at night, the bank needs to conduct batch business processing on various transaction detail data generated in the daytime so as to generate daily transaction reports, account information and the like.
The existing bank batch running business is usually realized by batch templates, and each batch template is a directed graph formed by individual batch nodes with independent functions according to a certain rule and is executed in sequence. Because the accounting system executing the running batch service can be simultaneously connected with a plurality of upper application systems, when the upper application systems are transformed or optimized, all nodes in the batch template need to be tested.
However, a batch template includes at least hundreds of nodes, and there may be hundreds of children per node. If all nodes in the batch template are tested each time, a lot of manpower and time are consumed.
Disclosure of Invention
The invention provides a mining method, a device, electronic equipment and a storage medium of an association rule, which can mine out a second association sub-rule for guiding node cutting of a batch template, thereby saving labor and time cost of regression or joint testing running lot, and simultaneously determining nodes which are involved in most scenes according to the first association sub-rule, and has good guiding significance for demarcating regression testing ranges of batch application architecture upgrading or technology stack migration and the like.
According to an aspect of the present invention, there is provided a mining method of association rules, the method including:
acquiring test data of a plurality of transactions associated with a test scene, and determining a data set according to the test data, wherein the data set comprises a plurality of data elements, and one data element is determined based on the test data of one transaction;
determining whether a pre-stored rule set comprises a target association rule corresponding to a test scene according to the data set;
if the rule set does not comprise the target association rule, determining a node execution sequence set according to the data set, wherein the node execution sequence set comprises a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used for indicating the nodes related to the corresponding data elements and the execution sequence thereof;
Generating an association rule mining space according to the data set and the node execution sequence set;
and mining a target association rule according to the association rule mining space, wherein the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of the regression testing range, and the second association sub-rule is used for guiding the node cutting of the batch templates.
According to another aspect of the present invention, there is provided an excavating apparatus of association rules, the apparatus comprising:
the data set determining module is used for acquiring test data of a plurality of transactions associated with a test scene and determining a data set according to the test data, wherein the data set comprises a plurality of data elements, and one data element is determined based on the test data of one transaction;
the judging module is used for determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set;
the sequence set determining module is used for determining a node execution sequence set according to the data set if the rule set does not comprise the target association rule, wherein the node execution sequence set comprises a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used for indicating the nodes related to the corresponding data elements and the execution sequence thereof;
The mining space determining module is used for generating an association rule mining space according to the data set and the node execution sequence set;
the system comprises an association rule mining module, a target association rule mining module and a rule processing module, wherein the association rule mining module is used for mining a space according to an association rule, the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of a regression test range, and the second association sub-rule is used for guiding node cutting of a batch of templates.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the mining method of association rules of any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the mining method of association rules of any of the embodiments of the present invention when executed.
According to the mining method of the association rule, test data of a plurality of transactions associated with a test scene are obtained, and a data set is determined according to the test data; determining whether a pre-stored rule set comprises a target association rule corresponding to a test scene according to the data set; if the rule set does not comprise the target association rule, determining a node execution sequence set according to the data set, and generating an association rule mining space according to the data set and the node execution sequence set; and determining the target association rule directly according to the association rule mining space. According to the technical scheme, on one hand, the acquired test data of a plurality of transactions associated with the test scene are processed to a certain extent to obtain the data set corresponding to each test data, so that the association rule is mined by directly utilizing the data set in the follow-up process, the simplified processing of the data elements is realized, the time consumed in the process of mining the association rule is reduced, and the mining efficiency of the association rule is improved. On the other hand, the method realizes the data set composed of the simplified data elements, and the node execution sequence corresponding to each data element generates an association rule mining space so as to determine the target association rule according to the association rule mining space. And finally, mining the association rule mining space by using an association rule mining algorithm to obtain a target association rule, so that the automatic and rapid mining of the association rule is realized, and a second association sub-rule is mined for guiding node cutting of a batch template, thereby saving labor and time cost of regression or joint testing running lot, simultaneously determining nodes which are involved in most scenes according to the first association sub-rule, and having good guiding significance for defining regression testing ranges of batch application architecture upgrading or technology stack migration and the like.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for mining association rules according to the present invention;
FIG. 2 is another flow chart of the method for mining association rules provided by the present invention;
fig. 3 is a schematic structural diagram of an excavating device for association rules provided by the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "target," "original," and the like in the description and claims of the present invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic flow chart of a method for mining association rules according to the present invention, where the method may be executed by a mining device for association rules, where the mining device for association rules may be implemented in hardware and/or software, and the mining device for association rules may be configured in an electronic device. As shown in fig. 1, the method includes:
S101, acquiring test data of a plurality of transactions associated with a test scene, and determining a data set according to the test data, wherein the data set comprises a plurality of data elements, and one data element is determined based on the test data of one transaction.
Specifically, test data of a plurality of transactions associated with the current test scene are obtained, one data element can be obtained according to the test data of each transaction, and a plurality of corresponding data elements obtained by the plurality of transactions associated with the current test scene are used as a set, namely a data set is obtained. Illustratively, taking test data of any transaction as an example, a data element corresponding to the test data of each transaction may be obtained as follows.
In one implementation, test data for a transaction is obtained and discretized. Wherein the discretization process is used to indicate continuous variables in the discretized test data. For example, assume that the current test scenario is a bank loan transaction scenario and the test data is a set of loan data. Assume that in this set of lending data there is 1000 yuan for debit 1, 2000 yuan for debit 2, and 5000 yuan for credit 1. When the discretization processing is carried out on the group of data, the debit and credit balance principle can be utilized to uniformly process the money type field, namely, finally, the field of the credit amount of 2000 yuan is obtained. Meanwhile, in order to obtain the final discretization result, the lender amount may be directly modified to "1" and the borrower amount to "0". Similarly, if the lending data is balanced, all the amounts are cleared, namely the lender amount and the lender amount are both 0; if the debit data is greater than the credit amount, the credit amount is modified to "0" and the debit amount is modified to "1".
In another implementation, test data for a transaction is obtained and simplified. The simplifying process is used for indicating to simplify discontinuous variables in the test data and removing variables irrelevant to nodes in the test data. For example, assume that the current test scenario is a bank lending transaction scenario, and that accounting dates and times exist in the test data. Assuming that there are accounting dates of the current day and accounting dates of the previous day in the accounting date and time of this group, the accounting date of the current day may be modified to "1", and the accounting date of the previous day may be modified to "0". Wherein, since the accounting date of the last day refers to the last accounting date taking the accounting date of the current day as the standard. For another example, serial number information for each lending request is present in the test data. Because the serial number information of each loan is irrelevant to the associated information to be mined, the serial number information can be directly removed.
In yet another implementation, test data for a plurality of transactions is obtained and deduplication processing is performed on the test data for the plurality of transactions. The deduplication process is used for indicating that variables in the test data of one transaction are removed, wherein the variables are completely consistent with the test data of other transactions. For example, assume that the current test scenario is a bank loan transaction scenario, each set of test data includes time information corresponding to the loan data, that is, each set of test data includes: debit information, accounting date 1, credit information, and accounting date 2. At this time, each set of data may be compared. In the comparison process, if any two or more groups of data are identical, the information of the identical data groups can be reserved only in one group. Namely, assume that in the test data of group A, the debit information is "1000 yuan", the accounting date 1 is "2023.12.04", the credit information is "2000 yuan", and the accounting date 2 is "2023.12.03"; and the group B test data and the group C test data are identical to the group A test data, namely, the debit information, the accounting date 1 and the lender information are all consistent with the accounting date 2, so that the group B test data and the group C test data can be subjected to duplicate removal processing, and only the group A test data is reserved.
After the test data of each transaction is processed, the processed test data can be modeled to obtain data elements. For example, assuming that the obtained test data set a is "0" in the debit information, "1" in the accounting date, "1" in the lender information, "0" in the accounting date, "2" in the accounting date, "0, 1, 0" in the data elements obtained by modeling the test data set a of the transaction. The data element corresponding to the transaction is 10, 21, 31, 40.
It should be noted that the above three implementations may be performed simultaneously or in steps, and the execution sequence is not limited herein. Illustratively, it is assumed that the test data obtained includes: at this time, discretizing each group of lending data according to the discretizing step, simplifying the time information and serial number corresponding to each group of lending data according to the simplifying step, and finally obtaining the discretizing and simplifying groups of data. For ease of understanding, the final presentation of the test data is exemplified below. For example: x sets of test data: {0,1, 0}; y sets of test data: {1, 0}; z sets of test data: {0,1,1,0}. The expression form of the X groups of test data after discretization and simplification can be as follows: x sets of test data: the debit information is "1000 yuan", the accounting date 1 is "2023.12.04", the credit information is "2000 yuan", the accounting date 2 is "2023.12.03", and the running water number is "1234567". After the discretization processing and simplification processing data such as the X-group test data, the Y-group test data and the Z-group test data are obtained, the data can be subjected to the deduplication processing. Namely, because the X-group test data is completely consistent with the Z-group test data, the test data obtained after discretization, simplification and de-duplication of the test data of the transaction is the X-group test data and the Y-group test data.
In the embodiment, the acquired test data of a plurality of transactions associated with the test scene are processed to a certain extent to obtain the data set corresponding to each test data, so that the association rule is mined by directly utilizing the data set in the follow-up process, the simplified processing of the data elements is realized, the time consumed in the process of mining the association rule is reduced, and the mining efficiency of the association rule is improved.
S102, determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set.
The pre-stored rule set may be a rule set mined according to historical association rules of the user, or may be an association rule set obtained according to experience. The target association rule comprises a first association sub-rule and a second association sub-rule, wherein the first association sub-rule is used for guiding the definition of the regression testing range, and the second association sub-rule is used for guiding node clipping of the batch templates.
Specifically, according to the data set, whether a pre-stored rule set comprises a target association rule corresponding to the current test scene is determined. Illustratively, assume that the test scenario is a statistical scenario of a bank lending transaction. And determining whether a target association rule corresponding to the test scene is included in the pre-stored rule set according to the data set. If the same test scene is tested in the previous test process, namely the test is only a regression test, then the subsequent operation can be directly carried out according to the target association rule; assuming that the current test scene is a new test scene, that is, the pre-stored rule set does not include the target association rule corresponding to the test scene, determining that the node execution sequence set is needed according to the data set.
And S103, if the rule set does not comprise the target association rule, determining a node execution sequence set according to the data set, wherein the node execution sequence set comprises a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used for indicating the nodes related to the corresponding data elements and the execution sequence thereof.
Specifically, when the pre-stored rule set does not include the target association rule, determining a node execution sequence set according to the data set. For example, the code coverage information corresponding to each data may be acquired by a method such as a code coverage detection tool. The node and the node execution sequence related to each data element in the data set can be obtained according to the code coverage information. Thus, after processing the data elements in the data set with the code coverage detection tool, a set of node execution sequences may be obtained. Wherein the node number of each node is generally indicated by a letter. Illustratively, it is assumed that the data element S needs to be determined 1 The node execution sequence of (2) can obtain the data element S according to the code coverage information 1 The nodes are a, b and c, and the node execution sequence is a-c-b. Thus, a node execution sequence C can be obtained 1 = (a-c-b). Similarly, if the node execution sequence set of the data set is required to be obtained, the node and the node execution sequence related to each data element in the data set can be obtained according to the method, and the node execution sequence set is combined into a set so as to obtain the node execution sequence set.
S104, generating an association rule mining space according to the data set and the node execution sequence set.
Specifically, the data set may be combined with the data elements and the node execution sequences having the correspondence in the node execution sequence set to generate the association rule mining space. Illustratively, it is assumed that there is a data element S in the data set 1 、S 2 And S is 3 The node execution sequence set has C 1 、C 2 And C 3 . At the same time S 1 And C 1 Has a corresponding relationship S 2 And C 2 Has a corresponding relationship S 3 And C 3 Has a corresponding relationship. Thus, the data element S may be present in the data set 1 、S 2 And S is 3 Node execution sequence C corresponding to each element 1 、C 2 And C 3 Merging to obtain association rule mining space U= { S 1 C 1 ,S 2 C 2 ,S 3 C 3 }。
In this embodiment, when determining that the pre-stored rule set does not include the target association rule corresponding to the test scene according to the data set, determining a node execution sequence corresponding to each data element in the data set by using code coverage information, and obtaining a node execution sequence set corresponding to the data set; and then splicing each data element in the data set and the corresponding node execution sequence in the node execution sequence set into an association rule mining space, so that the data set consisting of the simplified data elements is utilized, the association rule mining space is generated by the node execution sequence corresponding to each data element, and the target association rule is determined according to the association rule mining space.
S105, mining a space according to the association rule, and mining a target association rule, wherein the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of a regression test range, and the second association sub-rule is used for guiding node cutting of a batch of templates.
Specifically, the association rule mining space may be mined using a preset algorithm, such as an association rule mining algorithm. For example, the association rule mining space may be mined using an Apriori algorithm to obtain the target association rule. For example, confidence and support thresholds are set according to user requirements, and the Apriori algorithm is used for mining the association rules, so that target association rules are obtained. According to a first association sub-rule in the target association rule, the range of the regression test can be defined; according to the second association sub-rule in the target association rule, the nodes of the batch templates can be cut, for example, all batch nodes except the target nodes and the nodes with the dependency relationship in the batch templates are cut, so that when the data is processed according to the association rule in the follow-up process, only the target nodes and the nodes with the dependency relationship are processed, and the time and the efficiency of data processing are saved.
In this embodiment, the association rule mining space is mined by using the association rule mining algorithm to obtain the target association rule, so that the association rule is automatically and quickly mined, and the second association sub-rule is mined to be used for guiding node cutting of a batch template, so that the labor and time cost of regression or joint testing running batch is saved, and meanwhile, the nodes which are involved in most scenes can be determined according to the first association sub-rule, and the method has good guiding significance for defining regression testing ranges such as batch application architecture upgrading or technology stack migration.
According to the mining method of the association rule, test data of a plurality of transactions associated with a test scene are obtained, and a data set is determined according to the test data; determining whether a pre-stored rule set comprises a target association rule corresponding to a test scene according to the data set; if the rule set does not comprise the target association rule, determining a node execution sequence set according to the data set, and generating an association rule mining space according to the data set and the node execution sequence set; and determining the target association rule directly according to the association rule mining space. According to the technical scheme, on one hand, the acquired test data of a plurality of transactions associated with the test scene are processed to a certain extent to obtain the data set corresponding to each test data, so that the association rule is mined by directly utilizing the data set in the follow-up process, the simplified processing of the data elements is realized, the time consumed in the process of mining the association rule is reduced, and the mining efficiency of the association rule is improved. On the other hand, the method realizes the data set composed of the simplified data elements, and the node execution sequence corresponding to each data element generates an association rule mining space so as to determine the target association rule according to the association rule mining space. And finally, mining the association rule mining space by using an association rule mining algorithm to obtain a target association rule, so that the automatic and rapid mining of the association rule is realized, and a second association sub-rule is mined for guiding node cutting of a batch template, thereby saving labor and time cost of regression or joint testing running lot, simultaneously determining nodes which are involved in most scenes according to the first association sub-rule, and having good guiding significance for defining regression testing ranges of batch application architecture upgrading or technology stack migration and the like.
Fig. 2 is another flow chart of the association rule mining method provided by the present invention, and the present embodiment describes in detail the step of determining a data set according to test data, the step of determining whether a pre-stored rule set includes a target association rule corresponding to a test scene according to the data set, and the step of mining a target association rule in space according to the association rule on the basis of the above embodiment. As shown in fig. 2, the method includes:
s201, test data of each transaction associated with a test scene is obtained, and discretization processing, simplification processing and duplication removal processing are carried out on the test data of each transaction.
Specifically, prior to determining the data set using the test data, the test data for each transaction associated with the test scenario may be discretized, simplified, and deduplicated.
Illustratively, it is assumed that the test data obtained includes: at this time, discretizing each group of lending data according to the discretizing step, simplifying the time information and serial number corresponding to each group of lending data according to the simplifying step, and finally obtaining the discretizing and simplifying groups of data. For ease of understanding, the final presentation of the test data is exemplified below. For example: x sets of test data: {0,1, 0}; y sets of test data: {1, 0}; z sets of test data: {0,1,1,0}. The expression form of the X groups of data after discretization and simplification can be as follows: x sets of test data: the debit information is "1000 yuan", the accounting date 1 is "2023.12.04", the credit information is "2000 yuan", the accounting date 2 is "2023.12.03", and the running water number is "1234567". After the discretization processing and simplification processing data such as the X-group test data, the Y-group test data and the Z-group test data are obtained, the data can be subjected to the deduplication processing. Namely, because the X-group test data is completely consistent with the Z-group test data, the test data obtained after discretization, simplification and de-duplication of the test data of the transaction is the X-group test data and the Y-group test data.
S202, modeling the processed test data of each transaction to obtain data elements corresponding to each transaction.
Wherein the test data of the transaction after processing is { A } 1 ,A 2 ,...,A x The data element corresponding to the transaction is {1A } 1 ,2A 2 ,...,xA x Ai is the i field in the test data of the transaction after processing, i is an integer, and i is more than or equal to 1 and less than or equal to x.
Specifically, after the test data of each transaction is processed according to the steps of discretization processing, simplification processing and duplication removal processing, the test data of each processed transaction can be modeled to obtain the data element corresponding to each transaction. Illustratively, assume two test data are obtained, X sets of test data: {0,1, 0}, Y set of test data: {1,1,0,0}. Modeling the X groups of test data to obtain data elements corresponding to the X groups of data: {10, 21, 31, 40}. And similarly, modeling the Y groups of test data to obtain data elements corresponding to the Y groups of data: {11, 21, 30, 40}.
In the embodiment, the acquired test data of a plurality of transactions associated with the test scene are processed to a certain extent to obtain the data set corresponding to each test data, so that the association rule is mined by directly utilizing the data set, discretization and simplification processing of data elements are realized, the time consumed in the process of mining the association rule is reduced, a data structure foundation is laid for mining calculation of the association rule, and the mining efficiency of the association rule is improved.
S203, test data of a plurality of transactions associated with the test scene are obtained, and a data set is determined according to the test data.
Wherein, the data set can use S= { S 1 ,S 2 ,...,S n And Sj represents the j-th data element in the data set.
Specifically, after the test data of each transaction associated with the test scene is processed according to the steps, the data element corresponding to each transaction is obtained, and the data set can be determined according to all the test data.
Illustratively, it is assumed that test data for a total of two transactions is derived with its corresponding data element, namely the data element corresponding to the X set of data: {10, 21, 31, 40} and data element corresponding to Y group data: {11, 21, 30, 40}, the data element corresponding to the X group data is denoted as S 1 The data element corresponding to the Y group data is marked as S 2 . The data set s= { S may be determined according to the data element corresponding to each test data 1 ,S 2 }。
S204, determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set, if so, executing S213, and if not, executing S205.
Specifically, when the data set is determined, it may be determined whether the pre-stored rule set includes a target association rule corresponding to the current test scenario.
Illustratively, assume that the test scenario is a statistical scenario of a bank lending transaction. And determining whether a target association rule corresponding to the test scene is included in the pre-stored rule set according to the data set. If the same test scene is tested in the previous test process, that is, a data set consistent with the data set at this time and a target association rule corresponding to the data set exist in a pre-stored rule set, then the target node corresponding to the second association sub-rule can be directly determined according to the target association rule, and the dependent node is determined according to the target node and the node clipping process is performed; assuming that the current test scene is a new test scene, that is, the pre-stored rule set does not include the target association rule corresponding to the test scene, the target association rule needs to be determined according to the data set.
In this embodiment, whether a pre-stored rule set includes a target association rule corresponding to a test scene needs to be determined according to a data set; when the pre-stored rule set comprises the target association rule, a second association sub rule in the known target association rule can be called to directly guide node cutting of the batch templates, so that labor and time cost of regression or joint testing running batch is saved. Meanwhile, the node which can be involved in the current scene can be directly determined according to the first association sub-rule, so that the time consumed by redefining the regression testing range is reduced to a certain extent.
S205, respectively determining data sets S= { S 1 ,S 2 ,...,S n Code coverage information corresponding to each data element in the sequence.
For a batch program, because of the independence of batch program nodes, a batch node generally corresponds to a package or class in programming. Therefore, according to the code coverage information, the node execution sequence of the batch program corresponding to each data element, namely each test scene, can be obtained.
Specifically, when the pre-stored rule set does not include the target association rule corresponding to the test scene, code coverage information corresponding to each data element in the data set needs to be determined. For example, a code coverage detection tool may be utilized to calculate code coverage for each data element in the data set. For example, data set S={S 1 ,S 2 Computing S using a code coverage detection tool such as Jacoco 1 Obtaining S 1 Corresponding code overlay information C 1 And calculate S 2 Obtaining S 2 Corresponding code overlay information C 2
S206, determining a node execution sequence corresponding to each data element according to the code coverage information to obtain a node execution sequence set C= { C 1 ,C 2 ,...,C n }。
Wherein, Cj and executing a sequence for the j-th node in the node execution sequence set, wherein j is an integer, and j is more than or equal to 1 and less than or equal to n.
Specifically, when the code coverage information corresponding to each data element is obtained, the node execution sequence corresponding to each data element may be determined, and a node execution sequence set may be obtained. Illustratively, suppose S is obtained 1 Corresponding code overlay information C 1 And S is connected with 2 Corresponding code overlay information C 2 . Can be based on the code coverage information C 1 And C 2 Obtain S 1 And S is equal to 2 The corresponding node performs the sequence. At the same time, according to the code coverage information C 1 And C 2 A node execution sequence set c= { C can be obtained 1 ,C 2 }。
In the embodiment, the code coverage detection tool is utilized to accurately map the node coverage of the test data and the program, so that the execution sequence of the node is automatically determined, and accurate calculation is provided for the subsequent excavation of the association rule.
S207, obtaining batch templates.
The batch templates comprise a plurality of batch nodes, and the batch templates refer to batch node dependency relationship templates. Illustratively, in the history data, there are some nodes with complete dependencies, and the user can store the nodes with complete dependencies in the batch template. The node having a complete dependency relationship refers to a complete dependency node of b if a certain node a is executed, and another node b is necessarily executed.
Specifically, when the execution sequence of the data elements in the data set and the nodes corresponding to the data elements is determined, a pre-stored batch template can be called, so that the nodes corresponding to the data elements can be processed according to the nodes with complete dependency relations stored in the batch template.
S208, determining node dependency relationships according to the batch templates.
The node dependency relationship comprises a first node and a second node, wherein the first node and the second node are batch nodes in a batch template, and the first node is a complete dependency node of the second node.
Specifically, according to the nodes with complete dependency relationships stored in the batch templates, the nodes are compared with the node execution sequences in the node execution sequence set, and the node dependency relationships are determined.
S209, if the node execution sequence in the node execution sequence set comprises the first node and the second node at the same time, the second node is removed from the node execution sequence.
Specifically, if the node execution sequence in the node execution sequence set includes the first node and the second node, it is indicated that in the node execution sequence, there is a node with a node dependency relationship, and the second node in the node execution sequence may be temporarily removed. For example, assuming that the first node a and the second node b coexist in the node execution sequence, the second node b may be temporarily removed.
In this embodiment, according to a preset batch template, it is determined whether a complete dependency relationship exists among nodes in all the node execution sequences in the node execution sequence set, and the nodes with the complete dependency relationship are processed, and only the first node is reserved, so that simplification of the execution nodes is achieved, and therefore efficiency of association rule mining is improved.
S210, data set S= { S 1 ,S 2 ,...,S n Sum node execution sequence set c= { C 1 ,C 2 ,...,C n Splicing the data elements with the corresponding relations in the sequence and the node execution sequence to generate association rule mining space U= { S 1 C 1 ,S 2 C 2 ,...,S n C n }。
Wherein S is j C j The jth thing in the space is mined for association rules.
Specifically, after nodes with complete dependency relationships in each node execution sequence are processed by using a batch template, the data set S can be spliced with data elements with corresponding relationships in the node execution sequence set C and the node execution sequences, so as to generate an association rule mining space.
In this embodiment, a data set composed of simplified data elements is implemented, and a sequence is executed by a node corresponding to each data element, so as to generate an association rule mining space, so that a target association rule is determined according to the association rule mining space.
S211, determining constraint conditions.
The constraint condition comprises a minimum confidence threshold value and a minimum support threshold value corresponding to the first association sub-rule, and a minimum confidence threshold value and a minimum support threshold value corresponding to the second association sub-rule. Confidence level indicates how reliable an association rule is. I.e. assuming that one rule mined is a- > B, then the confidence of this rule is P (b|a), i.e. the probability that B occurs in case a has already occurred. The probability is represented here by P, which is commonly used for probability and statistics. The support indicates how frequently this rule occurs. I.e. assuming that one rule mined is a- > B, then the support of this rule is P (AB), i.e. the probability of having both a and B.
Specifically, constraints need to be determined before computing frequent item sets of the association rule mining space.
Illustratively, since in the data set each data element is formed beginning with a number, and in the node execution sequence set each node execution sequence is formed beginning with a letter, there may be only elements that are numbers or letters, or there may be elements that are both numbers and letters, in the association rule mining space. Therefore, in order to make the final result more accurate, two kinds of association sub-rules are set here. The minimum confidence threshold and the minimum support threshold corresponding to the first relevance rule may be that, for an element with only a beginning of a number or letter, the minimum confidence threshold corresponding to the element is 50%, and the minimum support threshold is 50%; the minimum confidence threshold and the minimum support threshold corresponding to the second association sub-rule may be 90% for the element having both a number and a letter start, and 50% for the element having both a letter start and a letter start. The values of the minimum confidence threshold and the minimum support threshold are merely exemplary references, and may be specifically adjusted according to actual use.
For example, after the first association sub-rule and the second association sub-rule are respectively determined, constraint conditions corresponding to the first association sub-rule and the second association sub-rule may be determined.
S212, mining the space and constraint conditions according to the association rules, and determining frequent item sets of the association rule mining space based on a preset algorithm.
Wherein the frequent item set includes a first association sub-rule and a second association sub-rule. The first relevance rule is used for guiding the definition of the regression testing range, and the second relevance rule is used for guiding node cutting of the batch templates.
Specifically, according to constraint conditions corresponding to the association rule mining space and the first association sub-rule and the second association sub-rule, a frequent item set of the association rule mining space is determined based on a preset algorithm. The preset algorithm may be an association rule mining algorithm, such as Apriori algorithm. Illustratively, assuming that the space and constraint conditions are mined according to the association rules, and the association rule mining space is calculated based on the Apriori algorithm, a first association sub-rule and a second association sub-rule can be obtained. The first association sub-rule may be an association rule of the execution sequence for the batch of nodes, and the second association sub-rule may be a strong association rule of the test data and the execution node. That is, the association rule of the batch node execution sequence can be used for guiding the definition of the regression testing range, and the strong association rule of the testing data and the execution node can be used for guiding the node clipping of the batch template.
In this embodiment, constraint conditions are determined according to the first association sub-rule and the second association sub-rule, and after the constraint conditions are determined, a frequent item set of the association rule mining space is calculated by using a preset algorithm, so that accuracy of calculation of the frequent item set of the association rule mining space is improved. Meanwhile, nodes which are involved in most scenes are determined according to the first association sub-rule, so that the method has good guiding significance for defining regression testing ranges such as batch application architecture upgrading or technology stack migration, and the effectiveness of regression testing and the quality of testing are improved.
S213, determining a target node corresponding to the second association sub-rule.
The target node may be, for example, a node that has a strong association rule with the executing node according to test data obtained from the frequent item set of the association rule mining space.
Specifically, when it is determined that the pre-stored rule set includes a target association rule corresponding to the test scene, or after the target association rule is mined according to the association rule mining space, a target node corresponding to the second association sub-rule may be determined. By way of example, the Apriori algorithm is utilized to calculate the association rule mining space, so that the strong association rule of the test data corresponding to the second association sub-rule and the executing node can be obtained. And obtaining the node with strong relevance with the test data, namely the target node, in the test data according to the strong relevance rule of the test data and the execution node.
S214, according to the target nodes, determining the dependent nodes with node dependency relations with the target nodes in the batch templates.
Specifically, according to the obtained target nodes, determining the dependent nodes with node dependency relationship with the target nodes in the batch template, and reserving the target nodes and the dependent nodes thereof.
In this embodiment, in the step S209, the dependent node having the dependency relationship is temporarily cut out to facilitate the calculation. Therefore, in this step, if a dependent node having a dependency relationship exists in the target node among the cut nodes, the dependent node needs to be newly reserved.
S215, all batch nodes except the target node and the dependent node in the batch template are cut.
Specifically, all batch nodes except the target node and the dependent node in the batch template are cut to obtain the target node and the dependent node which are only related to the test data.
In the embodiment, the batch nodes obtained after the test are detected, only the target nodes and the dependent nodes are reserved, and the result is stored in the batch templates, so that the nodes are automatically and accurately cut and the batch templates are formed. Meanwhile, when the same test data of the same test scene exists in the subsequent test, the target association rule in the batch template can be directly called, and the second association sub-rule is mined for guiding node cutting of the batch template, so that the labor and time cost of regression or joint testing running batch is saved.
According to the mining method of the association rule, test data of each transaction associated with a test scene is obtained, discretization processing, simplification processing and duplication removal processing are carried out on the test data, and then modeling is carried out on the test data to obtain data elements corresponding to each transaction; determining test data associated with a test scene as a data set, and determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set; when the data element is not included, code coverage information corresponding to each data element in the data set is determined, and a node execution sequence set are determined according to the code coverage information; acquiring a batch of templates, determining node dependency relations, removing second nodes in the first nodes and the second nodes with the node dependency relations, and splicing data elements with corresponding relations in a data set and a node execution sequence set and node execution sequences to obtain an association rule mining space; determining constraint conditions, mining a space and the constraint conditions according to association rules, and determining an association rule mining space frequent item set based on a preset algorithm; when the target association rule corresponding to the test scene is included or the association rule mining space frequent item set is determined, determining a target node corresponding to the second association sub-rule, determining a dependent node with a node dependency relationship with the target node in the batch template according to the target node, and cutting all batch nodes except the target node and the dependent node in the batch template. According to the technical scheme, on one hand, the acquired test data of a plurality of transactions associated with the test scene are processed to a certain extent to obtain the data set corresponding to each test data, so that the association rule is mined by directly utilizing the data set, discretization and simplification processing of data elements are realized, the time consumed in the process of mining the association rule is reduced, a data structure foundation is laid for subsequent mining calculation of the association rule, and the mining efficiency of the association rule is improved. On the other hand, determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set; when the pre-stored rule set comprises the target association rule, a second association sub rule in the known target association rule can be called to directly guide node cutting of the batch templates, so that labor and time cost of regression or joint measurement running batch is saved; meanwhile, the node which can be involved in the current scene can be directly determined according to the first association sub-rule, so that the time consumed by redefining the regression testing range is reduced to a certain extent. On the other hand, when the pre-stored rule set does not include the target association rule, the code coverage detection tool is utilized to accurately map the node coverage of the test data and the program, so that the execution sequence of the node is automatically determined, and accurate calculation is provided for the subsequent excavation of the association rule. In still another aspect, according to a preset batch template, determining whether nodes in all node execution sequences in the node execution sequence set have complete dependency relationships, and processing the nodes with the complete dependency relationships, and only reserving the first node to simplify the execution nodes, so that efficiency of association rule mining is improved. Meanwhile, the data set formed by the simplified data elements is realized, the node execution sequence corresponding to each data element generates an association rule mining space, and the target association rule is determined according to the association rule mining space. In still another aspect, constraint conditions are respectively determined according to the first association sub-rule and the second association sub-rule, and after the constraint conditions are determined, a frequent item set of the association rule mining space is calculated by using a preset algorithm, so that accuracy of calculation of the frequent item set of the association rule mining space is improved. Meanwhile, nodes which are involved in most scenes are determined according to the first association sub-rule, so that the method has good guiding significance for defining regression testing ranges such as batch application architecture upgrading or technology stack migration, and the effectiveness of regression testing and the quality of testing are improved. And finally, detecting the batch nodes obtained after the test, only retaining the target nodes and the dependent nodes, and storing the result into the batch templates, thereby realizing automatic and accurate node cutting and batch template formation. Meanwhile, when the same test data of the same test scene exists in the subsequent test, the target association rule in the batch template can be directly called, and the second association sub-rule is mined for guiding node cutting of the batch template, so that the labor and time cost of regression or joint testing running batch is saved.
Fig. 3 is a schematic structural diagram of an excavating device for association rules provided by the present invention. As shown in fig. 3, the apparatus includes:
a data set determining module 301, configured to obtain test data of a plurality of transactions associated with a test scenario, and determine a data set according to the test data, where the data set includes a plurality of data elements, and one data element is determined based on the test data of one transaction;
the judging module 302 is configured to determine, according to the data set, whether a pre-stored rule set includes a target association rule corresponding to the test scenario;
the sequence set determining module 303 is configured to determine, according to the data set, a node execution sequence set if the rule set does not include the target association rule, where the node execution sequence set includes a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used to indicate nodes related to the corresponding data elements and an execution sequence thereof;
the mining space determining module 304 is configured to generate an association rule mining space according to the data set and the node execution sequence set;
the association rule mining module 305 is configured to mine a space according to an association rule, and mine a target association rule, where the target association rule includes a first association sub-rule and a second association sub-rule, the first association sub-rule is used to guide the definition of a regression testing range, and the second association sub-rule is used to guide node clipping of a batch template.
Optionally, the apparatus further comprises: the data element determining module is used for acquiring test data of any transaction, and performing discretization processing, simplification processing and duplication removal processing on the test data of the transaction; modeling the processed test data of the transaction to obtain the data elements corresponding to the transaction.
Optionally, the sequence set determining module 303 is specifically configured to:
determining data sets s= { S respectively 1 ,S 2 ,...,S n Code coverage information corresponding to each data element in the sequence;
according to the code coverage information, determining a node execution sequence corresponding to each data element to obtain a node execution sequence set C= { C 1 ,C 2 ,...,C n }。
Optionally, the mining space determining module 304 is specifically configured to:
data set s= { S 1 ,S 2 ,...,S n Sum node execution sequence set c= { C 1 ,C 2 ,...,C n Splicing the data elements with the corresponding relations in the sequence and the node execution sequence to generate association rule mining space U= { S 1 C 1 ,S 2 C 2 ,...,S n C n }。
Optionally, the association rule mining module 304 is specifically configured to:
determining constraint conditions;
and determining a frequent item set of the association rule mining space based on a preset algorithm according to the association rule mining space and the constraint condition.
Optionally, the apparatus further comprises: the node dependency relationship determining module is used for acquiring batch templates after determining the node execution sequence set; determining node dependency relationships according to the batch templates; and if the node execution sequence in the node execution sequence set comprises the first node and the second node at the same time, removing the second node from the node execution sequence.
Optionally, if the rule set includes the target association rule, or after mining the target association rule, the node dependency relationship determining module is further configured to:
determining a target node corresponding to the second relevance rule;
according to the target nodes, determining the dependent nodes with node dependency relations with the target nodes in the batch templates;
all batch nodes in the batch template except the target node and the dependent node are cut.
The mining device for the association rule provided by the embodiment of the invention can execute the mining method for the association rule provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of the electronic device 4 provided by the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 4 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 4 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
The various components in the electronic device 4 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 4 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the mining method of association rules.
In some embodiments, the mining method of association rules may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 4 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the association rule mining method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the mining method of the association rule in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The mining method of the association rule is characterized by comprising the following steps:
acquiring test data of a plurality of transactions associated with a test scene, and determining a data set according to the test data, wherein the data set comprises a plurality of data elements, and one data element is determined based on the test data of one transaction;
determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set;
If the rule set does not comprise the target association rule, determining a node execution sequence set according to the data set, wherein the node execution sequence set comprises a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used for indicating nodes related to the corresponding data elements and the execution sequence thereof;
generating an association rule mining space according to the data set and the node execution sequence set;
and mining the target association rule according to the association rule mining space, wherein the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of a regression testing range, and the second association sub-rule is used for guiding node cutting of a batch of templates.
2. The mining method of association rules according to claim 1, wherein the method of determining any one of the data elements in the data set comprises:
the method comprises the steps of obtaining test data of any transaction, and performing discretization processing, simplification processing and de-duplication processing on the test data of the transaction, wherein the discretization processing is used for indicating continuous variables in the discretization test data, the simplification processing is used for indicating discontinuous variables in the simplified test data and removing variables irrelevant to nodes in the test data, and the de-duplication processing is used for indicating variables which are completely consistent with the test data of other transactions in the test data of the transaction;
Modeling the processed test data of the transaction to obtain data elements corresponding to the transaction, wherein the processed test data of the transaction is { A } 1 ,A 2 ,...,A x The data element corresponding to the transaction is {1A } 1 ,2A 2 ,...,xA x },A i I is an integer, and i is more than or equal to 1 and less than or equal to x in the test data of the transaction after processing.
3. The method of mining association rules according to claim 1, wherein determining a set of node execution sequences from the set of data comprises:
determining the data sets s= { S respectively 1 ,S 2 ,...,S n Code coverage information corresponding to each data element in the sequence, wherein S j A j-th data element in the data set;
according to the code coverage information, determining a node execution sequence corresponding to each data element to obtain the node execution sequence set C= { C 1 ,C 2 ,...,C n }, wherein C j And executing a sequence for the j-th node in the sequence set for the node, wherein j is an integer, and j is more than or equal to 1 and less than or equal to n.
4. The method of mining association rules according to claim 3, wherein the generating an association rule mining space according to the data set and the node execution sequence set includes:
bringing the data set s= { S 1 ,S 2 ,...,S n And the node performs a sequence set c= { C 1 ,C 2 ,...,C n Splicing the data elements with the corresponding relations in the 'and the node execution sequences' to generate the association rule mining space U= { S 1 C 1 ,S 2 C 2 ,...,S n C n And (3) Sjcj is the j-th object in the association rule mining space.
5. The mining method of association rules according to claim 1, wherein mining the target association rules according to the association rule mining space includes:
determining constraint conditions, wherein the constraint conditions comprise a minimum confidence threshold value and a minimum support threshold value corresponding to the first association sub-rule, and a minimum confidence threshold value and a minimum support threshold value corresponding to the second association sub-rule;
and determining a frequent item set of the association rule mining space based on a preset algorithm according to the association rule mining space and the constraint condition, wherein the frequent item set comprises the first association sub-rule and the second association sub-rule.
6. A method of mining association rules according to claim 1 or 3, characterized in that after determining that a node performs a sequence set, it further comprises:
the batch template is obtained, wherein the batch template comprises a plurality of batch nodes;
Determining node dependency relations according to the batch templates, wherein the node dependency relations comprise a first node and a second node, the first node and the second node are batch nodes in the batch templates, and the first node is a complete dependent node of the second node;
and if the node execution sequence in the node execution sequence set comprises the first node and the second node at the same time, removing the second node from the node execution sequence.
7. The method according to claim 1, further comprising, if the target association rule is included in the rule set or after the target association rule is mined:
determining a target node corresponding to the second relevance rule;
according to the target node, determining a dependent node with a node dependency relationship with the target node in the batch template;
all batch nodes in the batch template except the target node and the dependent node are cut.
8. An association rule mining apparatus, comprising: the system comprises a data set determining module, a judging module, a sequence set determining module, an excavating space determining module and an association rule excavating module;
The data set determining module is used for acquiring test data of a plurality of transactions associated with a test scene and determining a data set according to the test data, wherein the data set comprises a plurality of data elements, and one data element is determined based on the test data of one transaction;
the judging module is used for determining whether a pre-stored rule set comprises a target association rule corresponding to the test scene according to the data set;
the sequence set determining module is configured to determine, if the rule set does not include the target association rule, a node execution sequence set according to the data set, where the node execution sequence set includes a plurality of node execution sequences, the node execution sequences are in one-to-one correspondence with the data elements, and the node execution sequences are used to indicate nodes related to the corresponding data elements and an execution sequence thereof;
the mining space determining module is used for generating an association rule mining space according to the data set and the node execution sequence set;
the association rule mining module is used for mining the target association rule according to the association rule mining space, wherein the target association rule comprises a first association sub-rule and a second association sub-rule, the first association sub-rule is used for guiding the definition of a regression testing range, and the second association sub-rule is used for guiding node cutting of a batch template.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the mining method of the association rule of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the mining method of association rules of any of claims 1-7 when executed.
CN202311734321.XA 2023-12-15 2023-12-15 Association rule mining method and device, electronic equipment and storage medium Pending CN117708201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311734321.XA CN117708201A (en) 2023-12-15 2023-12-15 Association rule mining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311734321.XA CN117708201A (en) 2023-12-15 2023-12-15 Association rule mining method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117708201A true CN117708201A (en) 2024-03-15

Family

ID=90149377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311734321.XA Pending CN117708201A (en) 2023-12-15 2023-12-15 Association rule mining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117708201A (en)

Similar Documents

Publication Publication Date Title
CN113360580B (en) Abnormal event detection method, device, equipment and medium based on knowledge graph
CN112527281B (en) Operator upgrading method and device based on artificial intelligence, electronic equipment and medium
CN112949907A (en) Quota matching method, device, equipment and storage medium for engineering cost
CN115631273A (en) Big data duplicate removal method, device, equipment and medium
CN113904943B (en) Account detection method and device, electronic equipment and storage medium
CN115328621B (en) Transaction processing method, device, equipment and storage medium based on block chain
CN117708201A (en) Association rule mining method and device, electronic equipment and storage medium
CN115495151A (en) Rule engine migration method, device, equipment, storage medium and program product
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN114881521A (en) Service evaluation method, device, electronic equipment and storage medium
CN111429257B (en) Transaction monitoring method and device
CN113887101A (en) Visualization method and device of network model, electronic equipment and storage medium
CN113807391A (en) Task model training method and device, electronic equipment and storage medium
CN113553407B (en) Event tracing method and device, electronic equipment and storage medium
CN113239296B (en) Method, device, equipment and medium for displaying small program
CN116629810B (en) Operation recommendation method, device, equipment and medium based on building office system
US20230132618A1 (en) Method for denoising click data, electronic device and storage medium
CN115330532B (en) Block chain processing method, device, equipment and storage medium based on account model
CN114816758B (en) Resource allocation method and device
CN117632741A (en) Determination method and device of regression test case library, electronic equipment and storage medium
CN113962382A (en) Training sample construction method and device, electronic equipment and readable storage medium
CN117391791A (en) Engineering cost management method, device, equipment and storage medium
CN118051670A (en) Service recommendation method, device, equipment and medium
CN114548077A (en) Word stock construction method and device
CN117690277A (en) Threshold determining method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination