Mining method of negative sequence patterns under one-shot conditions

By introducing one-time conditions and gap constraints in negative sequence mode mining, the problem of ignoring these constraints in the prior art is solved, and efficient negative sequence mode mining and improving the operating efficiency of computer systems are achieved.

CN114595278BActive Publication Date: 2025-04-08HEBEI UNIV OF TECH
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202210401337.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-04-19
Filing Date
2022-04-18
Publication Date
2025-04-08
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

The existing negative sequence pattern mining research ignores the impact of specific gap constraints and whether it is repeated on the mining results, and cannot effectively mine negative sequence patterns that meet specific gap constraints.

Method used

The negative sequence mode mining method of one-time conditions is adopted. By reading data in the sequence database, setting the minimum support threshold and gap constraints, the support degree of each character is calculated through the database, and frequent positive sequences and negative sequence patterns are generated to meet the one-time conditions and gap constraints.

Benefits of technology

Efficient negative sequence pattern mining is realized, the problems of ignoring gap constraints and repetition in the prior art are overcome, the operation efficiency of the computer system is significantly improved, and the gap size can be flexibly determined according to user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595278B_ABST
    Figure CN114595278B_ABST
Patent Text Reader

Abstract

The present invention is a one-time conditional negative sequence pattern mining method, comprising the first step of reading a sequence database, a minimum support threshold and a gap constraint; the second step of generating a frequent positive sequence pattern set F1 with a pattern length of 1; the third step of generating a positive sequence candidate pattern with a pattern length of i+1 and calculating the support, and adding the positive sequence candidate pattern that meets the condition to the frequent positive sequence pattern set F1. i+1 ; Step 4: insert each character in the sequence database as a negative element into the frequent positive sequence pattern set F i+1 From each frequent positive sequence pattern, negative sequence candidate patterns are obtained and their support is calculated. Negative sequence candidate patterns that meet the conditions are added to the frequent negative sequence pattern set; the third and fourth steps are repeated until no new positive sequence candidate patterns are generated, the mining is completed, and all negative sequence patterns of one-time conditions are output. This method overcomes the problems of existing negative sequence pattern mining that ignore gap constraints and repeatability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical solution of the present invention belongs to the field of data processing technology, specifically a one-time conditional negative sequence pattern mining method. The information obtained by this method can be used to analyze and predict future trend changes, improve system operation efficiency, increase operation speed, and shorten operation time. Background Art

[0002] With the rapid development of computer technology, the information age has arrived, and with it comes a huge amount of data. How to make full use of this data to find useful information is one of the hot issues in current research. To solve this problem, the subject of data mining has emerged. The purpose of data mining is to use statistics, online analysis and processing, information retrieval, machine learning, expert systems and pattern recognition methods to find hidden information from a large amount of data. Among them, sequence pattern mining is an important branch of data mining. Sequence pattern mining is widely used in many fields, not only limited to the application of biomedicine, but also in commercial promotion and finance.

[0003] In sequential pattern mining, we not only hope to obtain effective information, but also to obtain the interesting information required by users. Therefore, gap constraints are added to sequential pattern mining. Gap constraints can mine the patterns required by users according to needs, narrow the mining scope, and improve mining efficiency.

[0004] In addition, the core issue of sequential pattern mining is pattern matching. Taking Example A as an example, the sequential pattern with gap constraints is explained in detail.

[0005] Example A. Given the pattern p = p1[min1,max1]p2[min2,max2]p3 = b[0,1]a[0,1]b.

[0006] Pattern with gap constraints p=p1[min1,max1]p2...[min j-1 ,max j-1 ]p j [min j ,max j ]p j+1 ...[min m-1 ,max m-1 ]p m ,(0≤min j ≤max j ), where min j and max j are integers, which are the gap constraints of pattern p, representing p j-1 and p j The minimum and maximum number of wildcards betweenj ∈E, E is the character set, m is the pattern length of pattern p. When min1=min2=…=min m-1 , max1=max2=…=max m-1 When the gap constraint is a periodic gap constraint, the mode p can be simply expressed as p = p1p2...p j …p m , gap=[min,max].

[0007] In example A, pattern p=b[0,1]a[0,1]b is a pattern with a periodic gap constraint, the pattern length is 3, the character set E={a,b}, and the pattern p can be simply expressed as p=bab, gap=[0,1], where 0 means that at least 0 wildcards must match between b and a, and between a and b, and 1 means that at most 1 wildcard must match between b and a, and between a and b.

[0008] In the mining of sequential patterns with gap constraints, there are three methods for calculating support: no special conditions, no overlap, and one-time. No special conditions means that there is no restriction on the number of times and positions of any character in the sequence, and any character can be reused in any position; no overlap conditions means that there are restrictions on the positions of characters in the sequence, and the same character in the sequence cannot be used in the same position of the pattern, but can be reused in different positions of the pattern; one-time conditions means that there is a restriction on the number of times a character in the sequence is used, and the same character in the sequence can only appear once in all occurrences of the pattern.

[0009] Taking Example B as an example, these three conditions are explained in detail. Example B. Given the sequence s=s1s2s3s4s5s6s7=bbabbab, the pattern string p=p1[min1,max1]p2[min2,max2]p3=b[0,1]a[0,1]b.

[0010] For the convenience of describing each occurrence, the subscripts corresponding to the characters in sequence s are used to represent all characters of pattern p that appear in sequence s. In this example, pattern p has 6 occurrences in sequence s, namely <1,3,4>, <1,3,5>, <2,3,4>, <2,3,5>, <4,6,7> and <5,6,7>, see Table 1 of the embodiment. <1,3,4> means that s1s3s4 are consistent with pattern p, s1=p1, s3=p2, s4=p3, and there is only one character between s1 and s3, satisfying the gap constraint [0,1], and there are 0 characters between s3 and s4, satisfying the gap constraint [0,1].

[0011] In the absence of special conditions, characters at any position in the sequence can be reused without any restrictions on all existing occurrences. Therefore, the 6 occurrences of pattern p in sequence s <1,3,4>, <1,3,5>, <2,3,4>, <2,3,5>, <4,6,7> and <5,6,7> can all meet the absence of special conditions. The above 6 occurrences are all occurrences without special conditions.

[0012] Under the no-overlap condition, characters in a sequence can appear repeatedly, but they cannot appear in the same position in a pattern. Therefore, the occurrences <1,3,4> and <1,3,5> of pattern p in sequence s do not meet the no-overlap condition, because s1 is used multiple times by p1, s3 is used multiple times by p2, and s1 and s3 appear in the same position in two occurrences; however, <1,3,4> and <4,6,7> meet the no-overlap condition, because s4 exists in both occurrences, but in <1,3,4> s4 is used by p3, and in <4,6,7> it is used by p1. According to the no-overlap condition, pattern p has two occurrences in sequence s, <1,3,4> and <4,6,7>.

[0013] Under the one-shot condition, any character in the sequence can only appear once in all occurrences. Therefore, the occurrences of pattern p in sequence s <1,3,4> and <1,3,5> do not meet the one-shot condition because s1 and s3 are reused; <1,3,4> and <4,6,7> do not meet the one-shot condition because s4 is reused; while <1,3,4> and <5,6,7> meet the one-shot condition because no characters are reused in the two occurrences. It can be seen that the one-shot condition does not ignore the repetitiveness of occurrences, but can also avoid unnecessary repetitions, and can better calculate the number of occurrences of the pattern in the sequence.

[0014] At present, the research on sequence pattern mining mainly focuses on positive sequence patterns, that is, mining useful information from the data in the sequence, but in fact, the missing data in the sequence may also contain important information. Negative sequence pattern mining is to mine the relationship between missing data and existing data through the data in the sequence, so as to mine the important information contained in the missing data in the sequence. The negative sequence pattern is explained through Example C.

[0015] Example C. Negative Sequential Patterns in Healthcare a, b, c and D are positive elements. a, b and c represent different medical services, and D represents the disease state. A negative element indicates that the patient did not receive medical service c. The negative sequence pattern p indicates that patients who received medical services a and b but not c are more likely to suffer from disease D. This pattern can encourage patients and doctors to pay more attention to the missing data c medical service.

[0016] Since the introduction of sequential pattern mining, many algorithms have been used to solve the problem of sequential pattern mining. In order to increase the flexibility of mining and more accurately mine the information of interest to users, gap constraints and one-time conditions are added in the research. For example, Zhang et al. published the paper "Mining periodic patterns with gap requirement from sequences, Acm Transactions on Knowledge Discovery from Data." This paper studies the problem of sequential pattern mining with periodic gap constraints. Although this paper can effectively discover sequential patterns with wildcards, this paper can reuse characters in the sequence, thus generating a large number of redundant patterns; He et al. published the paper "Mining frequent patterns with wildcards from biological sequences, IEEE International Conference on Information Reuse." This paper requires that the mined patterns do not reuse position characters in the sequence, and need to meet the one-time condition. The two methods of One-Way Scan and Two-Way Scan are used to calculate the pattern support, and the maximum value is taken as the pattern support. However, this paper does not restrict the scope of wildcards, so it is impossible to mine frequent patterns that meet specific gap constraints; Xie et al. published the paper "Sequential pattern mining with wildcards, IEEE International Conference." This paper can effectively mine frequent positive sequence patterns with gap constraints and one-time constraints; Wu et al. published the paper "Sequential pattern mining with wildcards and One-Off conditions". This paper uses forward search and backward solution to calculate pattern support, effectively reducing the situation of missing solutions.

[0017] With the continuous development of positive sequence pattern mining research, many scholars have found that missing data in the sequence may also contain important information. Therefore, negative sequence pattern mining has emerged and many studies have been conducted. For example, Hsueh et al. published the paper "Mining Negative Sequential Patterns for E-commerce Recommendations, IEEE Asia-pacific Services Computing Conference." This study requires multiple scans of the database to generate negative sequence candidates of different lengths, and uses a similar hash tree data structure for storage. The support of negative sequence candidates is calculated during the database scanning process. Zheng et al. published the paper "Negative-GSP: An efficient method for mining negative sequential patterns, Australian Computer Society.", using the GSP algorithm to mine all positive sequence patterns, obtain negative sequence candidates by converting positive sequence patterns, and calculate the support of negative sequence candidates. Dong et al. published the paper “e-NSP: Efficient negative sequential pattern mining, Artificial Intelligence.” This paper does not need to scan the database repeatedly. It mines negative sequence patterns by combining the information of the mined positive sequence patterns with the knowledge of set theory, which greatly shortens the mining time. However, it does not restrict the pattern gaps, so it is impossible to mine negative sequence patterns that meet specific gap constraints. In addition, the algorithm ignores the repetitiveness of occurrence, cannot effectively record the number of occurrences of the pattern, and ignores the effective sequence information.

[0018] Through the above analysis, it is found that the existing negative sequence pattern mining research ignores the impact of specific gap constraints and repetition on the mining results. How to add gap constraints and one-time conditions in negative sequence pattern mining so that users can more conveniently and accurately mine the negative sequence patterns of interest has not yet been well solved. Summary of the invention

[0019] In view of the deficiencies in the prior art, the technical problem that the present invention intends to solve is to provide a computer-readable medium or system that stores executable instructions, and the computer-readable medium or system executes actions according to a negative sequence pattern mining method for one-time conditions. Through this method, all negative sequence patterns of one-time conditions in the data can be mined, and gap constraints and one-time conditions are added in the mining process, thereby overcoming the problems of existing negative sequence pattern mining that ignores gap constraints and repeatability, achieving efficient negative sequence pattern mining, and significantly improving the operating efficiency of the computer-readable medium or system.

[0020] The technical solution adopted by the present invention to solve the above technical problems is:

[0021] In one aspect, the present invention provides one or more computer-readable media storing executable instructions, which, when executed by one or more processors, cause the one or more processors to perform an action; characterized in that the one or more processors perform an action according to a one-time conditional negative sequence pattern mining method, including:

[0022] Read in the sequence database, set the minimum support threshold and gap constraints;

[0023] Then, the sequence database is traversed, the support of each character is calculated, and the characters whose support is greater than or equal to the minimum support threshold are added to the frequent positive sequence pattern set F1, and the frequent positive sequence pattern set F1 with a pattern length of 1 is generated; the support of a character is equal to the number of times the character appears in the sequence database;

[0024] Next, the pattern growth method is used to generate positive sequence candidate patterns with a pattern length of i+1, i≥1, and the support of the positive sequence candidate patterns is calculated. The positive sequence candidate patterns with support greater than or equal to the minimum support threshold are added to the frequent positive sequence pattern set F i+1 ;

[0025] When i=1, read a character from the frequent positive sequence pattern set F1 with a pattern length of 1, use the character as a prefix, with the gap constraint in the middle, connect the character or another character as a suffix, and obtain a positive sequence candidate pattern with a pattern length of 2;

[0026] When i>1, traverse the frequent positive sequence pattern set with a pattern length of i, connect the frequent positive sequence patterns with the same prefix as the suffix of the current frequent positive sequence pattern, and generate a positive sequence candidate pattern with a pattern length of i+1;

[0027] Calculate the support of the positive sequence candidate pattern, and add the positive sequence candidate pattern whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F i+1 ;

[0028] Finally, each character in the sequence database is inserted into the frequent positive sequence pattern set F as a negative element. i+1 In each frequent positive sequence pattern in , the negative element is located after the gap constraint, and a negative sequence candidate pattern is obtained; the support of the negative sequence candidate pattern is calculated, and the negative sequence candidate pattern whose support is greater than or equal to the minimum support threshold is added to the frequent negative sequence pattern set;

[0029] Frequent positive sequence pattern set F i+1 As long as a new frequent positive sequence pattern is generated, a negative sequence candidate pattern is generated and the support is calculated. The negative sequence candidate pattern with a support greater than or equal to the minimum support threshold is added to the frequent negative sequence pattern set; the process of generating positive sequence candidate patterns is repeated until no new positive sequence candidate patterns are generated, the entire negative sequence pattern mining process ends, and the negative sequence patterns of all one-time conditions are output;

[0030] Based on the above mining results, future change trends are predicted and managed.

[0031] On the other hand, the present invention also provides a system, including one or more processors, a memory storing a computer-readable medium, and a display; the display is a touch screen, a liquid crystal display, etc., for visualization of data input and output results, and the processor is a CPU, etc.; when the computer-readable medium is executed by one or more processors, the one or more processors perform actions according to the negative sequence pattern mining method of one-time conditions.

[0032] The sequence database is a road traffic flow sequence or a biological DNA sequence, which improves the operating efficiency of a computer-readable medium or a processor and improves the prediction efficiency of road traffic flow or biological DNA.

[0033] The specific process of calculating the support of the positive sequence candidate pattern is:

[0034] Read the positive sequence candidate pattern, determine the network tree needs to create m layers of nodes according to the pattern length m of the positive sequence candidate pattern, and use the depth-first and backtracking strategies to create the network tree; first match the sub-pattern p1 of the positive sequence candidate pattern, when the element s of the sequence in the sequence database k If it is equal to the sub-pattern p1 of the positive sequence candidate pattern, a node is created at the first level of the network tree. Continue to match the next sub-pattern of the positive sequence candidate pattern. When the element s of the sequence in the sequence database t Equal to the subpattern p of the positive sequence candidate pattern j , j ≥ 2, and the node created at the j-1th layer of the network tree With the nodes created at level j If the gap between them satisfies the gap constraint, a node is created at the jth level of the network tree. If the subpattern p of the positive sequence candidate pattern j If no qualified element is matched in the sequence of the sequence database, the sub-pattern p of the negative sequence candidate pattern is re-matched by going back to the node created in the previous layer of the network tree. j-1 ; When j = m, the sub-pattern p of the positive sequence candidate pattern j The last sub-pattern p of the positive sequence candidate pattern m , if the last subpattern p of the subpattern of the positive sequence candidate pattern m When a qualified element is matched in the sequence of the sequence database, the m-th layer node of the net tree is created, and the support of the positive sequence candidate pattern is increased by 1; when all sub-patterns of the positive sequence candidate pattern cannot match qualified elements in the sequence of the sequence database, the net tree creation ends; in the process of creating nodes, the element s of the sequence in the sequence database needs to be matched. k 、s t Mark it and do not use it again after use. If backtracking occurs, the mark needs to be revoked.

[0035] The specific process of calculating the support of negative sequence candidate patterns is:

[0036] Read the negative sequence candidate pattern, determine the network tree needs to create m layers of nodes according to the pattern length m of the negative sequence candidate pattern, and use the depth-first and backtracking strategy to create the network tree; first match the sub-pattern p1 of the negative sequence candidate pattern, when the element s of the sequence in the sequence database k If the sub-pattern p1 is equal to the negative sequence candidate pattern, a node is created at the first level of the network tree. Continue matching the next subpattern of the negative sequence candidate pattern when the element s of the sequence in the sequence database t Equal to the subpattern p of the negative sequence candidate pattern j , j ≥ 2 and there are negative elements, and the node created at the j-1th level of the network tree With the nodes created at level j The gap between them satisfies the gap constraint, and the element s of the sequence in the sequence database t With s r There are elements between them and s t With s r If any element between is not a positive element corresponding to a negative element, a node is created at the jth level of the network tree. If the subpattern p of the negative sequence candidate pattern j If no qualified element is matched in the sequence of the sequence database, the sub-pattern p of the negative sequence candidate pattern is re-matched by going back to the node created in the previous layer of the network tree. j-1 ; When j = m, the sub-pattern p of the negative sequence candidate pattern j The last subpattern p of the negative sequence candidate pattern m, if the last subpattern p of the negative sequence candidate pattern m When a qualified element is matched in the sequence of the sequence database, the m-th layer node of the net tree is created, and the support of the negative sequence candidate pattern is increased by 1; when all sub-patterns of the negative sequence candidate pattern cannot match qualified elements in the sequence of the sequence database, the net tree creation ends; in the process of creating nodes, the element s of the sequence in the sequence database needs to be matched. k 、s r 、s t Mark it and do not use it again after use. If backtracking occurs, the mark needs to be revoked.

[0037] A method for predicting traffic flow using a negative sequence pattern mining method under one-time conditions, characterized in that the specific steps of the negative sequence pattern mining method under one-time conditions are:

[0038] The first step is to read in the traffic sequence database. The sequence database uses 100 data from the public data set Metro Interstate Traffic Volume. Therefore, the traffic sequence database contains 100 traffic sequences, and the length of each traffic sequence is 24. The traffic sequence database includes 7 characters from a to g, where character a represents the traffic flow of 0-1,000, which is a very small traffic situation; characters b, c and d represent the traffic flow of 1,001-2,000, 2,001-3,000 and 3,001-4,000, respectively, which is a medium traffic situation; characters e and f represent the traffic flow of 4,001-5,000 and 5,001-6,000, respectively, which is a medium to high traffic situation; character g represents the traffic flow of 6,001-7,000, which is a very large traffic situation;

[0039] The gap constraint is set to [4, 4] to measure the traffic flow changes every four hours, and the minimum support threshold is 50 to measure the traffic flow changes that have occurred at least 50 times;

[0040] Step 2: traverse the traffic sequence database, calculate the support of each character, add characters whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F1, and generate a frequent positive sequence pattern set F1 with a pattern length of 1; the support of a character is equal to the number of times the character appears in the sequence database;

[0041] Step 3: Generate a positive sequence candidate pattern with a pattern length of i+1 by pattern growth, i≥1, calculate the support of the positive sequence candidate pattern, and add the positive sequence candidate pattern with a support greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F. i+1 ;

[0042] When i=1, read a character from the frequent positive sequence pattern set F1 with a pattern length of 1, use the character as a prefix, with the gap constraint in the middle, connect the character or another character as a suffix, and obtain a positive sequence candidate pattern with a pattern length of 2;

[0043] When i>1, traverse the frequent positive sequence pattern set with a pattern length of i, connect the frequent positive sequence patterns with the same prefix as the suffix of the current frequent positive sequence pattern, and generate a positive sequence candidate pattern with a pattern length of i+1;

[0044] Calculate the support of the positive sequence candidate pattern, and add the positive sequence candidate pattern whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F i+1 ;

[0045] Step 4: Insert each character in the sequence database as a negative element into the frequent positive sequence pattern set F obtained in step 3 i+1 In each frequent positive sequence pattern in , the negative element is located after the gap constraint, and a negative sequence candidate pattern is obtained; the support of the negative sequence candidate pattern is calculated, and the negative sequence candidate pattern whose support is greater than or equal to the minimum support threshold is added to the frequent negative sequence pattern set;

[0046] Frequent positive sequence pattern set F i+1 As long as a new frequent positive sequence pattern is generated, the fourth step is executed; the third and fourth steps are repeated until no new positive sequence candidate pattern is generated, and the entire negative sequence pattern mining process is completed. A total of 89 one-time conditional negative sequence patterns are output. The statistics of the one-time conditional negative sequence patterns in each time period are shown in the following table;

[0047] Statistics of negative sequence patterns of one-time conditions in different time periods

[0048]

[0049] Note: The numbers in brackets indicate the frequency of occurrence of the character, and Null indicates that there is no obvious pattern in traffic flow;

[0050] According to the mining results, the traffic flow changes within 11 hours can be divided into the following two situations:

[0051] Case 1: When the traffic flow in the first hour is a, it indicates that the traffic flow is extremely small during this period. In the next 4 hours, the traffic flow is and Null, indicating that the traffic flow did not show b~g or the traffic flow showed no obvious pattern, indicating that there was no surge in traffic flow in these four hours; the traffic flow in the sixth hour was c or f, which was medium or above medium, and in the next four hours the traffic flow showed and Null, indicating that the traffic flow did not decrease or reach a peak value during these four hours, but remained at a medium to high level. The traffic flow at the 11th hour was e or f, which was a medium to high level. Therefore, when the initial traffic flow was extremely small, the traffic flow first gradually increased, reached a medium or high level after four hours, and then remained at this level.

[0052] Case 2: When the traffic flow in the first hour is e, it is above average. In the next 4 hours, the traffic flow is As well as the case of Null, it means that the traffic flow did not decrease or reach a peak in these four hours. In the sixth hour, the traffic flow was f, which was above average, and in the next four hours, the traffic flow appeared As well as the Null situation, it means that the traffic flow did not drop significantly during these four hours, but continued to be medium or above medium. The traffic flow at the 11th hour was c, which was medium. Therefore, when the initial traffic flow was above medium, the traffic flow would continue to be medium or above medium for nearly ten hours.

[0053] Based on the above mining results, reasonable prediction and management of future traffic flow can be made. That is, if the traffic flow is medium or above medium four hours after the occurrence of extremely small traffic, additional personnel can be dispatched to direct traffic to ease traffic pressure; or continuous attention can be paid to the above medium traffic flow, and personnel can be appropriately arranged to direct traffic conditions.

[0054] Compared with the existing methods, the present invention has the following outstanding substantive features:

[0055] (1) The present invention realizes the mining of negative sequence patterns under one-time conditions, and gap constraints and one-time conditions are considered in the mining of negative sequence patterns. First, a frequent positive sequence pattern with a pattern length of 1 is found according to the sequence database, and then a positive sequence candidate pattern with a pattern length of 2 is generated according to the pattern growth, and the support of the positive sequence candidate pattern is calculated, and the positive sequence candidate pattern whose support meets the conditions is added to the frequent positive sequence pattern set; negative elements are inserted into each frequent positive sequence pattern in the frequent positive sequence pattern set in turn to generate a negative sequence candidate pattern, and the support of the negative sequence candidate pattern is calculated, and the negative sequence candidate pattern greater than or equal to the minimum support threshold is added to the negative sequence pattern set under one-time conditions; in this way, it is iterated until the frequent positive sequence pattern set with a pattern length of i+1 is empty, and the mining ends; through this method, users can set different minimum support thresholds and gap constraints according to different needs, conduct mining according to actual needs, and solve different practical problems; it overcomes the problems of existing negative sequence pattern mining ignoring gap constraints and repeatability, which can not only enable users to mine the required patterns according to their needs, but also effectively improve efficiency.

[0056] (2) CN104574153A discloses a fast and efficient negative sequence pattern mining method. This method does not require repeated scanning of the database. Based on the mined positive sequence pattern, the method relies on the formula to perform AND, OR, and XOR operations on the data bitmap to quickly calculate the negative candidate support, and mines the negative sequence pattern that meets the minimum support. However, the pattern mined by the invention cannot meet the specific gap and does not consider the repeatability problem. The present invention mines negative sequence patterns with gaps under a one-time condition, which not only considers the repeatability problem but also meets the specific gap requirements. This is the biggest difference between the two.

[0057] (3) CN106910132A discloses a negative sequence pattern mining method based on the top-k strategy. This method sets the k value according to the number of negative sequence patterns required by the user, and does not set a minimum support threshold. Therefore, it can only mine the top k patterns that meet the conditions. The present invention is a negative sequence pattern mining method based on the minimum support threshold, which can mine all patterns that meet the conditions. This is the biggest difference between the two.

[0058] (4) CN104537553A discloses a method for mining repeated negative sequence patterns. This method does not require multiple scans of the database. By recording the number of repetitions of the pattern, a formula is used to calculate the repetition support of the negative sequence candidate pattern. Although the invention records the number of repetitions, it does not meet the specific gap constraints. The present invention not only meets the one-time condition, but can also discover multiple occurrences of the pattern in the same sequence, and also meets the specific gap constraints. This is the biggest difference between the two.

[0059] (5) CN104504159A discloses a method for mining negative sequence patterns based on multiple supports. This method does not need to scan the database again. Based on the mined positive sequence patterns with multiple supports, the support of negative sequence candidate patterns is calculated by a formula. This method has no constraints on the mined negative sequence patterns. However, the present invention imposes restrictions on the minimum support of negative sequence patterns, and can mine negative sequence patterns that meet the requirements according to needs. This is the biggest difference between the two.

[0060] (6) CN107515942A discloses a method for mining infrequent negative sequence patterns in a sequence. The method mines infrequent and frequent positive sequences by setting two-level multi-minimum support, converts them into negative sequence patterns, and combines the relevant information of frequent and infrequent positive sequences with the relevant knowledge of set theory to calculate the support of negative candidate sequences. However, the pattern mined by the invention cannot meet the specific gap and does not consider the repeatability problem. The present invention can meet the specific gap requirements while repeatedly considering the repeatability problem. This is the biggest difference between the two.

[0061] (7) CN111581460A discloses a method for mining adaptive sequence patterns with weak wildcards under one-time conditions. The method generates candidate patterns by pattern growth and calculates pattern support by reverse filling in an online pattern matching manner. Although the method can mine under one-time conditions, it can only mine positive sequence patterns with weak wildcards. The present invention does not have the limitation of weak wildcards and can mine negative sequence patterns with gap constraints under one-time conditions. This is the biggest difference between the two.

[0062] (8) CN111475550A discloses a method capable of mining adaptive high-average utility sequence patterns under one-time conditions. The method generates candidate patterns by pattern growth and calculates the support of adaptive high-average utility sequence patterns matching under one-time conditions through a queue structure. Although the method can mine under one-time conditions, what is mined is a high-average utility sequence pattern with adaptive gaps. The present invention can mine negative sequence patterns that meet specific gap constraints under one-time conditions without considering utility values. This is the biggest difference between the two.

[0063] (9) CN110232140A discloses a method capable of matching one-time approximate patterns under local-global constraints. The method uses a greedy search parent strategy and a rightmost parent strategy to perform one-time and approximate pattern matching under (δ,γ)-distance through a network tree structure to obtain the largest result set. Although the invention performs pattern matching under one-time conditions, it can only be used for approximate matching of positive sequence patterns; while the pattern matching stage of the present invention can accurately match negative sequence patterns, which is the biggest difference between the two.

[0064] (10) CN109271419A discloses an online string matching method without gap constraints. The method uses the first-in-first-out property of the queue to dynamically solve the problem of non-overlapping pattern matching without gap constraints. Although the method can realize online pattern matching, the method does not pre-set gap constraints and does not meet the one-time condition. The present invention can mine frequent patterns that meet the requirements in multiple sequences and realize the mining of negative sequence patterns with specific gap constraints under the one-time condition. This is the biggest difference between the two.

[0065] (11) CN106250549B discloses a memory-based frequent pattern mining method, which uses a tree structure to implement mining, improves the frequent pattern tree by traversing the database, and uses a depth-first strategy to traverse the frequent pattern tree to find frequent patterns; while the present invention uses a pattern growth method to generate candidate patterns, which reduces the number of candidate patterns and improves operating efficiency. This is the biggest difference between the two.

[0066] (12) CN105187242A discloses a method for detecting abnormal user behavior based on mining variable-length sequence patterns. The method generates multiple variable-length sequences to be detected through online user behavior data and matches and compares the variable-length sequences with each sequence stream to determine whether there is abnormal user behavior data. The method can realize online anomaly detection. The present invention discovers abnormal user behavior by mining negative sequence patterns. This is the biggest difference between the two.

[0067] (13) CN107992840A discloses a multi-segment multi-threshold constrained time series pattern search method, which divides multiple non-overlapping time series patterns including corresponding preset thresholds into sub-patterns equal to the number of windows, uses a sliding window to obtain the characteristics of a specified window block, and determines whether it matches the time series pattern. If it matches, the streaming time series data of the window block is used as the search result; while the present invention uses a network tree structure to match the pattern and includes specific gaps, which is the biggest difference between the two.

[0068] (14) CN110209708A discloses a sequence pattern storage method and mining method based on array storage. The method uses an array to store the sequence position of the transaction containing the frequent items in each sequence, and then combines the frequent items one by one to obtain an item set combination sequence with a length of 2, and determines whether it is a frequent sequence, and performs iterative calculations in sequence until no frequent sequence is found. The present invention uses a pattern growth method to generate candidate patterns, which reduces the number of candidate generation and improves mining efficiency. This is the biggest difference between the two.

[0069] Compared with the existing methods, the present invention has the following significant improvements:

[0070] (1) The method of the present invention introduces gap constraints in negative sequence pattern mining and studies the problem of negative sequence pattern mining with gap constraints. The method can flexibly determine the gap size according to user requirements, which increases the flexibility of mining and enables it to adapt to the needs of more situations and be more widely used.

[0071] (2) The method of the present invention introduces a one-time condition under a given gap constraint. Under the one-time condition, each character in the sequence is required to be used only once, thereby avoiding repeated use of characters. Compared with no special conditions, there is no repeated use of characters, which reduces redundancy and mines out more accurate results.

[0072] (3) The method of the present invention studies negative sequence pattern mining. Negative sequence patterns not only focus on the relationship between the occurring data, but also focus on the relationship between the missing data and the occurring data. Negative sequence pattern mining is to obtain the important information contained in the missing data in the sequence by mining the relationship between the existing data and the missing data in the database. Negative sequence pattern mining can be used for behavioral analysis and is applied to many intelligent systems and applications, such as health and medical management systems, biomedical systems and financial risk management, fraud detection, road traffic flow monitoring and prediction, etc.

[0073] (4) The method proposed in the present invention is applied to the biological and financial fields, which can help users find important information contained in missing data and help users make decisions. The example of the present invention is a simple biological DNA sequence, where s1 and s2 represent DNA sequences, and the character set E = {A, G, C, T}. The one-time conditional negative sequence pattern mining method proposed in the present invention can find negative sequence patterns with specific gaps according to user needs, extract valuable information from them, and reduce the number of candidate patterns, improve mining efficiency, and have great application value and development potential. Pattern mining of biological DNA sequences can be used for genetic disease analysis and prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 Take for example all occurrences of a given pattern p in a given sequence s.

[0075] Figure 2 Calculate negative sequence candidate patterns for the present invention The network tree structure constructed by the support in sequence s1;

[0076] Figure 3 Calculate negative sequence candidate patterns for the present invention The network tree structure constructed by the support in sequence s2. DETAILED DESCRIPTION

[0077] The following is a complete example to illustrate the one-time conditional negative sequence pattern mining method of the present invention, including the following contents:

[0078] As shown in Table 1, in Example B, the given pattern p has a total of 6 occurrences in the sequence s = bbabbab, 'b', 'b', 'b', 'b', 'a', 'b' are the 7 characters of the sequence s, and the position subscripts corresponding to the 7 characters are represented by '1', '2', '3', '4', '5', '6', '7'; the position subscripts corresponding to the characters are used to represent all occurrences, and these 6 occurrences are: <1,3,4>, <1,3,5>, <2,3,4>, <2,3,5>, <4,6,7> and <5,6,7>, among which the occurrences that meet the one-time condition are: <1,3,4> and <5,6,7>.

[0079] Table 1 Occurrence of a given pattern p in sequence s in Example B

[0080]

[0081] Figure 1 The computer processing flow of the method of the present invention is as follows: 1) Start → 2) Read in the data set SDB and the minimum support threshold minsup and the gap constraint gap → 3) Generate a frequent positive sequence pattern set F1 with a pattern length of 1 → 4) Generate a positive sequence candidate pattern with a pattern length of i+1, and calculate the support of the positive sequence candidate pattern → 5) Determine whether the support of the positive sequence candidate pattern is greater than the minimum support threshold minsup; if yes, execute step 6; if no, execute step 11 → 6) Store the positive sequence candidate pattern in the frequent positive sequence pattern set F i+1 →7) Insert negative elements in the frequent positive sequence patterns that meet the support conditions to generate negative sequence candidate patterns →8) Determine whether the support of the negative sequence candidate pattern is greater than the minimum support threshold minsup; if yes, execute step 9; if no, execute step 10 →9) Store the negative sequence candidate pattern in the frequent negative sequence pattern set NF →10) Determine whether the negative elements are fully inserted; if yes, execute step 11; if no, execute step 7 →11) Determine whether the frequent positive sequence pattern set F i Is the traversal complete? If yes, go to step 12; if no, go to step 4 → 12) When i = i + 1, determine the frequent positive sequence pattern set F i Is it empty? If yes, execute step 13; if no, execute step 11→13) Output the negative sequence patterns of all one-time conditions and the mining ends.

[0082] Example 1

[0083] As shown in Table 2, given a DNA sequence database SDB = {s1 = s1s2s3s4s5s6s7 = ATAAGTA, s2 = s1s2s3s4 = TAAC}, the minimum support threshold minsup = 2 and the gap constraint gap = [0,1], s1 and s2 represent two DNA sequences, and the characters A, G, C, and T represent adenine, guanine, cytosine, and thymine, respectively; the minimum support threshold refers to the minimum number of occurrences of the pattern expected by the user in the sequence database, and the gap constraint refers to the number of characters between the mined characters;

[0084] Table 2 DNA sequence database SDB

[0085]

[0086] Step 1: Input the DNA sequence database SDB, the minimum support threshold minsup and the gap constraint gap, and obtain the number of sequences in the sequence database N = 2;

[0087] Step 2: Calculate the support of each character in the DNA sequence database, add characters whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set with a pattern length of 1, generate a frequent positive sequence pattern set F1 with a pattern length of 1, and obtain a frequent positive sequence pattern set F1 = {A, T};

[0088] Traverse the two sequences s1 and s2 in the DNA sequence database SDB, obtain the character set E = {A, C, G, T}, record the number of occurrences of each character in the DNA sequence database SDB, and obtain the results in Table 3;

[0089] Table 3 The number of occurrences of each character in the sequence database SDB

[0090] character A C G T Occurrence 6 1 1 3

[0091] Add characters whose occurrence times are greater than or equal to the minimum support threshold minsup to the frequent positive sequence pattern set with a pattern length of 1 The following results are obtained:

[0092] (1) Character A appears 4 times in sequence s1 and 2 times in sequence s2, so the support of character A is sup(A) = 6. Since sup(A) ≥ minsup = 2, character A is added to the frequent positive sequence pattern set with a pattern length of 1. In this case, F1={A};

[0093] (2) If character C appears 0 times in sequence s1 and 1 time in sequence s2, then the support of character C, sup(C) = 1. Since sup(C) < minsup = 2, character C is not added to the frequent positive sequence pattern set F1 of pattern length 1, which is F1 = {A}. At this time, F1 = {A};

[0094] (3) If character G appears 1 time in sequence s1 and 0 times in sequence s2, then the support of character G, sup(G) = 1. Since sup(G) < minsup = 2, character G is not added to the frequent positive sequence pattern set F1 of pattern length 1, which is F1 = {A}. At this time, F1 = {A};

[0095] (4) If character T appears 2 times in sequence s1 and 1 time in sequence s2, then the support of character T, sup(T) = 3. Since sup(T) ≥ minsup = 2, character T is added to the frequent positive sequence pattern set F1 of pattern length 1, which is F1 = {A}. At this time, F1 = {A, T};

[0096] In summary, the final frequent positive sequence pattern set F1 of pattern length 1 is obtained as F1 = {A, T}. At this time, A and T represent frequent positive sequence patterns;

[0097] Step 3: Construct the frequent positive sequence pattern set F2 of pattern length 2: For the characters in the frequent positive sequence pattern set F1 = {A, T}, generate positive sequence candidate patterns of pattern length 2 in the way of pattern growth in turn, and calculate the support of the positive sequence candidate patterns. The positive sequence candidate patterns with support greater than or equal to the minimum support threshold minsup are frequent positive sequence patterns, and the frequent positive sequence patterns are added to the frequent positive sequence pattern set F2;

[0098] Read character A from the frequent positive sequence pattern set F1 = {A, T} of pattern length 1. Using character A as the prefix, with the gap constraint in the middle and character A as the suffix for connection, the positive sequence candidate pattern A[0,1]A of pattern length 2 is obtained; then read in the positive sequence candidate pattern A[0,1]A; then traverse the DNA sequence database SDB, and create a net tree using the depth - first and backtracking strategies. Since the pattern length is 2, 2 - layer nodes need to be created; specifically, in sequence s1, if s1 = p1, then create a node in the first layer of the net tree and continue to match p2. Since s3 = p2 and there is only one element between s3 and s1, satisfying the gap constraint, create a node in the second layer of the net tree At this time, 2 - layer nodes have been created, so the support of the positive sequence candidate pattern A[0,1]A is incremented by 1;

[0099] Continue to traverse the DNA sequence database SDB. In sequence s2, if s2 = p1, then create a node in the first layer Continue matching p2. Since s3 = p2 and there are 0 elements between s3 and s2, the gap constraint is satisfied, so a node is created at the second level of the network tree. At this point, two layers of nodes have been created, so the support of the positive sequence candidate pattern A[0,1]A is increased by 1 until the traversal is completed; in the process of creating nodes, elements s1, s2, and s3 need to be marked and will not be used again after use;

[0100] Finally, the support of the positive sequence candidate pattern A[0,1]A in sequence s1 is 1, and the support in sequence s2 is 1. Then the support of the positive sequence candidate pattern A[0,1]A is sup(A[0,1]A)=2. Since sup(A[0,1]A)≥minsup=2, the positive sequence candidate pattern A[0,1]A is a frequent positive sequence pattern and is added to the frequent positive sequence pattern set of length 2. In this case, F2={A[0,1]A}; in this embodiment, s1, s2, and s3 are all elements of sequences s1 and s2, and p1 and p2 are all sub-patterns of pattern p;

[0101] Step 4: Construct a frequent negative sequence pattern set NF: insert each character in the character set E = {A, C, G, T} as a negative element into the frequent positive sequence pattern of the frequent positive sequence pattern set F2 with a pattern length of 2, and obtain each negative sequence candidate pattern; calculate the support of the negative sequence candidate pattern, and the negative sequence candidate pattern whose support is greater than or equal to the minimum support threshold minsup is a frequent negative sequence pattern and is added to the frequent negative sequence pattern set NF;

[0102] The frequent positive sequence pattern A[0,1]A has a pattern length of 2, so it only contains one insertion position. Insert the character A as a negative element to obtain a negative sequence candidate pattern.

[0103] Compute negative sequence candidate patterns The specific process of support is as follows: read in the negative sequence candidate pattern Using depth-first and backtracking strategies to create a network tree to calculate negative sequence candidate patterns under one-time conditions Support in sequence s1;

[0104] First, according to the negative sequence candidate pattern The pattern length determines that the network tree needs to create 2 layers of nodes, negative sequence candidate patterns The sub-patterns p1=A, p2=A are A in the prefix and suffix positions respectively; traverse the sequence database SDB, and if element s1=p1 in sequence s1, create a node in the first layer of the network tree Continue to match p2, since s3 = p2 and there is a negative element It is required that there are elements between s1 and s3 and any element s2 between s1 and s3 is not a negative element The corresponding positive element A, since there is an element s2 between s1 and s3 which is T but not A, a node is created at the second level of the network tree At this point, 2 layers of nodes have been created, so the negative sequence candidate mode The support of is increased by 1, the matching is finished, and p1 is matched again. If s4=p1, a node is created at the first level of the network tree. If there is no element that meets the conditions, the match ends, so the negative sequence candidate pattern In sequence s1, the support is 1. Figure 2 To calculate negative sequence candidate patterns The network tree structure built by the support in the sequence s1; elements s1, s2, s3, and s4 need to be marked in the process of creating nodes, and they will not be used again after use;

[0105] Figure 3 To calculate negative sequence candidate patterns The network tree structure built by the support in sequence s2; in sequence s2, s2 = p1, then create a node in the first layer of the network tree Mark element s2; continue matching p2, s3 = p2 but there is no element between s2 and s3, then there is no negative element, so rematch p2, there is no element that meets the condition, backtrack to the node Rematch p1, unmark element s2; if s3 = p1 in sequence s2, create a node at the first level of the network tree If there is no element that meets the conditions, the match ends. A total of 1 node is created this time, so the negative sequence candidate pattern The support in sequence s2 is 0, and the final negative sequence candidate pattern Support because So it is not added to the frequent negative sequence pattern set NF.

[0106] Repeat step 4 until all negative elements are inserted into the frequent positive sequence pattern A[0,1]A, and get the following result:

[0107] (1) Insert character C as a negative element into the frequent positive sequence pattern A[0,1]A to obtain a negative sequence candidate pattern Negative sequence candidate pattern The support in sequence s1 is 1, and the support in sequence s2 is 0, then the negative sequence candidate pattern Support because So it is not added to the frequent negative sequence pattern set NF.

[0108] (2) Insert character G as a negative element into the frequent positive sequence pattern A[0,1]A to obtain a negative sequence candidate pattern Negative sequence candidate pattern The support in sequence s1 is 1, and the support in sequence s2 is 0, then the negative sequence candidate pattern Support because So it is not added to the frequent negative sequence pattern set NF.

[0109] (3) Insert the character T as a negative element into the frequent positive sequence pattern A[0,1]A to obtain the negative sequence candidate pattern Negative sequence candidate pattern The support in sequence s1 is 0, and the support in sequence s2 is 0, then the negative sequence candidate pattern Support because So it is not added to the frequent negative sequence pattern set NF.

[0110] Repeat the third step. If a new positive sequence candidate pattern is added to the frequent positive sequence pattern set F2, continue to execute the fourth step. In this way, the third and fourth steps are executed repeatedly until all the positive sequence candidate patterns generated by the frequent positive sequence patterns in the frequent positive sequence pattern set F1 = {A, T} are traversed. Specifically, the following results are obtained:

[0111] Read the character A with a pattern length of 1 from the frequent positive sequence pattern set F1 = {A, T}, use the character A as a prefix, the gap constraint is in the middle, and connect with the character T as a suffix to obtain a positive sequence candidate pattern A[0,1]T with a pattern length of 2 with the character A as a prefix; the support of the positive sequence candidate pattern A[0,1]T in sequence s1 is 2, and the support in sequence s2 is 0, then the support of the positive sequence candidate pattern A[0,1]T sup(A[0,1]T) = 2, since sup(A[0,1]T)≥minsup = 2, the positive sequence candidate pattern A[0,1]T is a frequent positive sequence pattern, and is added to the frequent positive sequence pattern set F2 with a pattern length of 2, at this time F2 = {A[0,1]A, A[0,1]T};

[0112] Repeat the fourth step, insert all characters in the character set E = {A, C, G, T} as negative elements into the frequent positive sequence pattern A[0,1]T of the frequent positive sequence pattern set F2, and add the negative sequence candidate patterns whose support satisfies the conditions into the frequent negative sequence pattern set NF to obtain the frequent negative sequence pattern set

[0113] Repeat the third step, read the character T with a pattern length of 1 from the frequent positive sequence pattern set F1 = {A, T}, use the character T as a prefix, the gap constraint is in the middle, and connect with the character A as a suffix to obtain a positive sequence candidate pattern T[0,1]A with a pattern length of 2 with the character T as a prefix; the support of the positive sequence candidate pattern T[0,1]A in sequence s1 is 2, and the support in sequence s2 is 1, then the support of the positive sequence candidate pattern T[0,1]A sup(T[0,1]A) = 3, because sup(T[0,1]A) ≥ minsup = 2, so the positive sequence candidate pattern T[0,1]A is a frequent positive sequence pattern, added to the frequent positive sequence pattern set F2 with a pattern length of 2, at this time F2 = {A[0,1]A, A[0,1]T, T[0,1]A}, see Table 4;

[0114] Table 4 Frequent positive sequence patterns with pattern lengths of 2 and 3

[0115] The pattern length is 2 The pattern length is 3 A[0,1]A A[0,1]T[0,1]A A[0,1]T T[0,1]A[0,1]A T[0,1]A

[0116] Repeat the fourth step, inserting each character in the character set E = {A, C, G, T} as a negative element into the frequent positive sequence pattern T[0,1]A in turn; repeat the third and fourth steps in this way until all the positive sequence candidate patterns generated by the frequent positive sequence patterns in the frequent positive sequence pattern set F1 = {A, T} are traversed, and finally the frequent negative sequence pattern set is obtained.

[0117] Step 5. Continue to construct a frequent positive sequence pattern set F3 with a pattern length of 3 by using the pattern growth method: For the frequent positive sequence patterns in the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A}, the pattern growth method is used to generate positive sequence candidate patterns with a pattern length of 3, and the support of the positive sequence candidate patterns is calculated. The positive sequence candidate patterns whose support is greater than or equal to the minimum support threshold minsup are added to the frequent positive sequence pattern set F3. Specifically, the following results are obtained:

[0118] (1) Read the frequent positive sequence pattern \(A[0,1]A\) with pattern length 2 from the frequent positive sequence pattern set \(F2 = \{A[0,1]A, A[0,1]T, T[0,1]A\}\), where \(A[0,1]\) is the prefix and \(A\) is the suffix. Search for frequent positive sequence patterns with prefix \(A\) in the frequent positive sequence pattern set \(F2 = \{A[0,1]A, A[0,1]T, T[0,1]A\}\) for connection. Find the frequent positive sequence pattern \(A[0,1]A\), whose prefix is \(A\) and suffix is \([0,1]A\). Then connect the frequent positive sequence pattern \(A[0,1]A\) with \(A[0,1]A\) to obtain the positive sequence candidate pattern \(A[0,1]A[0,1]A\). The support of the positive sequence candidate pattern \(A[0,1]A[0,1]A\) in sequence \(s1\) is 1, and in sequence \(s2\) is 0. Then the support of the positive sequence candidate pattern \(A[0,1]A[0,1]A\), \(sup(A[0,1]A[0,1]A)=1\). Since \(sup(A[0,1]A[0,1]A)< minsup = 2\), it is not added to the frequent positive sequence pattern set \(F3\) with pattern length 3. At this time

[0119] (2) Read the frequent positive sequence pattern \(A[0,1]A\) with pattern length 2 from the frequent positive sequence pattern set \(F2 = \{A[0,1]A, A[0,1]T, T[0,1]A\}\), where \(A[0,1]\) is the prefix and \(A\) is the suffix. Search for frequent positive sequence patterns with prefix \(A\) in the frequent positive sequence pattern set \(F2 = \{A[0,1]A, A[0,1]T, T[0,1]A\}\) for connection. Find the frequent positive sequence pattern \(A[0,1]T\), whose prefix is \(A\) and suffix is \([0,1]T\). Then connect the frequent positive sequence pattern \(A[0,1]A\) with \(A[0,1]T\) to obtain the positive sequence candidate pattern \(A[0,1]A[0,1]T\). The support of the positive sequence candidate pattern \(A[0,1]A[0,1]T\) in sequence \(s1\) is 1, and in sequence \(s2\) is 0. Then the support of the positive sequence candidate pattern \(A[0,1]A[0,1]T\), \(sup(A[0,1]A[0,1]T)=1\). Since \(sup(A[0,1]A[0,1]T)< minsup = 2\), it is not added to the frequent positive sequence pattern set \(F3\) with pattern length 3. At this time

[0120] (3) Read the frequent positive sequence pattern A[0,1]T with a pattern length of 2 from the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A}, where A[0,1] is the prefix and T is the suffix. Find the frequent positive sequence pattern with prefix T from the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A} and connect them to find the frequent positive sequence pattern T[0,1]A, whose prefix is ​​T and suffix is ​​[0,1]A. Then connect the frequent positive sequence pattern A[0,1]T with T[0,1]A to obtain the positive sequence candidate pattern Formula A[0,1]T[0,1]A; the support of the positive sequence candidate pattern A[0,1]T[0,1]A in sequence s1 is 2, and the support in sequence s2 is 0, then the support of the positive sequence candidate pattern A[0,1]T[0,1]A sup(A[0,1]T[0,1]A)=2, since sup(A[0,1]T[0,1]A)≥minsup=2, the positive sequence candidate pattern A[0,1]T[0,1]A is a frequent positive sequence pattern, and is added to the frequent positive sequence pattern set F3 with a pattern length of 3. At this time, F3={A[0,1]T[0,1]A};

[0121] (4) Read the frequent positive sequence pattern T[0,1]A with a pattern length of 2 from the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A}, where T[0,1] is the prefix and A is the suffix. Find the frequent positive sequence pattern with prefix A from the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A} for connection, find the frequent positive sequence pattern A[0,1]A, whose prefix is ​​A and suffix is ​​[0,1]A, then connect the frequent positive sequence pattern T[0,1]A with A[0,1]A to obtain the positive sequence candidate pattern T[0,1]A[ 0,1]A; the support of the positive sequence candidate pattern T[0,1]A[0,1]A in sequence s1 is 1, and the support in sequence s2 is 1, then the support of the positive sequence candidate pattern T[0,1]A[0,1]A sup(T[0,1]A[0,1]A)=2, since sup(T[0,1]A[0,1]A)≥minsup=2, the positive sequence candidate pattern T[0,1]A[0,1]A is a frequent positive sequence pattern, and is added to the frequent positive sequence pattern set F3 with a pattern length of 3. At this time, F3={A[0,1]T[0,1]A,T[0,1]A[0,1]A}, see Table 4;

[0122] (5) Read the frequent positive sequence pattern T[0,1]A with pattern length 2 from the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A}, where T[0,1] is the prefix and A is the suffix. Search for frequent positive sequence patterns with prefix A in the frequent positive sequence pattern set F2 = {A[0,1]A, A[0,1]T, T[0,1]A} for concatenation, and find the frequent positive sequence pattern A[0,1]T, whose prefix is A and suffix is [0,1]T. Then concatenate the frequent positive sequence pattern T[0,1]A with A[0,1]T to obtain the positive sequence candidate pattern T[0,1]A[0,1]T. The support of the positive sequence candidate pattern T[0,1]A[0,1]T in sequence s1 is 0, and the support in sequence s2 is 0. Then the support of the positive sequence candidate pattern T[0,1]A[0,1]T, sup(T[0,1]A[0,1]T) = 0. Since sup(T[0,1]A[0,1]T) < minsup = 2, it is not added to the frequent positive sequence pattern set F3 with pattern length 3. At this time, F3 = {A[0,1]T[0,1]A, T[0,1]A[0,1]A};

[0123] Similarly to the fourth step, insert each character in the character set E = {A, C, G, T} as a negative element into each frequent positive sequence pattern in the frequent positive sequence pattern set F3 to obtain and other negative sequence candidate patterns; calculate the supports of these negative sequence candidate patterns and find that there is no negative sequence candidate pattern with support greater than or equal to the minimum support threshold. Since no new negative sequence candidate pattern is added to the frequent negative sequence pattern set NF, at this time

[0124] Step 6: Using the frequent positive sequence patterns with pattern length 3, similar to generating the frequent positive sequence patterns with pattern length 2, only one positive sequence candidate pattern A[0,1]T[0,1]A[0,1]A with pattern length 4 can be obtained through pattern growth. Calculate the support of the positive sequence candidate pattern A[0,1]T[0,1]A[0,1]A, sup(A[0,1]T[0,1]A[0,1]A) = 1. Since sup(A[0,1]T[0,1]A[0,1]A) < minsup = 2, the frequent positive sequence pattern set with pattern length 4 At this time, no new positive sequence candidate pattern is generated and no negative sequence candidate pattern can be generated. The entire negative sequence pattern mining process ends, and all negative sequence patterns with one-time conditions are output. In this embodiment, These three negative sequence patterns with one-time conditions are output.

[0125] Example 2

[0126] In this embodiment, the one-time conditional negative sequence pattern mining method is applied to traffic flow monitoring and prediction. The traffic sequence database uses 100 data in the public data set Metro Interstate Traffic Volume. The data set is the hourly traffic flow from Interstate 94 westbound from Minneapolis to Station 301 in St. Paul. That is, the traffic sequence database of this embodiment contains 100 traffic sequences, each of which has a length of 24. The gap constraint is set to gap = [4, 4] to measure the traffic flow change every four hours, and the minimum support threshold minsup = 50 is set to measure the traffic flow change that has occurred at least 50 times. The traffic sequence database includes a~ g7 characters, among which character a represents the traffic flow of 0-1,000, which belongs to the situation of extremely small traffic flow; characters b, c and d represent the traffic flow of 1,001-2,000, 2,001-3,000 and 3,001-4,000 respectively, which belongs to the situation of medium traffic flow; characters e and f represent the traffic flow of 4,001-5,000 and 5,001-6,000 respectively, which belongs to the situation of above-medium traffic flow; character g represents the traffic flow of 6,001-7,000, which belongs to the situation of extremely large traffic flow.

[0127] The implementation steps of this embodiment are the same as those of Embodiment 1. A total of 89 negative sequence patterns of one-time conditions are mined through the negative sequence pattern mining of one-time conditions. Table 5 is the statistics of the negative sequence patterns of one-time conditions in various time periods.

[0128] Table 5 Statistics of negative sequence patterns under one-time conditions in different time periods

[0129]

[0130] Note: The numbers in brackets indicate the frequency of occurrence of the character, and Null indicates that there is no obvious pattern in traffic flow;

[0131] It can be concluded from Table 5 that the traffic flow changes within 11 hours can be roughly divided into the following two situations:

[0132] Case 1: When the traffic flow in the first hour is a, it indicates that the traffic flow is extremely small during this period. In the next 4 hours, the traffic flow is and Null, indicating that the traffic flow did not show b~g or the traffic flow showed no obvious pattern, indicating that there was no surge in traffic flow in these four hours; the traffic flow in the sixth hour was c or f, which was medium or above medium, and in the next four hours the traffic flow showed and Null, indicating that the traffic flow did not decrease or reach a peak value during these four hours, but continued to be above average. The traffic flow at the 11th hour was e or f, which is above average. It can be seen that when the initial traffic flow is extremely small, the traffic flow first gradually increases, reaches a medium or above average level four hours later, and then continues to be at this level.

[0133] Case 2: When the traffic flow in the first hour is e, it is above average. In the next 4 hours, the traffic flow is As well as the case of Null, it means that the traffic flow did not decrease or reach a peak in these four hours. In the sixth hour, the traffic flow was f, which was above average, and in the next four hours, the traffic flow appeared As well as the Null situation, it means that the traffic flow did not drop significantly during these four hours, but continued to be medium or above medium. The traffic flow at the 11th hour was c, which was medium. It can be seen that when the initial traffic flow was at an above medium level, the traffic flow would continue to be medium or above medium for nearly ten hours.

[0134] Therefore, the negative sequence pattern mining results of the above-mentioned one-time conditions can be used to make relatively reasonable predictions and management of future traffic flows. That is, if the traffic flow is medium or above medium four hours after the occurrence of extremely small traffic, additional personnel can be dispatched to the site to divert traffic to ease traffic pressure; or continuous attention can be paid to medium to above medium traffic flows. For example, when the traffic flow has been at a medium or above medium level for nearly ten hours, attention should be paid and personnel should be appropriately arranged to divert traffic.

[0135] The above-mentioned one-time conditional negative sequence pattern mining method uses VC++6.0 as the programming software, Visio2013 as the drawing tool, Intel(R)Core(TM)i5-8265U CPU@1.60GHz 1.80GHz as the processor, and Windows7 and above as the operating system. The above-mentioned software and hardware environments are well known to those skilled in the art.

[0136] The present invention is not limited to the above embodiments. Any design that utilizes the design concept of the present invention and makes some simple changes should fall within the protection scope of the present invention.

Claims

1. A one-time conditional negative sequence pattern mining method for predicting traffic flow, characterized in that: The specific steps of this method are: The first step is to read in the traffic sequence database. The sequence database uses 100 data from the public data set Metro Interstate Traffic Volume. Therefore, the traffic sequence database contains 100 traffic sequences, and the length of each traffic sequence is 24. The traffic sequence database includes 7 characters from a to g, where character a represents the traffic flow of 0-1,000, which is a very small traffic situation; characters b, c and d represent the traffic flow of 1,001-2,000, 2,001-3,000 and 3,001-4,000, respectively, which is a medium traffic situation; characters e and f represent the traffic flow of 4,001-5,000 and 5,001-6,000, respectively, which is a medium to high traffic situation; character g represents the traffic flow of 6,001-7,000, which is a very large traffic situation; The gap constraint is set to 4 to measure the traffic flow changes every four hours, and the minimum support threshold is set to 50 to measure the traffic flow changes that have occurred at least 50 times; Step 2: traverse the traffic sequence database, calculate the support of each character, add characters whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F1, and generate a frequent positive sequence pattern set F1 with a pattern length of 1; the support of a character is equal to the number of times the character appears in the sequence database; Step 3: Generate a positive sequence candidate pattern with a pattern length of i+1 by pattern growth, i≥1, calculate the support of the positive sequence candidate pattern, and add the positive sequence candidate pattern with a support greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F. i+1 ; When i=1, read a character from the frequent positive sequence pattern set F1 with a pattern length of 1, use the character as a prefix, with the gap constraint in the middle, connect the character or another character as a suffix, and obtain a positive sequence candidate pattern with a pattern length of 2; When i>1, traverse the frequent positive sequence pattern set with a pattern length of i, connect the frequent positive sequence patterns with the same prefix as the suffix of the current frequent positive sequence pattern, and generate a positive sequence candidate pattern with a pattern length of i+1; Calculate the support of the positive sequence candidate pattern, and add the positive sequence candidate pattern whose support is greater than or equal to the minimum support threshold to the frequent positive sequence pattern set F i+1 ; Step 4: Insert each character in the sequence database as a negative element into the frequent positive sequence pattern set F obtained in step 3 i+1 In each frequent positive sequence pattern in , the negative element is located after the gap constraint, and the negative sequence candidate pattern is obtained; Calculate the support of negative sequence candidate patterns, and add negative sequence candidate patterns whose support is greater than or equal to the minimum support threshold to the frequent negative sequence pattern set; Frequent positive sequence pattern set F i+1 As long as a new frequent positive sequence pattern is generated, the fourth step is executed; the third and fourth steps are repeated until no new positive sequence candidate pattern is generated, and the entire negative sequence pattern mining process ends, and a total of 89 one-time conditional negative sequence patterns are output; Statistics of negative sequence patterns of one-time conditions in different time periods The numbers in brackets indicate the frequency of occurrence of the character, and Null indicates that there is no obvious pattern in traffic flow; According to the mining results, the traffic flow changes within 11 hours can be divided into the following two situations: Case 1: When the traffic flow in the first hour is a, it indicates that the traffic flow is extremely small during this period. In the next 4 hours, the traffic flow is and Null, indicating that the AC traffic did not show b~g or the traffic flow showed no obvious pattern, indicating that there was no surge in traffic flow during these four hours; In the sixth hour, the traffic flow is C or F, which is medium or above medium, and in the next four hours, the traffic flow is and Null, indicating that the traffic flow did not decrease or reach a peak value during these four hours, but remained at a medium to high level. The traffic flow at the 11th hour was e or f, which was a medium to high level. Therefore, when the initial traffic flow was extremely small, the traffic flow first gradually increased, reached a medium or high level after four hours, and then remained at this level. Case 2: When the traffic flow in the first hour is e, it is above average. In the next 4 hours, the traffic flow is As well as the case of Null, it means that the traffic flow did not decrease or reach a peak in these four hours. In the sixth hour, the traffic flow was f, which was above average, and in the next four hours, the traffic flow appeared As well as the case of Null, it means that the traffic flow did not drop significantly during these four hours, but remained at a medium or above medium level. In the 11th hour, the traffic flow was c, which was a medium situation. Therefore, when the initial traffic flow was at a medium to above medium level, the traffic flow would remain at a medium or above medium level for nearly ten hours. Based on the above mining results, reasonable prediction and management of future traffic flow can be made. That is, if the traffic flow is medium or above medium four hours after the occurrence of extremely small traffic, additional personnel will be dispatched to direct traffic to ease traffic pressure; or continuous attention will be paid to the above medium traffic flow, and appropriate personnel will be arranged to direct traffic conditions.

Citation Information

Patent Citations

  • Application of multi-supporting-degree positive and negative sequence modes in clients' purchasing behavior analysis

    CN104504159A

  • Application of repeated negative sequence pattern in customer purchase behavior analysis

    CN104537553A

  • Method for quickly applying negative sequence mining patterns to customer purchasing behavior analysis

    CN104574153A

  • Method for detecting abnormal user behaviours mined on the basis of variable-length sequence mode

    CN105187242A

  • A memory-based frequent pattern mining method

    CN106250549B