WO2017198198A1 - Software compiling method and device - Google Patents

Software compiling method and device Download PDF

Info

Publication number
WO2017198198A1
WO2017198198A1 PCT/CN2017/084942 CN2017084942W WO2017198198A1 WO 2017198198 A1 WO2017198198 A1 WO 2017198198A1 CN 2017084942 W CN2017084942 W CN 2017084942W WO 2017198198 A1 WO2017198198 A1 WO 2017198198A1
Authority
WO
WIPO (PCT)
Prior art keywords
item set
order
frequent
item
target
Prior art date
Application number
PCT/CN2017/084942
Other languages
French (fr)
Chinese (zh)
Inventor
徐磊
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017198198A1 publication Critical patent/WO2017198198A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present disclosure relates to the field of software technologies, for example, to a software compilation method and apparatus.
  • Software version compilation is an indispensable link in continuous integration. For large software systems, such as communication systems, there are often many modules, and the degree of association between modules is high. It is easy to take the whole system, often because of a module. Small modifications caused the entire system to fail to compile. Because there are many modules involved, the involved personnel are extensive, the compilation troubleshooting cycle is long, and the severe blocking continues to integrate, resulting in a high risk of software version update.
  • the present disclosure provides a software compiling method and apparatus, which can solve the problem that the manual solving of the compiling problem is difficult, and the problem of inter-module interdependence is not considered when compiling the fault.
  • a method for compiling a version software may include: determining, according to a pre-established failure information construction knowledge base, a target frequent item set in the knowledge base, wherein the failure construction information knowledge base The item set that was previously failed to be saved is saved; the effective strong association rule is determined according to the dependency relationship between the target frequent item set calculation modules; and the modules of the effective strong association are bound together to compile or simultaneously warn.
  • the method may further include: acquiring, when each compilation fails, acquiring the item set of the failed build and Add to the knowledge base.
  • determining the target frequent item set in the knowledge base according to the pre-established failure building information knowledge base may include: sequentially calculating a frequent item set of each order according to the item set in the knowledge base Calculating the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold, and obtaining the 1st order frequent item set; according to the m-1 order frequent item set, Using lexicographic order and combination method, multiple m-1 order frequent cameras are generated to generate multiple m-th order items, and the support degree of each m-th order item set is calculated respectively, and the support degree is lower than the preset corresponding to the preset m-th order item set.
  • the m-th order item set with the support threshold is set for pruning, and the m-th order frequent item set is obtained, and when the number of m-th order frequent cameras is one, the m-th order frequent item set is determined as the target frequent item set, wherein m is A positive integer and m is greater than 1.
  • Support(X) represents the probability of the item set ⁇ X ⁇ appearing in the total item set
  • Support(X->Y) indicates that the item set ⁇ X, Y ⁇ is in the total item.
  • the probability of occurrence in the set P represents the probability
  • P(X)/P(I) represents the probability of the item set (X) appearing in the total item set
  • the support degree of the item set means that the item set appears in the total item set The probability.
  • determining the valid strong association rule according to the dependency relationship between the target frequent item set calculation modules may include: calculating a confidence level of each non-empty item set in the target frequent item set, which is lower than The non-empty item set corresponding to the confidence level of the pre-set confidence threshold is pruned to obtain a plurality of target non-empty item sets; and the plurality of target non-empty item sets are calculated according to the confidence of the plurality of target non-empty item sets The degree of lift; and the rule between multiple target non-empty item sets that determine a degree of lift greater than one is a valid strong association rule.
  • the calculating the confidence of each non-empty item set in the target frequent item set adopts the following formula:
  • the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
  • the lift Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included;
  • the embodiment further provides a version software compiling device, which may include: a target frequent item set determining unit, configured to determine a target frequent item set in the knowledge base according to a pre-established failure building information knowledge base, wherein The failed build information knowledge base stores the item set that is previously failed to be built; the effective strong association rule analysis unit is configured to determine the effective strong association rule according to the dependency relationship between the target frequent item set calculation modules; and the associated compilation
  • the Build Unit is set to bind the modules that are effectively strongly associated together and compile at the same time.
  • the target frequent item set determining unit may include: a first determining subunit, configured to sequentially calculate a frequent item set of each order according to the item set of the knowledge base; and second determining the subunit, configured as a calculation center Determining the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold, and obtaining the 1st order frequent item set; and the third determining subunit, which is set according to m-
  • the first-order frequent itemsets are lexicographically ordered and combined, and multiple m-1 order frequent itemsets are generated to generate multiple m-th order items, and the support degrees of multiple m-th order items are calculated respectively.
  • the support degree is lower than m order.
  • the m-th order item set of the preset support degree threshold corresponding to the item set is pruned, and the m-th order frequent item set is obtained.
  • the m-th order frequent item set is determined as the target frequent item set. Stop calculating the m+1th order item set, where m is a positive integer and m is greater than 1.
  • the effective strong association rule analysis unit may include: a first analysis subunit, configured to calculate a confidence level of each non-empty item set in the target frequent item set, and a non-empty item lower than a preset reliability threshold The set performs pruning to obtain a plurality of target non-empty item sets; and the second analysis sub-unit is configured to calculate a degree of elevation between the plurality of target non-empty item sets according to the confidence of the plurality of target non-empty item sets; The third analysis subunit is set to determine that the rule between the plurality of target non-empty item sets having a degree of lift greater than 1 is effective Association rules.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for executing any of the above version software compilation methods.
  • the embodiment also provides a server including one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory, when executed by one or more processors, Execute any of the above versions of the software compilation method.
  • the embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to execute any of the above versions of the software compilation method.
  • the version software compiling method and apparatus provided by the present disclosure automatically calculates the degree of association between modules according to a pre-established failure to construct an information knowledge base, and determines effective strong association rules; and binds the modules of effective strong association according to the effective strong association rules. Compile at the same time or at the same time. It is the most likely to achieve self-repair of the compiled project, ensuring continuous integration and reducing the risk of release. It can also save the wrong human resources when the compilation fails.
  • FIG. 1 is a flowchart of a method for compiling a version software according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for determining a target frequent item set according to an embodiment of the present disclosure.
  • FIG. 3 is a flowchart of an effective strong association rule analysis method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a version software compiling apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a target frequent item set determining unit according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an effective strong association rule analysis unit according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a general hardware of a server according to an embodiment of the present disclosure.
  • the execution body of the version software compiling method is a version software compiling device, and the software compiling device may be located in a server or a terminal.
  • the version software compiling method in this embodiment may include S10-S30.
  • a target frequent item set in the knowledge base is determined according to a pre-established failure building information knowledge base.
  • the failed build information knowledge base saves the item set that was previously failed to be built, and each compiled failure module corresponds to one item set.
  • the set I of items is called an item set, the number of elements is called the length of the item set, and the item set of length k is called the k-order item set.
  • the set of tasks that are failed to build each time is a subset of the total item set I.
  • determining a target frequent item set in the knowledge base includes S101-S103 according to the pre-established failure building information knowledge base.
  • a preset support degree threshold is preset for each order item, and the preset support degree threshold may represent a minimum importance of the association rule.
  • a frequent item set may refer to a set of items whose support degree is not less than a preset support degree threshold corresponding to the order item set.
  • a frequent item set of length k can be referred to as a k-th order frequent item set.
  • the item set of each order corresponds to a preset support degree threshold of the order, and the item set pruning whose support degree is lower than the preset support threshold of the order is supported, and the support degree is greater than or equal to the preset support of the order.
  • the set of items of the degree threshold constitutes a frequent item set of the order.
  • calculating the first-order frequent item set includes: calculating a support degree of each first-order item set in the knowledge base, and performing pruning on the first-order item set whose support degree is lower than the first threshold, and supporting the degree A set of 1st order items greater than or equal to a preset support degree threshold of the 1st order item set constitutes a 1st order frequent item set.
  • Pruning means that the set of items that are less than the preset support threshold of the first-order item set is ignored.
  • the following formula may be used to calculate the support degree of the n-th order frequent itemsets:
  • Support(X) represents the probability of the item set ⁇ X ⁇ appearing in the total item set
  • Support(X->Y) indicates that the item set ⁇ X, Y ⁇ is in the total item. The probability of occurrence in the set.
  • a single module item set that is, a 1st order item set is calculated, and the first degree item set lower than the preset support degree threshold corresponding to the 1st order item set is pruned in the total item set support degree.
  • the preset support degree threshold (which may be referred to as a first threshold) corresponding to the first-order item set is 50%.
  • the knowledge base item set includes four first-order item sets, and each first-order item is calculated.
  • the corresponding support degree is set, and the first-order item set whose support degree is lower than the preset support degree threshold is pruned (as shown in FIG. 2, the first-order item set ⁇ D ⁇ is pruned), and the support degree is greater than or
  • a first-order item set equal to a preset support degree threshold corresponding to the first-order item set constitutes a first-order frequent item set ⁇ A ⁇ , ⁇ B ⁇ , ⁇ C ⁇ , and ⁇ E ⁇ .
  • the m-th order item set is generated by using the dictionary order and the combination manner, and the support degree of each m-th order item set is calculated respectively, and the preset with the support degree lower than the m-th order item set is preset.
  • the m-th order item set of the support threshold is pruned to obtain an m-th order frequent item set until the last remaining high-order frequent item set.
  • n is a positive integer and m is greater than 1.
  • dictionary order also known as Lexicographical Order
  • Lexicographical Order is a sorting method for forming sequences of random variables. Multiple random variables are compared one by one from left to right, and are arranged in order from small to large to form an ordered queue.
  • the first-order frequent itemsets ⁇ A ⁇ , ⁇ B ⁇ , ⁇ C ⁇ , and ⁇ E ⁇ are lexicographically ordered, and the process of generating a second-order item set may be: combining four first-order frequent itemsets into two.
  • the set of order terms is ⁇ A, B ⁇ , ⁇ B, C ⁇ , ⁇ C, E ⁇ , ⁇ A, C ⁇ , ⁇ B, E ⁇ and ⁇ A, E ⁇ .
  • a plurality of second-order item sets are randomly arranged, and the plurality of second-order item sets are sorted in a lexicographic order, and first, the first item sets in the plurality of second-order item sets are respectively compared by two, and The plurality of second-order item sets are reordered in order from small to large, and the second item set in the plurality of second-order item sets after reordering is compared two by two, and again in order from small to large Multiple 2nd order items are sorted.
  • the lexicographically ordered 2nd order item set is: ⁇ A, B ⁇ , ⁇ A, C ⁇ , ⁇ A, E ⁇ , ⁇ B, C ⁇ , ⁇ B, E ⁇ , ⁇ C, E ⁇ .
  • the obtained first-order frequent itemsets are ⁇ A ⁇ , ⁇ B ⁇ , ⁇ C ⁇ , and ⁇ E ⁇ .
  • the first-order frequent itemsets are generated in a lexicographic order and a combination of two and two to generate a second-order item set ⁇ A, B ⁇ , ⁇ A, C ⁇ , ⁇ A, E ⁇ , ⁇ B, C ⁇ , ⁇ B, E ⁇ , ⁇ C, E ⁇ .
  • the second-order item set whose support degree is lower than the preset support degree threshold (preset threshold value, for example, 25%) corresponding to the second-order item set is pruned, and the support degree is greater than or equal to the second-order item of the small support degree threshold.
  • the set constitutes a second-order frequent item set ⁇ A, C ⁇ B, C ⁇ , ⁇ B, E ⁇ C, E ⁇ , as shown in Table 3 below.
  • the second-order frequent itemsets ⁇ A, C ⁇ , ⁇ B, C ⁇ , ⁇ B, E ⁇ and ⁇ C, E ⁇ obtained above are generated in a combined manner and in a lexicographic order to generate a third-order item set ⁇ A , B, C ⁇ , ⁇ A, C, E ⁇ , ⁇ A, B, E ⁇ and ⁇ B, C, E ⁇ .
  • the third-order item set (for example, 25%) whose support degree is lower than the preset support degree threshold corresponding to the third-order item set is pruned, and the support degree is greater than or equal to the preset support degree threshold corresponding to the third-order item set.
  • the set of order items constitutes the 3rd order frequent itemsets ⁇ B, C, E ⁇ , as shown in Table 4 below.
  • the first-order frequent item set is the target frequent item set, and if the first-order frequent item set is more than one, according to the obtained first order Frequent itemsets, using a lexicographical order and a two-two combination method, generating a 2nd-order item set, respectively calculating the support degree of each 2nd-order item set, and pruning the 2nd-order item set whose support degree is lower than the second threshold, A 2nd order item set whose support degree is greater than or equal to the second threshold value constitutes a 2nd order frequent item set.
  • the third-order item set is continuously calculated, and the third-order frequent item set is calculated until the last remaining high-order frequent item set.
  • the second-order frequent item set is more than one, continue to calculate the third-order item set, and the calculated multiple 3
  • the support degree of the order item set is compared with the preset support degree threshold corresponding to the 3rd order item set. If the support degree of all the 3rd order item sets is less than the preset support degree threshold corresponding to the 3rd order item set, it is determined that the requirement is not met.
  • the frequent item set, the version software compilation process in this embodiment ends.
  • the effective strong association rule is determined according to the dependency relationship between the target frequent item set calculation modules.
  • determining a valid strong association rule may include S201-S203 according to a dependency relationship between the target frequent item set calculation modules.
  • a confidence level of each non-empty item set in the target frequent item set is calculated, and a non-empty item set that does not satisfy the pre-set reliability threshold is pruned.
  • the reliability threshold when the confidence level of the non-empty item set is lower than the preset reliability threshold, determining that the confidence of the non-empty item set does not satisfy the pre-set confidence threshold; when the confidence of the non-empty item set is greater than or equal to When the reliability threshold is preset, it is determined that the execution degree of the non-empty item set satisfies the preset reliability threshold.
  • the degree of lifting between the non-empty item sets is calculated according to the confidence of the non-empty item set left after the pruning.
  • the calculating the confidence of each non-empty item set in the target frequent item set may adopt the following formula:
  • the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
  • the calculating the degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning may be performed by using the following formula:
  • the lift degree Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included.
  • a rule that satisfies a preset support threshold and a preset reliability threshold is called a strong association rule.
  • a strong association rule a valid strong association rule and an invalid strong association rule can be divided.
  • the target frequent item set is ⁇ B, C, E ⁇
  • the confidence between the individual non-empty item sets in the target frequent item set is calculated respectively, assuming that the pre-set confidence threshold is 75%, when a single non-empty item Rules with confidence that the set is less than the pre-set confidence threshold will be pruned, as shown in Table 5 below:
  • the modules that are effectively strongly associated are combined and compiled at the same time to maximize self-healing, and the modules with effective and strong associations are combined and early warning can reduce the human resources of manual troubleshooting and improve efficiency.
  • step S20 valid strong association rules B->E and E->B are obtained.
  • B can be constructed at the same time, or module B can be notified at the same time; when the E construction fails, it can be simultaneously B linkage construction, can also notify module E at the same time, so that B and E are associated, considering the relationship between different modules, version compilation according to the effective strong association rules, can be the most self-healing, to ensure continuous integration
  • the effect is to reduce the risk of version release. Can warn when it is not self-healing Improve the efficiency of manual troubleshooting.
  • the knowledge base can be continuously updated, and the updated knowledge base can re-correct the effective strong association rules.
  • the version software compiling method provided in this embodiment automatically calculates the association degree between the modules by constructing the information knowledge base according to the pre-established failure, and determines the effective strong association rule; and binds the effective strong association modules together according to the effective strong association rule. Compile or alert at the same time. It can not only self-repair the compiled project, but also ensure continuous integration and reduce the risk of version release. It can also save the wrong human resources when the compilation fails.
  • the version apparatus may include a target frequent item set determining unit 10, an effective strong association rule analyzing unit 20, and an associated compiling building unit 30.
  • the target frequent item set determining unit 10 is configured to determine a target frequent item set in the knowledge base according to the pre-established failure building information knowledge base, wherein the failed build information knowledge base stores the item set that was previously failed to be built. .
  • the target frequent item set determining unit 10 may include: a first determining subunit 101, configured to sequentially calculate a frequent item set of each order according to the item set of the knowledge base; and second determining the subunit 102, setting To calculate the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold to obtain a 1st order frequent item set; and the third determining subunit 103, setting According to the m-1 order frequent itemsets, the m-order itemsets are generated in lexicographic order, and the support degree of each m-th order item set is calculated separately, and the m-th order item set whose support degree is lower than the preset threshold is pruned to obtain m. The order frequent itemsets until the last remaining high-order frequent itemsets, where m is a positive integer and m is greater than 1.
  • the third determining subunit 103 may be configured to calculate an nth order frequent item set support degree by using the following formula:
  • Support(X) represents the probability of the item set ⁇ X ⁇ appearing in the total item set
  • Support(X->Y) indicates that the item set ⁇ X, Y ⁇ is in the total item. The probability of occurrence in the set.
  • the effective strong association rule analysis unit 20 is configured to determine a valid strong association rule according to the dependency relationship between the target frequent item set calculation modules.
  • the effective strong association rule analysis unit 20 may include: a first analysis subunit 201 configured to calculate a confidence level of each non-empty item set in the target frequent item set, and a non-pre-set confidence threshold The empty item set is pruned; the second analysis sub-unit 202 is configured to calculate a degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning; the third analysis sub-unit 203, The rule set to determine that a non-empty item set that satisfies a degree of lift greater than 1 is a valid strong association rule.
  • the first analysis sub-unit 201 may be further configured to: when calculating the confidence of each non-empty item set in the target frequent item set, adopt the following formula:
  • the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
  • the second analysis sub-unit 202 may be further configured to calculate a degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning, using the following formula:
  • the lift degree Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included.
  • the association compilation building unit 30 is arranged to bind the modules that are effectively strongly associated together to compile or simultaneously warn.
  • the modules with effective strong associations are combined and compiled at the same time to maximize self-healing, and the modules with effective strong associations are combined and early warning can reduce the human resources of manual troubleshooting errors and improve effectiveness.
  • the apparatus may further include a correction unit configured to acquire the item set of the failed build and add to the knowledge base each time the compilation fails.
  • the version software compiling apparatus provided in this embodiment automatically calculates the association degree between the modules by constructing the information knowledge base according to the pre-established failure, and determines the effective strong association rule; and binds the effective strong association modules together according to the effective strong association rule. Compile or alert at the same time. It can not only self-repair the compiled project, but also ensure continuous integration and reduce the risk of version release. It can also save the wrong human resources when the compilation fails.
  • the software may be stored in a storage medium, which may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (Random Access Memory, A medium that can store program codes, such as a RAM, a disk, or an optical disk, or a transitory storage medium.
  • the software may include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform any of the methods described in the above embodiments.
  • FIG. 7 a general hardware structure diagram of a server provided in this embodiment is shown in FIG. 7.
  • the server includes: a processor 310 and a memory 320; and may also include a communication interface (Communications). Interface) 330 and bus 340.
  • Communication interface Communication interface
  • the processor 310, the memory 320, and the communication interface 330 can complete communication with each other through the bus 340. Communication interface 330 can be used for information transmission.
  • the processor 310 can call the logic instructions in the memory 320 to perform the version software compilation method of the above embodiment.
  • logic instructions in the memory 320 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the program when executed, may include a flow of an embodiment of the method described above, wherein the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the present disclosure provides a version software compiling method and device, which can implement self-repair of a compiled project, ensure continuous integration effect, and reduce the risk of version release. It is also possible to save the wrong human resources when the compilation fails.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

A software version compiling method and apparatus. The method comprises: according to a pre-established failed creation information repository, determining a target frequent item set in the repository (S10), wherein an item set for each previous failed creation is stored in the failed creation information repository; calculating a dependence relationship between modules according to the target frequent item set, and determining an effective strong correlation rule (S20); and binding together the modules which are in an effective strong correlation, to simultaneously compile orsimultaneously give an early warning (S30).

Description

软件编译方法及装置Software compilation method and device 技术领域Technical field
本公开涉及软件技术领域,例如涉及一种软件编译方法及装置。The present disclosure relates to the field of software technologies, for example, to a software compilation method and apparatus.
背景技术Background technique
软件版本编译是持续集成中不可缺少的环节,对于大型软件系统,如通信系统,往往模块繁多,且模块间的关联耦合度较高,容易牵一发而动全身,往往会因为某个模块一个小的修改导致整个系统编译不通过。因为涉及的模块繁多,涉及的人员广泛,编译故障排查周期较长,严重阻塞持续集成,导致软件版本更新风险很高。Software version compilation is an indispensable link in continuous integration. For large software systems, such as communication systems, there are often many modules, and the degree of association between modules is high. It is easy to take the whole system, often because of a module. Small modifications caused the entire system to fail to compile. Because there are many modules involved, the involved personnel are extensive, the compilation troubleshooting cycle is long, and the severe blocking continues to integrate, resulting in a high risk of software version update.
在版本编译出现不通过时,往往都是依靠维护人员一个个排除故障,以解决编译不通过的问题,这种方式一方面会导致维护人员长期困于基础环境的维护和故障定位中,同时编译故障定位时多模块间相互依赖关系影响的情况容易被忽略,排查受阻,故障解决周期较长;另一方面,很难找到对所有模块及模块间的依赖关系都了解的专业人员进行故障排除。When the version compilation fails, it is often relied on the maintenance personnel to solve the problem one by one to solve the problem of failure to compile. On the one hand, the maintenance personnel will be trapped in the maintenance and fault location of the basic environment for a long time, and compile at the same time. In the case of fault location, the influence of inter-dependency between multiple modules is easily ignored, the troubleshooting is blocked, and the fault resolution period is long. On the other hand, it is difficult to find a professional who understands the dependencies of all modules and modules to perform troubleshooting.
发明内容Summary of the invention
本公开提供了一种软件编译方法及装置,可以以解决人工解决编译问题的实现难度较高,以及编译故障排除时未考虑模块间相互依赖影响的问题。The present disclosure provides a software compiling method and apparatus, which can solve the problem that the manual solving of the compiling problem is difficult, and the problem of inter-module interdependence is not considered when compiling the fault.
本实施例提供的一种版本软件编译方法,所述方法可以包括:根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,其中,所述失败构建信息知识库中保存了之前每次失败构建的项集;根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则;以及将有效强关联的模块绑定一起同时编译或者同时预警。A method for compiling a version software provided by this embodiment, the method may include: determining, according to a pre-established failure information construction knowledge base, a target frequent item set in the knowledge base, wherein the failure construction information knowledge base The item set that was previously failed to be saved is saved; the effective strong association rule is determined according to the dependency relationship between the target frequent item set calculation modules; and the modules of the effective strong association are bound together to compile or simultaneously warn.
可选地,该方法还可以包括:在每次编译失败时,获取失败构建的项集并 添加到所述知识库中。Optionally, the method may further include: acquiring, when each compilation fails, acquiring the item set of the failed build and Add to the knowledge base.
可选地,所述根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,可以包括:根据所述知识库中的项集,依次计算每个阶的频繁项集;计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,得到1阶频繁项集;根据m-1阶频繁项集,采用字典顺序和组合方式,将多个m-1阶频繁相机生成多个m阶项集,分别计算每个m阶项集的支持度,对支持度低于预设m阶项集对应的预设支持度阈值的m阶项集进行剪枝,得到m阶频繁项集,以及当m阶频繁相机的数量为1个时,确定该m阶频繁项集为目标频繁项集,其中,m为正整数,且m大于1。Optionally, determining the target frequent item set in the knowledge base according to the pre-established failure building information knowledge base may include: sequentially calculating a frequent item set of each order according to the item set in the knowledge base Calculating the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold, and obtaining the 1st order frequent item set; according to the m-1 order frequent item set, Using lexicographic order and combination method, multiple m-1 order frequent cameras are generated to generate multiple m-th order items, and the support degree of each m-th order item set is calculated respectively, and the support degree is lower than the preset corresponding to the preset m-th order item set. The m-th order item set with the support threshold is set for pruning, and the m-th order frequent item set is obtained, and when the number of m-th order frequent cameras is one, the m-th order frequent item set is determined as the target frequent item set, wherein m is A positive integer and m is greater than 1.
可选地,采用如下公式分别计算多个m阶频繁项集支持度:Optionally, the following formulas are used to calculate the support of multiple m-th order frequent items:
Support(X)=P(X)/P(I);Support(X)=P(X)/P(I);
Support(X->Y)=P(X∪Y)/P(I);Support(X->Y)=P(X∪Y)/P(I);
其中,I表示所述知识库中总项集,Support(X)表示项集{X}在总项集里出现的概率,Support(X->Y)表示项集{X,Y}在总项集里出现的概率,P表示概率,P(X)/P(I)表示项集(X)在总项集中出现的概率,所述项集的支持度是指该项集在总项集中出现的概率。Where I represents the total item set in the knowledge base, Support(X) represents the probability of the item set {X} appearing in the total item set, and Support(X->Y) indicates that the item set {X, Y} is in the total item. The probability of occurrence in the set, P represents the probability, P(X)/P(I) represents the probability of the item set (X) appearing in the total item set, and the support degree of the item set means that the item set appears in the total item set The probability.
可选地,所述根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则,可以包括:计算所述目标频繁项集中每个非空项集的置信度,将低于预设置信度阈值的置信度对应的非空项集进行剪枝,得到多个目标非空项集;根据多个目标非空项集的置信度,计算多个目标非空项集相互之间的提升度;以及确定提升度大于1的多个目标非空项集之间的规则为有效强关联规则。Optionally, determining the valid strong association rule according to the dependency relationship between the target frequent item set calculation modules may include: calculating a confidence level of each non-empty item set in the target frequent item set, which is lower than The non-empty item set corresponding to the confidence level of the pre-set confidence threshold is pruned to obtain a plurality of target non-empty item sets; and the plurality of target non-empty item sets are calculated according to the confidence of the plurality of target non-empty item sets The degree of lift; and the rule between multiple target non-empty item sets that determine a degree of lift greater than one is a valid strong association rule.
可选地,所述计算所述目标频繁项集中每个非空项集的置信度,采用如下公式:Optionally, the calculating the confidence of each non-empty item set in the target frequent item set adopts the following formula:
Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);
其中,置信度Confidence(X->Y)表示在具有项集X的情况下,由关联规则“X->Y”推出具有项集Y的概率。Among them, the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
可选地,所述根据多个目标非空项集的置信度,计算多个目标非空项集相 互之间的提升度,采用如下公式:Optionally, calculating the plurality of target non-empty items according to the confidence of the plurality of target non-empty item sets For the degree of improvement between each other, the following formula is used:
Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);
其中,提升度Lift(X->Y)表示含有项集X的条件下,同时含有项集Y的概率,与不含项集X的条件下却含项集Y的概率之比;Wherein, the lift Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included;
若Lift(X->Y)>1,则表示规则X->Y是有效的强关联规则;If Lift(X->Y)>1, it means that the rule X->Y is a valid strong association rule;
若Lift(X->Y)<=1,则表示规则X->Y是无效的强关联规则;If Lift(X->Y)<=1, it means that the rule X->Y is an invalid strong association rule;
若Lift(X->Y)=1,则表示项集X与项集Y相互独立。If Lift(X->Y)=1, it means that item set X and item set Y are independent of each other.
本实施例还提供了一种版本软件编译装置,可以包括:目标频繁项集确定单元,设置为根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,其中,所述失败构建信息知识库中保存之前每次失败构建的项集;有效强关联规则分析单元,设置为根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则;以及关联编译构建单元,设置为将有效强关联的模块绑定一起同时编译或者同时预警。The embodiment further provides a version software compiling device, which may include: a target frequent item set determining unit, configured to determine a target frequent item set in the knowledge base according to a pre-established failure building information knowledge base, wherein The failed build information knowledge base stores the item set that is previously failed to be built; the effective strong association rule analysis unit is configured to determine the effective strong association rule according to the dependency relationship between the target frequent item set calculation modules; and the associated compilation The Build Unit is set to bind the modules that are effectively strongly associated together and compile at the same time.
可选地,目标频繁项集确定单元可以包括:第一确定子单元,设置为根据所述知识库的项集,依次计算每个阶的频繁项集;第二确定子单元,设置为计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,得到1阶频繁项集;以及第三确定子单元,设置为根据m-1阶频繁项集,采用字典顺序和组合方式,将多个m-1阶频繁项集生成多个m阶项集,分别计算多个m阶项集的支持度,对支持度低于m阶项集对应的预设支持度阈值的m阶项集进行剪枝,得到m阶频繁项集,当m阶频繁项集的数量为1个时,确定该m阶频繁项集为目标频繁项集,停止计算第m+1阶项集,其中,m为正整数,且m大于1。Optionally, the target frequent item set determining unit may include: a first determining subunit, configured to sequentially calculate a frequent item set of each order according to the item set of the knowledge base; and second determining the subunit, configured as a calculation center Determining the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold, and obtaining the 1st order frequent item set; and the third determining subunit, which is set according to m- The first-order frequent itemsets are lexicographically ordered and combined, and multiple m-1 order frequent itemsets are generated to generate multiple m-th order items, and the support degrees of multiple m-th order items are calculated respectively. The support degree is lower than m order. The m-th order item set of the preset support degree threshold corresponding to the item set is pruned, and the m-th order frequent item set is obtained. When the number of the m-th order frequent item set is one, the m-th order frequent item set is determined as the target frequent item set. Stop calculating the m+1th order item set, where m is a positive integer and m is greater than 1.
可选地,有效强关联规则分析单元可以包括:第一分析子单元,设置为计算所述目标频繁项集中每个非空项集的置信度,将低于预设置信度阈值的非空项集进行剪枝,得到多个目标非空项集;第二分析子单元,设置为根据多个目标非空项集的置信度,计算多个目标非空项集相互之间的提升度;以及第三分析子单元,设置为确定提升度大于1的多个目标非空项集之间的规则为有效强 关联规则。Optionally, the effective strong association rule analysis unit may include: a first analysis subunit, configured to calculate a confidence level of each non-empty item set in the target frequent item set, and a non-empty item lower than a preset reliability threshold The set performs pruning to obtain a plurality of target non-empty item sets; and the second analysis sub-unit is configured to calculate a degree of elevation between the plurality of target non-empty item sets according to the confidence of the plurality of target non-empty item sets; The third analysis subunit is set to determine that the rule between the plurality of target non-empty item sets having a degree of lift greater than 1 is effective Association rules.
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任意一种版本软件编译方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for executing any of the above version software compilation methods.
本实施例还提供一种服务器,该服务器包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述任意一种版本软件编译方法。The embodiment also provides a server including one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory, when executed by one or more processors, Execute any of the above versions of the software compilation method.
本实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种版本软件编译方法。The embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to execute any of the above versions of the software compilation method.
本公开提供的版本软件编译方法和装置,通过根据预先建立的失败构建信息知识库,自动计算模块间的关联度,确定有效强关联规则;根据有效强关联规则将有效强关联的模块绑定一起同时编译或者同时预警。既能最大可能实现编译项目的自我修复,能保证持续集成效果,降低了版本发布风险。又能在编译失败时能节约查错的人力资源。The version software compiling method and apparatus provided by the present disclosure automatically calculates the degree of association between modules according to a pre-established failure to construct an information knowledge base, and determines effective strong association rules; and binds the modules of effective strong association according to the effective strong association rules. Compile at the same time or at the same time. It is the most likely to achieve self-repair of the compiled project, ensuring continuous integration and reducing the risk of release. It can also save the wrong human resources when the compilation fails.
附图说明DRAWINGS
图1为本实施例提供的一种版本软件编译方法的流程图。FIG. 1 is a flowchart of a method for compiling a version software according to an embodiment of the present invention.
图2为本实施例提供的一种目标频繁项集确定方法的流程图。FIG. 2 is a flowchart of a method for determining a target frequent item set according to an embodiment of the present disclosure.
图3为本实施例提供的一种有效强关联规则分析方法的流程图。FIG. 3 is a flowchart of an effective strong association rule analysis method according to an embodiment of the present invention.
图4为本实施例提供的一种版本软件编译装置的结构示意图。FIG. 4 is a schematic structural diagram of a version software compiling apparatus according to an embodiment of the present invention.
图5为本实施例提供的一种目标频繁项集确定单元的结构示意图。FIG. 5 is a schematic structural diagram of a target frequent item set determining unit according to an embodiment of the present disclosure.
图6为本实施例提供的一种有效强关联规则分析单元的结构示意图。FIG. 6 is a schematic structural diagram of an effective strong association rule analysis unit according to an embodiment of the present disclosure.
图7为本实施例提供的一种服务器的通用硬件结构示意图。FIG. 7 is a schematic structural diagram of a general hardware of a server according to an embodiment of the present disclosure.
具体实施方式detailed description
以下结合附图和实施例,对本公开进行说明。应当理解,此处所描述的实 施例仅仅用以解释本公开,并不用于限定本公开。在不冲突的情况下,以下实施例和实施例中的技术特征可以相互组合。The present disclosure will be described below in conjunction with the accompanying drawings and embodiments. It should be understood that the description described here The examples are merely illustrative of the disclosure and are not intended to limit the disclosure. The technical features in the following embodiments and embodiments may be combined with each other without conflict.
下面介绍本实施例中版本软件编译方法的实施例,该版本软件编译方法的执行主体为版本软件编译装置,该软件编译装置可以位于服务器或终端中。The following describes an embodiment of the version software compiling method in this embodiment. The execution body of the version software compiling method is a version software compiling device, and the software compiling device may be located in a server or a terminal.
请参阅图1,本实施例中版本软件编译方法可以包括S10-S30。Referring to FIG. 1, the version software compiling method in this embodiment may include S10-S30.
在S10中,根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集。In S10, a target frequent item set in the knowledge base is determined according to a pre-established failure building information knowledge base.
可选地,失败构建信息知识库中保存之前每次失败构建的项集,每个编译失败的模块对应一个项集。例如,I={i1,i2,…,ij}是j个不同的项目的集合,集合中的一个元素称为一个项目。项目的集合I称为项集,其元素的个数称为项集的长度,长度为k的项集称为k阶项集。例如项集为I={A,B,C,D,E,F},I的长度为6。每次失败构建的任务集是总项集I的一个子集。Optionally, the failed build information knowledge base saves the item set that was previously failed to be built, and each compiled failure module corresponds to one item set. For example, I={i1, i2,..., ij} is a collection of j different items, and one element in the set is called an item. The set I of items is called an item set, the number of elements is called the length of the item set, and the item set of length k is called the k-order item set. For example, the item set is I={A, B, C, D, E, F}, and the length of I is 6. The set of tasks that are failed to build each time is a subset of the total item set I.
可选地,请参阅图2,在S10中,根据预先建立的失败构建信息知识库,确定知识库中的目标频繁项集包括S101-S103。Optionally, referring to FIG. 2, in S10, determining a target frequent item set in the knowledge base includes S101-S103 according to the pre-established failure building information knowledge base.
在S101中,根据所述知识库的项集,依次计算每个阶的频繁项集。In S101, a frequent item set of each order is sequentially calculated according to the item set of the knowledge base.
可选地,为每阶项集预先设定一个预设支持度阈值,该预设支持度阈值可以代表关联规则的最低重要性。频繁项集可以指支持度不小于该阶项集对应的预设支持度阈值的项集。长度为k的频繁项集可以称为k阶频繁项集。Optionally, a preset support degree threshold is preset for each order item, and the preset support degree threshold may represent a minimum importance of the association rule. A frequent item set may refer to a set of items whose support degree is not less than a preset support degree threshold corresponding to the order item set. A frequent item set of length k can be referred to as a k-th order frequent item set.
可选地,每个阶的项集对应一个该阶的预设支持度阈值,将支持度低于该阶的预设支持阈值的项集剪枝,支持度大于或等于该阶的预设支持度阈值的项集组成该阶的频繁项集。Optionally, the item set of each order corresponds to a preset support degree threshold of the order, and the item set pruning whose support degree is lower than the preset support threshold of the order is supported, and the support degree is greater than or equal to the preset support of the order. The set of items of the degree threshold constitutes a frequent item set of the order.
可选地,对1阶频繁项集的计算包括:计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,将支持度大于或等于该1阶项集的预设支持度阈值的1阶项集组成1阶频繁项集。Optionally, calculating the first-order frequent item set includes: calculating a support degree of each first-order item set in the knowledge base, and performing pruning on the first-order item set whose support degree is lower than the first threshold, and supporting the degree A set of 1st order items greater than or equal to a preset support degree threshold of the 1st order item set constitutes a 1st order frequent item set.
可选地,将小于该1阶项集的预设支持度阈值的项集忽略。剪枝即表示将小于该1阶项集的预设支持度阈值的项集忽略不管。Optionally, a set of items that are less than a preset support threshold of the set of 1st order items are ignored. Pruning means that the set of items that are less than the preset support threshold of the first-order item set is ignored.
可选地,在本实施例中,可以采用如下公式计算n阶频繁项集的支持度: Optionally, in this embodiment, the following formula may be used to calculate the support degree of the n-th order frequent itemsets:
Support(X)=P(X)/P(I);Support(X)=P(X)/P(I);
Support(X->Y)=P(X∪Y)/P(I);Support(X->Y)=P(X∪Y)/P(I);
其中,I表示所述知识库中总项集,Support(X)表示项集{X}在总项集里出现的概率,Support(X->Y)表示项集{X,Y}在总项集里出现的概率。Where I represents the total item set in the knowledge base, Support(X) represents the probability of the item set {X} appearing in the total item set, and Support(X->Y) indicates that the item set {X, Y} is in the total item. The probability of occurrence in the set.
例如,四次构建的编译任务中有如下表1模块项集(简称项集)失败。For example, in the compilation task of four builds, the following table 1 module item set (referred to as item set) fails.
表1Table 1
构建次数Number of builds 构建失败的模块项集Build a failed module item set
11 A,C,DA, C, D
22 B,C,EB, C, E
33 A,B,C,EA, B, C, E
44 B,EB, E
在S102中,计算单个模块项集,即1阶项集,在总项集中的支持度,对低于1阶项集对应的预设支持度阈值的1阶项集进行剪枝。In S102, a single module item set, that is, a 1st order item set is calculated, and the first degree item set lower than the preset support degree threshold corresponding to the 1st order item set is pruned in the total item set support degree.
可选地,假定1阶项集对应的预设支持度阈值(可称为第一阈值)为50%,如下表2,知识库项集中包括4个1阶项集,计算每个1阶项集对应的支持度,对支持度低于该预设支持度阈值的1阶项集进行剪枝(如图2所示,将1阶项集{D}进行剪枝),得到支持度大于或等于该1阶项集对应的预设支持度阈值的1阶项集组成1阶频繁项集{A},{B},{C}和{E}。Optionally, it is assumed that the preset support degree threshold (which may be referred to as a first threshold) corresponding to the first-order item set is 50%. As shown in Table 2 below, the knowledge base item set includes four first-order item sets, and each first-order item is calculated. The corresponding support degree is set, and the first-order item set whose support degree is lower than the preset support degree threshold is pruned (as shown in FIG. 2, the first-order item set {D} is pruned), and the support degree is greater than or A first-order item set equal to a preset support degree threshold corresponding to the first-order item set constitutes a first-order frequent item set {A}, {B}, {C}, and {E}.
表2Table 2
Figure PCTCN2017084942-appb-000001
Figure PCTCN2017084942-appb-000001
在S103中,根据m-1阶频繁项集,采用字典顺序和组合方式生成m阶项集,分别计算每个m阶项集的支持度,对支持度低于m阶项集对应的预设支持度阈值的m阶项集进行剪枝,得到m阶频繁项集,直到最后剩下的一个高阶频繁项集为止。In S103, according to the m-1 order frequent item set, the m-th order item set is generated by using the dictionary order and the combination manner, and the support degree of each m-th order item set is calculated respectively, and the preset with the support degree lower than the m-th order item set is preset. The m-th order item set of the support threshold is pruned to obtain an m-th order frequent item set until the last remaining high-order frequent item set.
其中,m为正整数,且m大于1。Where m is a positive integer and m is greater than 1.
所谓字典顺序,又可称为字典排序(Lexicographical Order),是一种对随机变量形成序列的排序方法。将多个随机变量从左到右逐个两两比较,并按照从小到大的顺序依次排列,从而形成一个有序的队列。The so-called dictionary order, also known as Lexicographical Order, is a sorting method for forming sequences of random variables. Multiple random variables are compared one by one from left to right, and are arranged in order from small to large to form an ordered queue.
例如,将1阶频繁项集{A},{B},{C}和{E}按照字典顺序,生成2阶项集的过程可以为:将四个1阶频繁项集两两组合形成2阶项集为{A,B},{B,C},{C,E},{A,C},{B,E}和{A,E}。此时的多个2阶项集是随机排列的,按照字典顺序的方式对该多个2阶项集进行排序,首先将多个2阶项集中第一个项集分别两两进行比较,并按照从小到大的顺序将该多个2阶项集进行重新排序,在将重新排序后的多个2阶项集中的第二个项集分别两两进行比较,再次按照从小到大的顺序将多个2阶项集进行排序。从而得到按字典顺序排序的2阶项集为:{A,B},{A,C},{A,E},{B,C},{B,E},{C,E}。For example, the first-order frequent itemsets {A}, {B}, {C}, and {E} are lexicographically ordered, and the process of generating a second-order item set may be: combining four first-order frequent itemsets into two. The set of order terms is {A, B}, {B, C}, {C, E}, {A, C}, {B, E} and {A, E}. At this time, a plurality of second-order item sets are randomly arranged, and the plurality of second-order item sets are sorted in a lexicographic order, and first, the first item sets in the plurality of second-order item sets are respectively compared by two, and The plurality of second-order item sets are reordered in order from small to large, and the second item set in the plurality of second-order item sets after reordering is compared two by two, and again in order from small to large Multiple 2nd order items are sorted. Thus, the lexicographically ordered 2nd order item set is: {A, B}, {A, C}, {A, E}, {B, C}, {B, E}, {C, E}.
在上述示例的基础上,得到的1阶频繁项集为{A},{B},{C}和{E}。将该1阶频繁项集按照字典顺序和两两组合的方式,生成2阶项集{A,B},{A,C},{A,E},{B,C},{B,E},{C,E}。将支持度低于2阶项集对应的预设支持度阈值(预设阈值,例如为25%)的2阶项集进行剪枝,将支持度大于或等于做小支持度阈值的2阶项集组成2阶频繁项集{A,C}{B,C},{B,E}{C,E},如下表3所示。Based on the above examples, the obtained first-order frequent itemsets are {A}, {B}, {C}, and {E}. The first-order frequent itemsets are generated in a lexicographic order and a combination of two and two to generate a second-order item set {A, B}, {A, C}, {A, E}, {B, C}, {B, E }, {C, E}. The second-order item set whose support degree is lower than the preset support degree threshold (preset threshold value, for example, 25%) corresponding to the second-order item set is pruned, and the support degree is greater than or equal to the second-order item of the small support degree threshold. The set constitutes a second-order frequent item set {A, C}{B, C}, {B, E}{C, E}, as shown in Table 3 below.
表3table 3
Figure PCTCN2017084942-appb-000002
Figure PCTCN2017084942-appb-000002
Figure PCTCN2017084942-appb-000003
Figure PCTCN2017084942-appb-000003
将上述得到的2阶频繁项集{A,C},{B,C},{B,E}和{C,E},按照组合的方式以及字典顺序方式,生成3阶项集为{A,B,C},{A,C,E},{A,B,E}和{B,C,E}。将支持度低于3阶项集对应的预设支持度阈值的3阶项集(例如为25%)进行剪枝,将支持度大于或等于3阶项集对应的预设支持度阈值的3阶项集组成3阶频繁项集{B,C,E},如下表4所示。The second-order frequent itemsets {A, C}, {B, C}, {B, E} and {C, E} obtained above are generated in a combined manner and in a lexicographic order to generate a third-order item set {A , B, C}, {A, C, E}, {A, B, E} and {B, C, E}. The third-order item set (for example, 25%) whose support degree is lower than the preset support degree threshold corresponding to the third-order item set is pruned, and the support degree is greater than or equal to the preset support degree threshold corresponding to the third-order item set. The set of order items constitutes the 3rd order frequent itemsets {B, C, E}, as shown in Table 4 below.
表4Table 4
Figure PCTCN2017084942-appb-000004
Figure PCTCN2017084942-appb-000004
由于只剩下一个3阶频繁项集{B,C,E},至此得到的该3阶频繁项集即为目标频繁项集。Since there is only one third-order frequent item set {B, C, E}, the third-order frequent item set obtained so far is the target frequent item set.
在本实施例中,若所述1阶频繁项集只有一个,则所述1阶频繁项集为所述目标频繁项集,若1阶频繁项集不止一个,则根据所述得到的1阶频繁项集,采用字典顺序方式以及两两组合方式,生成2阶项集,分别计算每个2阶项集的支持度,对支持度低于第二阈值的2阶项集进行剪枝,将支持度大于或等于第二阈值的2阶项集组成2阶频繁项集。In this embodiment, if there is only one first-order frequent item set, the first-order frequent item set is the target frequent item set, and if the first-order frequent item set is more than one, according to the obtained first order Frequent itemsets, using a lexicographical order and a two-two combination method, generating a 2nd-order item set, respectively calculating the support degree of each 2nd-order item set, and pruning the 2nd-order item set whose support degree is lower than the second threshold, A 2nd order item set whose support degree is greater than or equal to the second threshold value constitutes a 2nd order frequent item set.
若所述2阶频繁项集不止一个,则依次继续计算3阶项集,并计算得到3阶频繁项集,直到最后剩下的一个高阶频繁项集为止。If there is more than one second-order frequent item set, the third-order item set is continuously calculated, and the third-order frequent item set is calculated until the last remaining high-order frequent item set.
如果所述2阶频繁项集不止一个,继续计算3阶项集,将计算得到的多个3 阶项集的支持度与3阶项集对应的预设支持度阈值进行比较,如果所有的3阶项集的支持度均小于3阶项集对应的预设支持度阈值,则确定没有满足要求的频繁项集,本实施例中的版本软件编译进程结束。If the second-order frequent item set is more than one, continue to calculate the third-order item set, and the calculated multiple 3 The support degree of the order item set is compared with the preset support degree threshold corresponding to the 3rd order item set. If the support degree of all the 3rd order item sets is less than the preset support degree threshold corresponding to the 3rd order item set, it is determined that the requirement is not met. The frequent item set, the version software compilation process in this embodiment ends.
在S20中,根据目标频繁项集计算模块之间的依赖关系,确定有效强关联规则。In S20, the effective strong association rule is determined according to the dependency relationship between the target frequent item set calculation modules.
请参阅图3,在S20中,根据目标频繁项集计算模块之间的依赖关系,确定有效强关联规则可包括S201-S203。Referring to FIG. 3, in S20, determining a valid strong association rule may include S201-S203 according to a dependency relationship between the target frequent item set calculation modules.
在S201中,计算所述目标频繁项集中每个非空项集的置信度,对不满足预设置信度阈值的非空项集进行剪枝。In S201, a confidence level of each non-empty item set in the target frequent item set is calculated, and a non-empty item set that does not satisfy the pre-set reliability threshold is pruned.
可选地,当非空项集的置信度低于预设置信度阈值时,则确定该非空项集的置信度不满足预设置信度阈值;当非空项集的置信度大于或等于预设置信度阈值时,则确定该非空项集的执行度满足预设置信度阈值。Optionally, when the confidence level of the non-empty item set is lower than the preset reliability threshold, determining that the confidence of the non-empty item set does not satisfy the pre-set confidence threshold; when the confidence of the non-empty item set is greater than or equal to When the reliability threshold is preset, it is determined that the execution degree of the non-empty item set satisfies the preset reliability threshold.
在S202中,根据剪枝后留下的非空项集的置信度,计算非空项集相互之间的提升度。In S202, the degree of lifting between the non-empty item sets is calculated according to the confidence of the non-empty item set left after the pruning.
在S203中,确定提升度大于1的非空项集之间的规则为有效强关联规则。In S203, it is determined that the rule between the non-empty item sets whose degree of lift is greater than 1 is a valid strong association rule.
可选地,所述计算所述目标频繁项集中每个非空项集的置信度,可以采用如下公式:Optionally, the calculating the confidence of each non-empty item set in the target frequent item set may adopt the following formula:
Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);
其中,置信度Confidence(X->Y)表示在具有项集X的情况下,由关联规则“X->Y”推出具有项集Y的概率。Among them, the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
可选地,所述根据剪枝后留下的非空项集的置信度,计算非空项集相互之间的提升度,可以采用如下公式:Optionally, the calculating the degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning may be performed by using the following formula:
Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);
其中,提升度Lift(X->Y)表示含有项集X的条件下,同时含有项集Y的概率,与不含项集X的条件下却含项集Y的概率之比。Among them, the lift degree Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included.
满足预设支持度阈值和预设置信度阈值的规则,叫做强关联规则。强关联规则中,可以分有效的强关联规则和无效的强关联规则。 A rule that satisfies a preset support threshold and a preset reliability threshold is called a strong association rule. In a strong association rule, a valid strong association rule and an invalid strong association rule can be divided.
当Lift(X->Y)>1时,则表示规则X->Y是有效的强关联规则;当Lift(X->Y)<=1时,则表示规则X->Y是无效的强关联规则;当Lift(X->Y)=1时,则表示项集X与项集Y相互独立。When Lift(X->Y)>1, it means that the rule X->Y is a valid strong association rule; when Lift(X->Y)<=1, it means that the rule X->Y is invalid. Association rule; when Lift(X->Y)=1, it means that item set X and item set Y are independent of each other.
以上述例子继续说明,目标频繁项集为{B,C,E},分别计算目标频繁项集中单个非空项集间的置信度,假设预设置信度阈值为75%,当单个非空项集间的置信度低于该预设置信度阈值的规则将被剪枝,如下表5所示:Continuing with the above example, the target frequent item set is {B, C, E}, and the confidence between the individual non-empty item sets in the target frequent item set is calculated respectively, assuming that the pre-set confidence threshold is 75%, when a single non-empty item Rules with confidence that the set is less than the pre-set confidence threshold will be pruned, as shown in Table 5 below:
表5table 5
Figure PCTCN2017084942-appb-000005
Figure PCTCN2017084942-appb-000005
此时,留下非空项集B、E。At this point, leave the non-empty item set B, E.
继续根据剪枝后留下的非空项集的置信度,计算非空项集相互之间的提升度,计算方式如下所示。Continue to calculate the degree of lifting between non-empty item sets based on the confidence of the non-empty item set left after pruning, as calculated below.
Lift(B->E)=100%/75%=1.33;Lift(B->E)=100%/75%=1.33;
Lift(E->B)=100%/75%=1.33;Lift(E->B)=100%/75%=1.33;
此时,得到有效强关联规则B->E和E->B。At this point, valid strong association rules B->E and E->B are obtained.
在S30中,将有效强关联的模块绑定一起同时编译或者同时预警。In S30, the modules that are effectively strongly associated are bound together to compile or simultaneously warn.
可选地,将有效强关联的模块绑定一起同时编译能最大程度的自我修复,将有效强关联的模块绑定一起同时预警能减少人工排查错误的人力资源,提高效率。Optionally, the modules that are effectively strongly associated are combined and compiled at the same time to maximize self-healing, and the modules with effective and strong associations are combined and early warning can reduce the human resources of manual troubleshooting and improve efficiency.
在步骤S20中,得到有效强关联规则B->E和E->B,当E构建失败时,可以同时将B联动构建,也可以同时通知到模块B;当E构建失败时,可以同时将B联动构建,也可以同时通知模块E,这样将B和E关联起来了,考虑了不同模块之间的关联关系,根据该有效强关联规则进行版本编译,可以最大程度的自我修复,保证持续集成效果,降低版本发布风险。当无法自我修复时,可以预警 提高人工排查错误的效率。In step S20, valid strong association rules B->E and E->B are obtained. When the E construction fails, B can be constructed at the same time, or module B can be notified at the same time; when the E construction fails, it can be simultaneously B linkage construction, can also notify module E at the same time, so that B and E are associated, considering the relationship between different modules, version compilation according to the effective strong association rules, can be the most self-healing, to ensure continuous integration The effect is to reduce the risk of version release. Can warn when it is not self-healing Improve the efficiency of manual troubleshooting.
需要说明的是,在本实施例中,在每次编译失败时,获取失败构建的项集并添加到所述知识库中。因此,知识库可以不断更新,更新后的知识库可以重新修正有效强关联规则。It should be noted that, in this embodiment, each time the compilation fails, the item set of the failed build is acquired and added to the knowledge base. Therefore, the knowledge base can be continuously updated, and the updated knowledge base can re-correct the effective strong association rules.
本实施例提供的版本软件编译方法,通过根据预先建立的失败构建信息知识库,自动计算模块间的关联度,确定有效强关联规则;根据有效强关联规则将有效强关联的模块绑定一起同时编译或者同时预警。既能实现编译项目的自我修复,能保证持续集成效果,降低了版本发布风险。又能在编译失败时能节约查错的人力资源。The version software compiling method provided in this embodiment automatically calculates the association degree between the modules by constructing the information knowledge base according to the pre-established failure, and determines the effective strong association rule; and binds the effective strong association modules together according to the effective strong association rule. Compile or alert at the same time. It can not only self-repair the compiled project, but also ensure continuous integration and reduce the risk of version release. It can also save the wrong human resources when the compilation fails.
下面介绍本发明实施例中版本软件编译装置的实施例。The following describes an embodiment of the version software compiling apparatus in the embodiment of the present invention.
请参阅图5,为本实施例中版本软件编译装置的一个实施例示意图,该版本装置可以包括目标频繁项集确定单元10、有效强关联规则分析单元20和关联编译构建单元30。Referring to FIG. 5, it is a schematic diagram of an embodiment of a version software compiling apparatus in this embodiment. The version apparatus may include a target frequent item set determining unit 10, an effective strong association rule analyzing unit 20, and an associated compiling building unit 30.
目标频繁项集确定单元10设置为根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,其中,所述失败构建信息知识库中保存之前每次失败构建的项集。The target frequent item set determining unit 10 is configured to determine a target frequent item set in the knowledge base according to the pre-established failure building information knowledge base, wherein the failed build information knowledge base stores the item set that was previously failed to be built. .
可选地,目标频繁项集确定单元10可以包括:第一确定子单元101,设置为根据所述知识库的项集,依次计算每个阶的频繁项集;第二确定子单元102,设置为计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,得到1阶频繁项集;以及第三确定子单元103,设置为根据m-1阶频繁项集,采用字典顺序生成m阶项集,分别计算每个m阶项集的支持度,对支持度低于预设阈值的m阶项集进行剪枝,得到m阶频繁项集,直到最后剩下的一个高阶频繁项集为止,其中,m为正整数,且m大于1。Optionally, the target frequent item set determining unit 10 may include: a first determining subunit 101, configured to sequentially calculate a frequent item set of each order according to the item set of the knowledge base; and second determining the subunit 102, setting To calculate the support degree of each 1st order item set in the knowledge base, pruning the 1st order item set whose support degree is lower than the first threshold to obtain a 1st order frequent item set; and the third determining subunit 103, setting According to the m-1 order frequent itemsets, the m-order itemsets are generated in lexicographic order, and the support degree of each m-th order item set is calculated separately, and the m-th order item set whose support degree is lower than the preset threshold is pruned to obtain m. The order frequent itemsets until the last remaining high-order frequent itemsets, where m is a positive integer and m is greater than 1.
可选的,所述第三确定子单元103可设置为采用如下公式计算n阶频繁项集支持度:Optionally, the third determining subunit 103 may be configured to calculate an nth order frequent item set support degree by using the following formula:
Support(X)=P(X)/P(I); Support(X)=P(X)/P(I);
Support(X->Y)=P(X∪Y)/P(I);Support(X->Y)=P(X∪Y)/P(I);
其中,I表示所述知识库中总项集,Support(X)表示项集{X}在总项集里出现的概率,Support(X->Y)表示项集{X,Y}在总项集里出现的概率。Where I represents the total item set in the knowledge base, Support(X) represents the probability of the item set {X} appearing in the total item set, and Support(X->Y) indicates that the item set {X, Y} is in the total item. The probability of occurrence in the set.
有效强关联规则分析单元20设置为根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则。The effective strong association rule analysis unit 20 is configured to determine a valid strong association rule according to the dependency relationship between the target frequent item set calculation modules.
可选地,有效强关联规则分析单元20可以包括:第一分析子单元201,设置为计算所述目标频繁项集中每个非空项集的置信度,对不满足预设置信度阈值的非空项集进行剪枝;第二分析子单元202,设置为根据剪枝后留下的非空项集的置信度,计算非空项集相互之间的提升度;第三分析子单元203,设置为确定满足提升度大于1的非空项集之间的规则为有效强关联规则。Optionally, the effective strong association rule analysis unit 20 may include: a first analysis subunit 201 configured to calculate a confidence level of each non-empty item set in the target frequent item set, and a non-pre-set confidence threshold The empty item set is pruned; the second analysis sub-unit 202 is configured to calculate a degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning; the third analysis sub-unit 203, The rule set to determine that a non-empty item set that satisfies a degree of lift greater than 1 is a valid strong association rule.
可选的,第一分析子单元201还可以设置为在计算所述目标频繁项集中每个非空项集的置信度时,采用如下公式:Optionally, the first analysis sub-unit 201 may be further configured to: when calculating the confidence of each non-empty item set in the target frequent item set, adopt the following formula:
Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);
其中,置信度Confidence(X->Y)表示在具有项集X的情况下,由关联规则“X->Y”推出具有项集Y的概率。Among them, the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
可选的,第二分析子单元202还可以设置为根据剪枝后留下的非空项集的置信度,计算非空项集相互之间的提升度,采用如下公式:Optionally, the second analysis sub-unit 202 may be further configured to calculate a degree of lifting between the non-empty item sets according to the confidence of the non-empty item set left after the pruning, using the following formula:
Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);
其中,提升度Lift(X->Y)表示含有项集X的条件下,同时含有项集Y的概率,与不含项集X的条件下却含项集Y的概率之比。Among them, the lift degree Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included.
若Lift(X->Y)>1,则表示规则X->Y是有效的强关联规则;若Lift(X->Y)<=1,则表示规则X->Y是无效的强关联规则;若Lift(X->Y)=1,则表示项集X与项集Y相互独立。If Lift(X->Y)>1, it means that rule X->Y is a valid strong association rule; if Lift(X->Y)<=1, it means that rule X->Y is invalid strong association rule. If Lift(X->Y)=1, it means that item set X and item set Y are independent of each other.
关联编译构建单元30设置为将有效强关联的模块绑定一起同时编译或者同时预警。The association compilation building unit 30 is arranged to bind the modules that are effectively strongly associated together to compile or simultaneously warn.
可选地,将有效强关联的模块绑定一起同时编译能最大程度的自我修复,将有效强关联的模块绑定一起同时预警能减少人工排查错误的人力资源,提高 效率。Optionally, the modules with effective strong associations are combined and compiled at the same time to maximize self-healing, and the modules with effective strong associations are combined and early warning can reduce the human resources of manual troubleshooting errors and improve effectiveness.
可选地,上述装置还可以包括修正单元,设置为在每次编译失败时,获取失败构建的项集并添加到所述知识库中。Optionally, the apparatus may further include a correction unit configured to acquire the item set of the failed build and add to the knowledge base each time the compilation fails.
需要说明的是,上述装置实施例与方法实施例属于同一构思,实现过程可参见方法实施例,且方法实施例中的技术特征在装置实施例中均对应适用。It should be noted that the foregoing device embodiments are the same as the method embodiments, and the implementation process may refer to the method embodiments, and the technical features in the method embodiments are applicable in the device embodiments.
本实施例提供的版本软件编译装置,通过根据预先建立的失败构建信息知识库,自动计算模块间的关联度,确定有效强关联规则;根据有效强关联规则将有效强关联的模块绑定一起同时编译或者同时预警。既能实现编译项目的自我修复,能保证持续集成效果,降低了版本发布风险。又能在编译失败时能节约查错的人力资源。The version software compiling apparatus provided in this embodiment automatically calculates the association degree between the modules by constructing the information knowledge base according to the pre-established failure, and determines the effective strong association rule; and binds the effective strong association modules together according to the effective strong association rule. Compile or alert at the same time. It can not only self-repair the compiled project, but also ensure continuous integration and reduce the risk of version release. It can also save the wrong human resources when the compilation fails.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现。,该软件可以存储在一个存储介质中,该存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质,也可以是暂态存储介质。该软件可以包括多条指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行上述实施例所述的任意一种方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. The software may be stored in a storage medium, which may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (Random Access Memory, A medium that can store program codes, such as a RAM, a disk, or an optical disk, or a transitory storage medium. The software may include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform any of the methods described in the above embodiments.
如图7所示,本实施例提供的一种服务器的通用硬件结构示意图,如图7所示,该服务器包括:处理器(processor)310和存储器(memory)320;还可以包括通信接口(Communications Interface)330和总线340。As shown in FIG. 7, a general hardware structure diagram of a server provided in this embodiment is shown in FIG. 7. The server includes: a processor 310 and a memory 320; and may also include a communication interface (Communications). Interface) 330 and bus 340.
其中,处理器310、存储器320和通信接口330可以通过总线340完成相互间的通信。通信接口330可以用于信息传输。处理器310可以调用存储器320中的逻辑指令,以执行上述实施例的版本软件编译方法。The processor 310, the memory 320, and the communication interface 330 can complete communication with each other through the bus 340. Communication interface 330 can be used for information transmission. The processor 310 can call the logic instructions in the memory 320 to perform the version software compilation method of the above embodiment.
此外,上述的存储器320中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。 In addition, the logic instructions in the memory 320 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
最后需要说明的是,本领域普通技术人员可理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来执行相关的硬件来完成的,该程序可存储于一个非暂态计算机可读存储介质中,该程序在执行时,可包括如上述方法的实施例的流程,其中,该计算机可读存储介质可以为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。Finally, it should be understood that those skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by executing related hardware by a computer program, and the program can be stored in a non-transitory computer. In reading a storage medium, the program, when executed, may include a flow of an embodiment of the method described above, wherein the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
工业实用性Industrial applicability
本公开提供了一种版本软件编译方法及装置,可以实现编译项目的自我修复,保证持续集成效果,降低版本发布风险。还可以在编译失败时节约查错的人力资源。 The present disclosure provides a version software compiling method and device, which can implement self-repair of a compiled project, ensure continuous integration effect, and reduce the risk of version release. It is also possible to save the wrong human resources when the compilation fails.

Claims (11)

  1. 一种版本软件编译方法,包括:A version software compilation method, including:
    根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,其中,所述失败构建信息知识库中保存了之前每次失败构建的项集;Determining a target frequent item set in the knowledge base according to the pre-established failure building information knowledge base, wherein the failed build information knowledge base stores the item set that was previously failed to be built;
    根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则;以及Determining a valid strong association rule according to the dependency relationship between the target frequent item set calculation modules;
    将有效强关联的模块绑定一起同时编译或者同时预警。Modules that are effectively strongly associated are bound together for simultaneous compilation or simultaneous warning.
  2. 根据权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    在每次编译失败时,获取失败构建的项集并添加到所述知识库中。When each compilation fails, the set of items that failed to build is acquired and added to the knowledge base.
  3. 根据权利要求1所述的方法,其中,所述根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,包括:The method according to claim 1, wherein the determining the target frequent item set in the knowledge base according to the pre-established failure building information knowledge base comprises:
    根据所述知识库的项集,依次计算每个阶的频繁项集;Calculating a frequent item set of each order according to the item set of the knowledge base;
    计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,得到1阶频繁项集;Calculating the support degree of each first-order item set in the knowledge base, and pruning the first-order item set whose support degree is lower than the first threshold, to obtain a first-order frequent item set;
    根据m-1阶频繁项集,采用字典顺序和组合的方式,将多个m-1阶频繁项集生成多个m阶项集,分别计算多个m阶项集的支持度,对支持度低于预设的第m阶项集对应的预设支持度阈值的m阶项集进行剪枝,得到m阶频繁项集;以及According to the m-1 order frequent itemsets, multiple m-th order frequent itemsets are generated into multiple m-th order itemsets by lexicographic order and combination, and the support degrees of multiple m-th order itemsets are calculated respectively. The m-th order item set lower than the preset support degree threshold corresponding to the preset mth-th order item set is pruned to obtain an m-th order frequent item set;
    当m阶频繁项集的数量为1个时,确定该m阶频繁项集为目标频繁项集,停止计算第m+1阶项集;其中,m为正整数,且m大于1。When the number of m-th order frequent itemsets is one, it is determined that the m-th order frequent itemsets are target frequent itemsets, and the m+1th order item set is stopped; wherein m is a positive integer and m is greater than 1.
  4. 根据权利要求3所述的方法,其中,分别计算多个m阶项集的支持度,包括:The method of claim 3, wherein calculating the support of the plurality of m-th order items, respectively, comprises:
    采用如下公式分别计算多个m阶项集支持度:Calculate the support of multiple m-th order items by using the following formula:
    Support(X)=P(X)/P(I);Support(X)=P(X)/P(I);
    Support(X->Y)=P(X∪Y)/P(I);Support(X->Y)=P(X∪Y)/P(I);
    其中,I表示所述知识库中总项集,Support(X)表示项集{X}在总项集里出现的概率,Support(X->Y)表示项集{X,Y}在总项集里出现的概率,P表示概率, P(X)/P(I)表示项集(X)在总项集中出现的概率,所述项集的支持度是指该项集在总项集中出现的概率。Where I represents the total item set in the knowledge base, Support(X) represents the probability of the item set {X} appearing in the total item set, and Support(X->Y) indicates that the item set {X, Y} is in the total item. The probability of occurrence in the set, P represents the probability, P(X)/P(I) represents the probability that the item set (X) appears in the total item set, and the support degree of the item set refers to the probability that the item set appears in the total item set.
  5. 根据权利要求1至4中任一所述的方法,其中,所述根据所述目标频繁项集计算模块之间的依赖关系,确定有效强关联规则,包括:The method according to any one of claims 1 to 4, wherein the determining the effective strong association rule according to the dependency relationship between the target frequent item set calculation modules comprises:
    计算所述目标频繁项集中每个非空项集的置信度,将低于预设置信度阈值的置信度对应的非空项集进行剪枝,得到多个目标非空项集;Calculating a confidence level of each non-empty item set in the target frequent item set, and pruning the non-empty item set corresponding to the confidence level of the preset reliability threshold to obtain a plurality of target non-empty item sets;
    根据多个目标非空项集的置信度,计算多个目标非空项集相互之间的提升度;以及Calculating the degree of elevation of each of the plurality of target non-empty item sets according to the confidence of the plurality of target non-empty item sets;
    确定提升度大于1的多个目标非空项集之间的规则为有效强关联规则。The rule between determining multiple target non-empty item sets with a degree of lift greater than 1 is a valid strong association rule.
  6. 根据权利要求5所述的方法,其中,所述计算所述目标频繁项集中每个非空项集的置信度,采用如下公式:The method according to claim 5, wherein said calculating a confidence level of each non-empty item set in said target frequent item set uses the following formula:
    Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);Confidence(X->Y)=P(Y|X)=P(X∪Y)/P(X);
    其中,置信度Confidence(X->Y)表示在具有项集X的情况下,由关联规则“X->Y”推出具有项集Y的概率。Among them, the confidence Confidence (X->Y) indicates that in the case of having the item set X, the probability of having the item set Y is derived by the association rule "X->Y".
  7. 根据权利要求6所述的方法,其中,所述根据多个目标非空项集的置信度,计算多个目标非空项集相互之间的提升度,采用如下公式:The method according to claim 6, wherein said calculating a degree of lifting between the plurality of target non-empty item sets according to the confidence of the plurality of target non-empty item sets, using the following formula:
    Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);Lift(X->Y)=P(Y|X)/P(Y)=P(X∪Y)/P(Y);
    其中,提升度Lift(X->Y)表示含有项集X的条件下,同时含有项集Y的概率,与不含项集X的条件下却含项集Y的概率之比;Wherein, the lift Lift(X->Y) represents the ratio of the probability of containing the item set Y under the condition that the item set X is included, and the probability of containing the item set Y under the condition that the item set X is not included;
    若Lift(X->Y)>1,则表示规则X->Y是有效的强关联规则;If Lift(X->Y)>1, it means that the rule X->Y is a valid strong association rule;
    若Lift(X->Y)<=1,则表示规则X->Y是无效的强关联规则;If Lift(X->Y)<=1, it means that the rule X->Y is an invalid strong association rule;
    若Lift(X->Y)=1,则表示项集X与项集Y相互独立。If Lift(X->Y)=1, it means that item set X and item set Y are independent of each other.
  8. 一种版本软件编译装置,包括:A version software compiling device comprising:
    目标频繁项集确定单元,设置为根据预先建立的失败构建信息知识库,确定所述知识库中的目标频繁项集,其中,所述失败构建信息知识库中保存之前每次失败构建的项集;a target frequent item set determining unit, configured to determine a target frequent item set in the knowledge base according to a pre-established failure building information knowledge base, wherein the failed build information knowledge base stores an item set that is previously failed to be built ;
    有效强关联规则分析单元,设置为根据所述目标频繁项集计算模块之间的 依赖关系,确定有效强关联规则;以及An effective strong association rule analysis unit, configured to calculate between the modules according to the target frequent item set Dependencies to determine effective strong association rules;
    关联编译构建单元,设置为将有效强关联的模块绑定一起同时编译或者同时预警。Associate the compilation building unit, set to bind the modules with valid strong associations together and compile at the same time.
  9. 根据权利要求8所述的装置,其中,所述目标频繁项集确定单元包括:The apparatus of claim 8, wherein the target frequent item set determining unit comprises:
    第一确定子单元,设置为根据所述知识库的项集,依次计算每个阶的频繁项集;a first determining subunit, configured to sequentially calculate a frequent item set of each order according to the item set of the knowledge base;
    第二确定子单元,设置为计算所述知识库中每个1阶项集的支持度,对支持度低于第一阈值的1阶项集进行剪枝,得到1阶频繁项集;以及a second determining subunit, configured to calculate a support degree of each 1st order item set in the knowledge base, and perform pruning on a 1st order item set whose support degree is lower than the first threshold to obtain a 1st order frequent item set;
    第三确定子单元,设置为根据m-1阶频繁项集,采用字典顺序和组合方式,将多个m-1阶频繁项集生成多个m阶项集,分别计算多个m阶项集的支持度,对支持度低于m阶项集对应的预设支持度阈值的m阶项集进行剪枝,得到m阶频繁项集,当m阶频繁项集的数量为1个时,确定该m阶频繁项集为目标频繁项集,停止计算第m+1阶项集,其中,m为正整数,且m大于1。The third determining subunit is configured to generate a plurality of m-th order item sets of the plurality of m-1 order frequent itemsets according to the m-1 order frequent item set, using a dictionary order and a combination manner, and respectively calculate a plurality of m-th order item sets The degree of support is prune to the m-th order item set whose support degree is lower than the preset support degree threshold corresponding to the m-th order item set, and the m-th order frequent item set is obtained. When the number of m-th order frequent itemsets is one, it is determined. The m-th order frequent item set is a target frequent item set, and the calculation of the m+1th order item set is stopped, where m is a positive integer and m is greater than 1.
  10. 根据权利要求8或9所述的装置,其中,所述有效强关联规则分析单元包括:The apparatus according to claim 8 or 9, wherein the effective strong association rule analysis unit comprises:
    第一分析子单元,设置为计算所述目标频繁项集中每个非空项集的置信度,对低于预设置信度阈值的非空项集进行剪枝,得到多个目标非空项集;a first analysis subunit, configured to calculate a confidence level of each non-empty item set in the target frequent item set, and pruning a non-empty item set lower than a preset reliability threshold to obtain a plurality of target non-empty item sets ;
    第二分析子单元,设置为根据多个目标非空项集的置信度,计算多个目标非空项集相互之间的提升度;以及a second analysis subunit, configured to calculate a degree of elevation between the plurality of target non-empty item sets according to a confidence level of the plurality of target non-empty item sets;
    第三分析子单元,设置为确定提升度大于1的多个目标非空项集之间的规则为有效强关联规则。The third analysis sub-unit is configured to determine that the rule between the plurality of target non-empty item sets having a degree of lift greater than 1 is a valid strong association rule.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-7任一项所述的版本软件编译方法。 A computer readable storage medium storing computer executable instructions for performing the version software compilation method of any of claims 1-7.
PCT/CN2017/084942 2016-05-19 2017-05-18 Software compiling method and device WO2017198198A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610338595.0 2016-05-19
CN201610338595.0A CN107402797A (en) 2016-05-19 2016-05-19 A kind of software compilation method and device

Publications (1)

Publication Number Publication Date
WO2017198198A1 true WO2017198198A1 (en) 2017-11-23

Family

ID=60325739

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/084942 WO2017198198A1 (en) 2016-05-19 2017-05-18 Software compiling method and device

Country Status (2)

Country Link
CN (1) CN107402797A (en)
WO (1) WO2017198198A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126608A (en) * 2019-12-11 2020-05-08 北京明略软件系统有限公司 Knowledge representation method, knowledge representation device, electronic equipment and computer readable storage medium
CN111221650A (en) * 2019-12-31 2020-06-02 青岛海尔科技有限公司 System resource recovery method and device based on process type association
CN111368871A (en) * 2019-12-18 2020-07-03 中国人民解放军战略支援部队信息工程大学 Multi-feature information fusion method, device and system
CN115617698A (en) * 2022-12-15 2023-01-17 北京航空航天大学 Software defect measurement element selection method based on association rule network

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977021A (en) * 2019-04-02 2019-07-05 济南浪潮高新科技投资发展有限公司 A kind of software quality management method and system based on Association Rule Analysis

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060277526A1 (en) * 2005-06-02 2006-12-07 The Mathworks, Inc. Calling of late bound functions from an external program environment
CN103268274A (en) * 2013-06-09 2013-08-28 浙江中控研究院有限公司 Test method and test device based on field bus experimental platform
CN104715073A (en) * 2015-04-03 2015-06-17 江苏物联网研究发展中心 Association rule mining system based on improved Apriori algorithm

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098175B (en) * 2011-01-26 2015-07-01 浪潮通信信息系统有限公司 Alarm association rule obtaining method of mobile internet
US9507567B2 (en) * 2014-09-09 2016-11-29 Oracle Financial Services Software Limited Facilitating use of techniques implemented by external library functions in process definitions of analytical applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060277526A1 (en) * 2005-06-02 2006-12-07 The Mathworks, Inc. Calling of late bound functions from an external program environment
CN103268274A (en) * 2013-06-09 2013-08-28 浙江中控研究院有限公司 Test method and test device based on field bus experimental platform
CN104715073A (en) * 2015-04-03 2015-06-17 江苏物联网研究发展中心 Association rule mining system based on improved Apriori algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Detailed solution of C++ Static Binding and Dynamic Binding", JB51.NET, 21 July 2014 (2014-07-21), XP055598207, Retrieved from the Internet <URL:http://www.jb51.net/article/52482.htm> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126608A (en) * 2019-12-11 2020-05-08 北京明略软件系统有限公司 Knowledge representation method, knowledge representation device, electronic equipment and computer readable storage medium
CN111368871A (en) * 2019-12-18 2020-07-03 中国人民解放军战略支援部队信息工程大学 Multi-feature information fusion method, device and system
CN111368871B (en) * 2019-12-18 2023-04-07 中国人民解放军战略支援部队信息工程大学 Multi-feature information fusion method, device and system
CN111221650A (en) * 2019-12-31 2020-06-02 青岛海尔科技有限公司 System resource recovery method and device based on process type association
CN115617698A (en) * 2022-12-15 2023-01-17 北京航空航天大学 Software defect measurement element selection method based on association rule network

Also Published As

Publication number Publication date
CN107402797A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
WO2017198198A1 (en) Software compiling method and device
US20210304071A1 (en) Systems and methods for generating machine learning applications
US10754709B2 (en) Scalable task scheduling systems and methods for cyclic interdependent tasks using semantic analysis
EP3072070B1 (en) Callpath finder
CN106294533B (en) The distributed work flow replicated using database
JP2019125383A (en) Variable duration non-event pattern matching
US20150378873A1 (en) Automatically recommending test suite from historical data based on randomized evolutionary techniques
Roche et al. Evaluating vaccination strategies to control foot-and-mouth disease: a model comparison study
JP2018511106A (en) Data lineage filtering
CN104636130B (en) For generating the method and system of event tree
WO2017165693A4 (en) Use of clinical parameters for the prediction of sirs
US9146709B2 (en) System and method for automatic detection of decomposition errors
US20160048517A1 (en) System and method for identifying relationships in a data graph
US20150006736A1 (en) Method and System for Deploying and Modifying a Service-Oriented Architecture Deployment Environment
Núñez-Corrales et al. The epidemiology workbench: a tool for communities to strategize in response to covid-19 and other infectious diseases
JP6608061B2 (en) Risk event recognition system, method, electronic apparatus and storage medium based on SNS information
US11016951B1 (en) Microbatch loading
White et al. Quantifying HIV-1 transmission due to contaminated injections
JP2015210737A (en) Monitoring method, monitoring device, and monitoring control program
CN110888888A (en) Personnel relationship analysis method and device, electronic equipment and storage medium
JP6954347B2 (en) Experimental design optimizer, experimental design optimization method and experimental design optimization program
CN109344047B (en) System regression testing method, computer-readable storage medium, and terminal device
RU2015111653A (en) Method and system for modifying text in a document
US10831534B2 (en) Mainframe data flow optimization for data integration
US20160255587A1 (en) Activation method and portable terminal

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17798761

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17798761

Country of ref document: EP

Kind code of ref document: A1