Incremental spatio-temporal data association rule mining method and system based on cohesion sequence

By introducing tense and spatial constraints in the mining of multi-space-time data association rules, using the expansion between cohesive terms and the expansion algorithms between cohesive terms, the problem of neglected space-time relationship in the existing technology is solved, and a strong space-time is achieved The generation of association rules and the processing of data volume growth improve mining efficiency and accuracy.

CN119127968APending Publication Date: 2024-12-13UNIV OF SCI & TECH BEIJING
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411185030.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art fails to consider both temporal and spatial information in the mining of multi-space-time data association rules, resulting in temporal and spatial-time relationships being ignored and it is difficult to deal with the challenges brought about by dynamic sequences and data volume growth.

Method used

Adopt the incremental spatiotemporal data correlation rule mining method based on cohesive sequences. By introducing tense constraints and spatial constraints, using the cohesive term expansion method and the reverse cohesive term expansion algorithm to generate strong spatiotemporal correlation rules to adapt to the data Increase volume and improve mining efficiency.

Benefits of technology

It realizes the cohesion of association rules in the space-time dimension, discovers the compact association relationships in time and space in real time, improves the accuracy and practicality of mining results, and can effectively process incremental data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127968A_ABST
    Figure CN119127968A_ABST
Patent Text Reader

Abstract

The invention provides an incremental spatio-temporal data association rule mining method and system based on a cohesion sequence, and relates to the technical field of data processing. The method comprises the following steps: acquiring historical spatio-temporal data, and converting the historical spatio-temporal data into a symbol sequence set; performing pattern mining on the symbol sequence set by adopting a sequence pattern mining algorithm based on extension between cohesion terms to obtain a frequent sequence set; introducing an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and performing pattern mining on the updated symbol sequence set by adopting a sequence pattern mining algorithm expanded between reverse cohesion terms to obtain an updated frequent sequence set; dividing the obtained frequent sequence into a front part and a back part of an association rule, adding relative spatial position constraints, and generating a strong space-time association rule. According to the method, proper temporal constraints and spatial constraints are introduced, so that the space-time association relationship with shorter occurrence time interval and closer occurrence spatial position can be better mined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for mining incremental spatiotemporal data association rules based on cohesive sequences. Background Art

[0002] Mining association rules from multivariate spatiotemporal data is of great significance to real-world problems such as urban management and environmental monitoring. However, the complexity of multivariate spatiotemporal data and computational efficiency have brought serious challenges to researchers.

[0003] Based on the incremental symbolic representation algorithm, multivariate spatiotemporal data sequences can be transformed into a set of symbol sequences that carry spatial information and increase continuously over time. In the field of data mining, sequence pattern mining and association rule mining are two important research directions, which play a key role in revealing the hidden associations and laws in the data. Sequence pattern mining is committed to discovering frequent sequence patterns with a specific order in the symbol sequence set, while association rule mining aims to reveal the association between the previous and next item sets in the frequent sequence patterns. The combination of the two in practical applications can more comprehensively understand the laws and associations behind spatiotemporal data.

[0004] However, existing sequence pattern mining algorithms and association rule mining algorithms often do not consider the temporal and spatial information of symbol sequences at the same time. Temporal information includes the order and time interval of events in the sequence, while spatial information involves the location and spatial relationship of events. The lack of this information may lead to ignoring important temporal and spatial associations in the data when mining association rules, thereby reducing the accuracy and practicality of the mining results. In addition, as the amount of data increases, the length of the symbol sequence and the number of symbols will also increase accordingly. Existing sequence pattern mining algorithms often find it difficult to effectively process the newly added data. Summary of the invention

[0005] In view of the problem that traditional association rule mining algorithms do not consider both time information and space information at the same time and cannot process dynamic sequences, the embodiments of the present invention provide an incremental spatiotemporal data association rule mining method and system based on cohesive sequences. By introducing appropriate temporal constraints and spatial constraints, it is possible to better find spatiotemporal association relationships with short time intervals and close spatial locations, thereby strengthening the cohesion of association rules in the spatiotemporal dimension, and an incremental processing method is proposed to cope with the challenges brought by the growth of data volume. The technical solution is as follows:

[0006] In one aspect, a method for mining association rules of incremental spatiotemporal data based on cohesive sequences is provided, the method comprising the following steps:

[0007] S1. Obtain historical spatiotemporal data and convert it into a symbol sequence set;

[0008] S2, using a sequence pattern mining algorithm based on expansion between cohesive items to perform pattern mining on the symbol sequence set to obtain a frequent sequence set;

[0009] S3, introducing an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and using a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set;

[0010] S4. Divide the obtained frequent sequences into antecedents and consequents of association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

[0011] Optionally, the step S1 specifically includes:

[0012] Collect historical spatiotemporal data with spatial information through sensors, wherein the historical spatiotemporal data includes environmental monitoring data, air quality data, and wind power generation data;

[0013] The historical spatiotemporal data is converted into a symbol sequence set SDB, which is a set of N two-tuples (sid, Seq), where Seq represents the symbol sequence and sid represents the spatial position number corresponding to the symbol sequence; let the symbol sequence Seq= at the nth location with sid=n <I1,...I tid ,...I l >It is composed of l items arranged in order, tid represents the order of appearance, and each item in Seq corresponds to a symbol, that is, any item I tid All belong to the symbol set Z={z1,...,z r}.

[0014] Alternatively, in sequential pattern mining, let sequence P be a subsequence in Seq, then the support number represents the number of tuples containing sequence P in SDB, referred to as c SDB (P), support SDB (P) is equal to the support number divided by the number of symbol sequences, referred to as sup SDB (P); if the support of P in SDB is not less than the set minimum support threshold min_sup, then the sequence P is called a frequent sequence pattern in SDB, referred to as a frequent sequence;

[0015] The step S2 specifically includes:

[0016] A vertical data structure TeMap is constructed to store candidate frequent sequences, and a relative duration constraint rdr is added. A cohesive item extension method rdr-extend is designed and integrated into the PrefixSpan algorithm, and a sequential pattern mining algorithm S-PrefixSpan based on cohesive item extension is obtained.

[0017] Optionally, for frequent sequences, time information is introduced into IDList, and a vertical data structure TeMap is constructed to store the locations of candidate frequent sequences in a key-value manner: the key is the spatial location number sid of the candidate frequent sequence, and the corresponding value is {[t s ,t e ],tid}, including the sequence occurrence order tid, start time t s and the end time t e ; Moreover, TeMap also stores the support count of the sequence, so that it can be counted directly in each iteration;

[0018] The specific steps of the cohesive item extension method rdr-extend are as follows:

[0019] Let the sequence to be expanded be P, the candidate sequence be a frequent sequence consisting of a single symbol, that is, the frequent item p, and the new sequence obtained by expansion be P new ; First, for the expanded sequence P new Create an empty TeMap, traverse P to find the sid that coincides with p, and get the sequence P by connecting the smaller P.tid with the larger p.tid new The location information of P, including the start time, end time and order of occurrence; secondly, check P new Whether the relative duration constraint rdr is satisfied, if so, include it in P new -TeMap; Finally, check P new The spatial position number sid appears. If the symbol sequence appears in P for the first time new -TeMap, a support number is counted for it.

[0020] Optionally, the adopting a sequence pattern mining algorithm based on expansion between cohesive items to perform pattern mining on the symbol sequence set to obtain a frequent sequence set specifically includes:

[0021] First, remove the infrequent symbol sequences in SDB and include all frequent items p composed of single symbols into the candidate frequent sequence set CS; second, traverse the candidate frequent sequence set CS and connect the sequence P in CS with the frequent item p to obtain a new frequent sequence. Specifically, let the sequence P be the prefix and the frequent item p be the suffix. Use the rdr_extend method to connect the prefix and the suffix to expand into a new sequence P. new, then detect P new Whether it meets the minimum support condition, if it does, it will be included in CS; if not, P will be included in the frequent sequence set CFS; finally, repeat the above steps until the candidate frequent sequence set CS is empty.

[0022] Optionally, the step S3 specifically includes:

[0023] Considering the case of incremental data, an incremental symbol sequence set sdb is introduced into SDB, and the updated symbol sequence set is UD, which consists of SDB and sdb. If the last item of SDB corresponds to the same symbol as the first item of sdb, the two items are merged, and the merged item is included in SDB and removed from sdb. The merged SDB is FUD, and the merged sdb is EUD.

[0024] For the updated symbol sequence set UD, the reverse cohesive item expansion sequence pattern mining algorithm S-Postfixspan is used to expand the sequence forward to obtain the updated frequent sequence set, including:

[0025] First, update SDB and sdb to FUD and EUD. If the last item of SDB corresponds to the same sign as the first item of sdb, merge the two items into one item p, remove p from sdb, and then reduce the order of occurrence of the remaining items in sdb by 1. Secondly, regard the merged item p as a potential frequent sequence, use S-PostfixSpan to reversely extend p in FUD, obtain the frequent sequence after sequence extension, and include it in the updated frequent sequence set CFS'. Finally, use S-PrefixSpan to mine potential frequent sequences in EUD, and set the threshold of support number min_sup-c SDB (P) / N, the potential frequent sequence set PFS in EUD is obtained, and the potential frequent sequences in PFS are used for reverse expansion to obtain the frequent sequences after sequence expansion, and are included in the updated frequent sequence set CFS'.

[0026] Optionally, the step S4 specifically includes:

[0027] Let the spatial location set of frequent sequence P be P.sid, then the minimum spatial distance min{d ij} should be less than the relative spatial position constraint rsr,i,j∈P.sid;

[0028] Define the spatiotemporal support, assuming that the frequent sequence P forms a spatiotemporal association rule γ β;(sup,conf), where γ and β represent the antecedent and consequent of the association rule respectively; let c rsr(P) and c rsr (γ) represents the number of symbol sequences that satisfy the relative spatial position constraints in the frequent sequence P and the antecedent γ, sup rsr (P) and sup rsr (γ) represent the temporal and spatial support of the frequent sequence P and the antecedent γ, then the association rule γ The spatiotemporal confidence of β is calculated as conf=sup rsr (P) / sup rsr (γ), if conf is not less than the set minimum confidence threshold min_conf, then γ β is a strong spatiotemporal association rule.

[0029] On the other hand, a cohesive sequence-based incremental spatiotemporal data association rule mining system is provided, which is used to implement any of the above methods, and the system includes:

[0030] The data acquisition module is used to obtain historical spatiotemporal data and convert it into a symbol sequence set;

[0031] A historical partial sequence pattern mining module is used to perform pattern mining on the symbol sequence set by using a sequence pattern mining algorithm based on expansion between cohesive items to obtain a frequent sequence set;

[0032] An incremental partial sequence pattern mining module is used to introduce an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and use a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set;

[0033] The spatiotemporal association rule mining module is used to divide the obtained frequent sequences into the antecedents and consequents of the association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

[0034] Optionally, the data acquisition module includes a sensor component, a serial port server, a management workstation, an interface server, an information center storage server, and a platform core switch;

[0035] Among them, the sensor component is connected to the management workstation through the serial port server, the management workstation is connected to the interface server, the interface server is connected to the information center storage server through a unidirectional isolation gateway, the information center storage server is connected to the platform core switch through optical fiber, and the platform core switch is connected to multiple cloud computing nodes and web servers.

[0036] Optionally, the system further includes a monitoring APP, and the monitoring APP includes: a client, a server, and a system management background;

[0037] The client is used for user registration and login, online query, modification and logout; the server is used for registration and login verification as well as data transmission, addition, modification and deletion; the system management background is used to manage the database.

[0038] In another aspect, an electronic device is provided, the electronic device comprising:

[0039] processor;

[0040] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the incremental spatiotemporal data association rule mining method based on cohesive sequences are implemented.

[0041] On the other hand, a computer-readable storage medium is provided, in which program code is stored. The program code can be called by a processor to execute the steps of the incremental spatiotemporal data association rule mining method based on cohesive sequences.

[0042] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0043] In the embodiment of the present invention, firstly, a new vertical structure is proposed to store candidate frequent sequences, and a cohesive item expansion method is proposed for the structure, and it is integrated into the PrefixSpan algorithm to improve the efficiency of frequent sequence pattern growth. Secondly, in the incremental mining process, by analyzing the potential frequent sequences in the incremental data and using them as suffixes, the reverse cohesive item expansion method is used to perform reverse sequence pattern growth, thereby effectively reducing the mining space of candidate sequences. Finally, a new relative spatial position constraint is defined, and the mined frequent sequences are used as the antecedents and consequents of association rules. According to the minimum confidence threshold constraint and the relative spatial position constraint, strong spatiotemporal association rules with strong cohesion are generated, so that the association relationship of spatiotemporal data that occurs compactly in time and space can be discovered in real time.

[0044] The present invention also constructs an incremental spatiotemporal data association rule mining system based on cohesive sequences. The system consists of three main parts: data collection, association rule mining, and monitoring APP, which are interconnected to form a complete system, providing a useful reference for research and development in related fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 It is a flow chart of an incremental spatiotemporal data association rule mining method based on cohesive sequence provided by an embodiment of the present invention;

[0047] Figure 2 It is a schematic diagram of the framework of the incremental spatiotemporal data association rule mining method based on cohesive sequence provided by an embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of an SDB provided by an embodiment of the present invention;

[0049] Figure 4 is a schematic diagram of TeMap provided by an embodiment of the present invention;

[0050] Figure 5 This is a schematic diagram of rdr-extend between cohesive items provided in an embodiment of the present invention;

[0051] Figure 6 is a schematic diagram of sdb provided by an embodiment of the present invention;

[0052] Figure 7 is a schematic diagram of an updated symbol sequence set provided by an embodiment of the present invention;

[0053] Figure 8 is a schematic diagram of relative spatial position constraints provided by an embodiment of the present invention;

[0054] Fig. 9 Schematic diagram of a Motes spatiotemporal sequence set provided by an embodiment of the present invention;

[0055] Fig.10 is a schematic diagram of an Air Quality spatiotemporal sequence set provided by an embodiment of the present invention;

[0056] Fig.11 It is a schematic diagram of a SDWPF spatiotemporal sequence set provided by an embodiment of the present invention;

[0057] Fig.12 Schematic diagram of the number of frequent sequences of the Motes data set provided by an embodiment of the present invention;

[0058] Fig.13 is a schematic diagram of the number of frequent sequences of the Air Quality data set provided by an embodiment of the present invention;

[0059] Fig.14 Schematic diagram of the number of frequent sequences of the SDWPF data set provided by an embodiment of the present invention;

[0060] Fig.15 is a schematic diagram of frequent sequence comparison of different algorithms provided by an embodiment of the present invention on a Motes data set;

[0061] Fig.16 is a schematic diagram of frequent sequence comparison of different algorithms provided by an embodiment of the present invention on an Air Quality dataset;

[0062] Fig.17 is a schematic diagram of frequent sequence comparison of different algorithms provided by an embodiment of the present invention on the SDWPF data set;

[0063] Fig.18 Schematic diagram of the number of spatiotemporal association rules of the Motes data set provided by an embodiment of the present invention;

[0064] Fig.19 Schematic diagram of the number of spatiotemporal association rules of the Air Quality data set provided by an embodiment of the present invention;

[0065] Fig. 20 Schematic diagram of the number of spatiotemporal association rules of the SDWPF data set provided by an embodiment of the present invention;

[0066] Fig.21 is a schematic diagram for comparing the running time of different data sets provided by an embodiment of the present invention;

[0067] Fig. 22 is a schematic diagram of the location of the first spatiotemporal association rule provided by an embodiment of the present invention;

[0068] Fig.23 is a schematic diagram of a characteristic change trend in the first association rule provided by an embodiment of the present invention;

[0069] Fig.24 It is a schematic diagram of the characteristic change trend in the second association rule provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0072] The embodiment of the present invention provides an incremental spatiotemporal data association rule mining method based on cohesive sequence. Figure 1 and Figure 2 They are respectively a flow chart and a framework schematic diagram of the method, and the method comprises the following steps:

[0073] S1. Obtain historical spatiotemporal data and convert it into a set of symbol sequences.

[0074] In an embodiment of the present invention, historical spatiotemporal data with spatial information is collected by sensors, and the historical spatiotemporal data includes environmental monitoring data, air quality data, wind power generation data, etc.

[0075] In order to apply the sequential pattern mining algorithm to process spatiotemporal data, the historical spatiotemporal data is converted into a symbol sequence set SDB. SDB is a set of N tuples (sid, Seq), where Seq represents the symbol sequence and sid represents the spatial position number corresponding to the symbol sequence; let the symbol sequence Seq= at the nth location with sid=n <I1,...I tid ,...I l >It is composed of l items arranged in order, tid represents the order of appearance, and each item in Seq corresponds to a symbol, that is, any item I tid All belong to the symbol set Z={z1,...,z r}. Figure 3 An example of an SDB is given, where the number of spatial locations N=3 and the symbol set Z={z1,z2,z3,z4}.

[0076] S2. Using a sequence pattern mining algorithm based on expansion between cohesive items to perform pattern mining on the symbol sequence set, to obtain a frequent sequence set.

[0077] The PrefixSpan algorithm is an algorithm based on sequence pattern growth. Its core idea is to use the prefix projection database to grow sequence patterns, thereby reducing the search space of candidate sequence patterns. Its workflow is as follows: First, scan the original sequence data set to find frequent items (frequent sequences composed of single symbols); second, use the prefix projection database to recursively generate a candidate sequence set and record the support number of each candidate sequence. If the support of the candidate sequence is not less than the minimum support threshold, the candidate sequence is added to the frequent sequence set; and so on, recursively construct longer candidate sequences until the longest candidate sequence is found.

[0078] In the process of generating candidate sequences, the PrefixSpan algorithm needs to find all sequence subsets that contain the candidate sequence in order to construct the prefix projection database of the candidate sequence. This is a very time-consuming step, especially when dealing with large-scale sequence databases, which may lead to a high time complexity of the algorithm. Therefore, in practical applications, the PrefixSpan algorithm usually needs to be combined with some other optimization measures to improve the efficiency and scalability of the algorithm.

[0079] Therefore, in the embodiment of the present invention, a new extension method rdr-extend is used to pre-prune the original PrefixSpan algorithm to improve the efficiency of the above recursive process, which is called a sequential pattern mining algorithm based on cohesive item extension (S-PrefixSpan). For the symbol sequence set SDB, rdr-extend is used to expand the candidate prefixes to frequent sequences instead of recursively building a projection database.

[0080] In sequential pattern mining, let sequence P be a subsequence in Seq, then the support number represents the number of tuples containing sequence P in SDB, referred to as c SDB (P), support SDB (P) is equal to the support number divided by the number of symbol sequences, referred to as sup SDB (P); if the support of P in SDB is not less than the set minimum support threshold min_sup, then the sequence P is called a frequent sequence pattern in SDB, referred to as a frequent sequence.

[0081] The step S2 specifically includes:

[0082] A vertical data structure TeMap is constructed to store candidate frequent sequences, and a relative duration constraint rdr is added. A cohesive item extension method rdr-extend is designed and integrated into the PrefixSpan algorithm, and a sequential pattern mining algorithm S-PrefixSpan based on cohesive item extension is obtained.

[0083] In terms of constructing vertical data structures, the co-occurrence table (CMAP) can reveal the co-occurrence of different items in the data set. IDList is a vertical structure based on CMAP, which stores the spatial position number sid of the candidate frequent sequence as a key, and the corresponding value is the occurrence order tid of the sequence.

[0084] For frequent sequences, the present invention introduces time information into IDList, constructs a vertical data structure TeMap, and stores the locations of candidate frequent sequences in a key-value manner: the key is the spatial location number sid of the candidate frequent sequence, and the corresponding value is {[t s ,te ],tid}, including the sequence occurrence order tid, start time t s and the end time t e Moreover, TeMap also stores the support count of the sequence, so that it can be counted directly in each iteration.

[0085] In addition, TeMap.locations, TeMap.sid, TeMap.count, etc. can be used to indicate the location and support number of the sequence. For example, z3.count refers to the support number of z3-TeMap. The TeMap corresponding to the candidate frequent sequence composed of a single symbol in the above SDB is as follows Figure 4 As shown, taking z3-TeMap as an example, it can be seen intuitively that z3 does not appear in the second Seq, that is, z3.count is 2; it appears in the third item of the first Seq, and the t s = 7, t e = 11, and the second term of the third Seq, the t s = 6, t e = 12.

[0086] Compared with the previous pre-pruning method, the TeMap structure allows to redefine the inter-item extension operation in a more efficient way. Since the traditional inter-item extension ignores the duration of the item, the present invention adds a relative duration restrict (rdr) on this basis and proposes a cohesive inter-item extension (rdr-extend), which makes the extension sequence more cohesive.

[0087] Command sequence By l p The duration of a sequence P is the difference between the end time of the last item and the start time of the first item:

[0088] (1)

[0089] The length of a sequence P is the sum of the durations of each item in the sequence:

[0090] (2)

[0091] The ratio of the length of sequence P to its duration needs to satisfy:

[0092] (3)

[0093] Where rdr is the relative duration constraint, or relative duration constraint threshold.

[0094] For example: In the second Seq of SDB, for sequence P=<z2,z1> For example, its duration and length are calculated as 18 and 13 respectively. If rdr is 1.5, the sequence P satisfies the relative duration constraint; if rdr is 1.3, the sequence P does not satisfy the relative duration constraint.

[0095] Algorithm 1 shows the specific steps of the rdr-extend method for extending cohesive items: Let the sequence to be extended be P, the candidate sequence be a frequent sequence (i.e., frequent item) p composed of a single symbol, and the new sequence obtained by extension be P new ; First, for the expanded sequence P new Create an empty TeMap, traverse P to find the sid that coincides with p, and get the sequence P by connecting the smaller P.tid with the larger p.tid new The location information of P, including the start time, end time and order of occurrence; secondly, check P new Whether the relative duration constraint rdr is satisfied, if so, include it in P new -TeMap; Finally, check P new The spatial position number sid appears. If the symbol sequence appears in P for the first time new -TeMap, a support number is counted for it.

[0096]

[0097] Figure 5 This shows an example of rdr-extend between cohesive items. Assume that rdr is 1.5, the sequence to be extended P and the candidate sequence p are z2 and z1 respectively, P new =<z2,z1> , its position in the horizontal format sequence set is shown in the lower right corner. In the first symbol sequence: min_tid is 3. Since z1 first appears in the order of 1, which is less than min_tid, it is ignored; z1 second appears in the order of 5, which is greater than min_tid, so it is retained. z2 first appears in the order of 2. The new sequence generated by the expansion of this item and z1 does not meet the temporal constraint, so it is ignored; z2 second appears in the order of 4. The new sequence generated by the expansion of this item and z1 meets the temporal constraint, so the position of this sequence is included in P new -TeMap, and the support number is counted once; in the second symbol sequence: min_tid is 2, because z1 appears in order 3, which is greater than min_tid, so it is retained. z2 appears in order 1, and the new sequence generated by this item and z1 expansion meets the temporal constraint, and the position of this sequence is included in P new -TeMap, and supports number plus one.

[0098] Furthermore, for the historical partial sequence pattern mining, a sequence pattern mining algorithm based on the extension between cohesive items is used to obtain a frequent sequence set. The specific steps are shown in Algorithm 2: First, the non-frequent symbol sequences in SDB are eliminated, and the frequent items p composed of all single symbols are included in the candidate frequent sequence set CS; secondly, the candidate frequent sequence set CS is traversed, and the sequence P in CS is connected with the frequent item p to obtain a new frequent sequence. Specifically: let the sequence P be the prefix and the frequent item p be the suffix, and use the rdr_extend method to connect the prefix and the suffix to expand it into a new sequence P new , then detect P new Whether it meets the minimum support condition, if it does, it will be included in CS; if not, P will be included in the frequent sequence set CFS; finally, repeat the above steps until the candidate frequent sequence set CS is empty.

[0099]

[0100] S3. Introduce an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and use a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set.

[0101] Considering the case of incremental data, the incremental symbol sequence set sdb is introduced in SDB, which is the extension of Seq in SDB in the time direction. The characteristic of incremental data is that it may contain symbols that have appeared in historical spatiotemporal data, and may also generate new symbols. Figure 6 An example of an SDB is shown. The symbol set Z of the SDB is {z1,z3,z5}, where z5 is a new symbol that has never appeared in the SDB.

[0102] Let the updated symbol sequence set be UD, and UD is composed of SDB and sdb. The purpose of the present invention is to mine the frequent sequence patterns that are cohesive in time and space in UD, and to construct association rules based on this. In this process, in order to better analyze the potential frequent sequences in the incremental data, a preprocessing step is taken: if the last item of SDB corresponds to the same symbol as the first item of sdb, the two items are merged, and the merged item is then included in SDB and removed from sdb. This merging operation is intended to improve the continuity and consistency of the symbol sequence. Let the merged SDB be FUD and the merged sdb be EUD.

[0103] Figure 7 is an example of an updated set of symbol sequences, Figure 7 (a) shows an example of UD. In the first Seq, since the last item of SDB and the first item of sdb have corresponding symbols, the combined FUD and EUD are as follows: Figure 7 As shown in (b) and (c).

[0104] The present invention aims to add temporal constraints in sequential pattern mining, mine frequent sequential patterns with short time intervals in SDB, and update the results in UD according to the results in SDB. Then, appropriate spatial constraints are added to generate spatiotemporal association rules with strong cohesion.

[0105] For the updated symbol sequence set UD, the present invention deeply analyzes the relevant properties of frequent sequences in the incremental process in order to find potential frequent sequences in the incremental sequence set sdb; on this basis, the reverse S-PrefixSpan algorithm is used to expand the sequence forward to obtain a complete frequent sequence.

[0106] Frequent sequences may appear in different positions. Possible situations include: the first half appears in FUD, and the second half appears in EUD. For example, the frequent sequence<z1,z3> ; may also appear entirely in FUD or EUD, such as frequent sequences<z4,z1> Therefore, it can be concluded that the sources of frequent sequences in the incremental sequence set UD are as follows:

[0107] 1) If sequence P is frequent in SDB, then sequence P must be frequent in UD.

[0108] 2) If sequence P is not frequent in SDB, but is extended after the last item of sequence merging, the extended sequence is more likely to meet the relative duration constraint, making the support number of the sequence in FUD greater than the support number of the sequence in SDB, then sequence P may be frequent in UD.

[0109] 3) If sequence P is not frequent in SDB and FUD, but after cohesive item expansion with frequent sequences (frequent items) in EUD, the expanded sequence may meet the minimum support condition, then the expanded sequence may be frequent in UD.

[0110] For the above three different situations, for situation 1), UD is directly allowed to inherit the frequent sequence of SDB, but for situation 2) and situation 3), if all the non-frequent sequences in SDB are regarded as candidate prefixes and then expanded and verified one by one, it will require a lot of work. Therefore, a potential frequent sequence is defined: if there is a sequence p in sdb, which makes the non-frequent sequence in SDB become frequent after extension or expansion, then the sequence p is called a potential frequent sequence. Next, analyze the support conditions that the potential frequent sequence needs to meet:

[0111] For case 2), let the frequent sequence after extension be P, then the potential frequent sequence p is the last item (merged item) of P, which comes from FUD and should satisfy the minimum support condition c FUD (p)≥N min_sup.

[0112] For case 3), let the frequent sequence after expansion be P, then the potential frequent sequence p comes from EUD. On the one hand, any frequent sequence P in UD should satisfy the minimum support condition: c UD (P)≥N min_sup; On the other hand, sequence P may be counted once in FUD and EUD respectively, but can only be counted once in UD, so sequence P should also satisfy: c UD (P)≤c FUD (P)+c EUD (P). Therefore, if P is not frequent in FUD, the support number of sequence P in EUD should satisfy: c EUD (P)≥N min_sup-c FUD (P). For a potential frequent sequence p, which is part of a frequent sequence P, it should also satisfy: c EUD (P)≥N min_sup-c FUD (P). In addition, since the potential frequent sequence p here does not involve the extension of the sequence, c FUD (p) = c SDB (p), we can infer: c EUD (p)≥N min_sup-c SDB (p).

[0113] In summary, potential frequent sequences can greatly reduce the search range of sequence extension. Therefore, the present invention uses potential frequent sequences as suffixes and reverses the direction of rdr-extend to make the sequence grow in the reverse direction, which is called a sequence pattern mining algorithm based on reverse cohesive item extension (S-PostfixSpan).

[0114] The reverse cohesive item expansion sequence pattern mining algorithm is used to expand the sequence forward to obtain an updated frequent sequence set. The process is shown in Algorithm 3, including: first, update SDB and sdb to FUD and EUD. If the last item of SDB corresponds to the same symbol as the first item of sdb, then merge the two items into one item p, remove p from sdb, and then reduce the order of occurrence of the remaining items in sdb by 1; secondly, regard the merged item p as a potential frequent sequence, use S-PostfixSpan in FUD to reversely expand p to obtain the frequent sequence after sequence extension, and include it in the updated frequent sequence set CFS'; finally, use S-PrefixSpan to mine potential frequent sequences on EUD, and set the support number threshold min_sup-c SDB(P) / N, the potential frequent sequence set PFS in EUD is obtained, and the potential frequent sequences in PFS are used for reverse expansion to obtain the frequent sequences after sequence expansion, and are included in the updated frequent sequence set CFS'.

[0115]

[0116] S4. Divide the obtained frequent sequences into antecedents and consequents of association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

[0117] In association rule mining, it is assumed that the frequent sequences in UD , let the first i items of the sequence be the antecedents of the association rule , the remaining items are the consequents of the association rules , then the frequent sequence P can generate an association rule: γ β;(sup,conf). conf represents the confidence of the association rule, that is, the probability that the consequent will occur after the antecedent occurs. It can be calculated as: conf(γ β)=sup(P) / sup(γ). If the confidence of the rule is greater than the given minimum confidence threshold min_conf, the rule is called a strong association rule.

[0118] Traditional association rule mining ignores the spatial position relationship of sequences. However, in real life, association rules composed of frequent sequences occurring at similar spatial positions are often more meaningful. Therefore, the present invention adds relative spatial restrict (rsr), or relative spatial restrict threshold, to the traditional association rule mining to make the spatial cohesion of association rules stronger: let the spatial position set of frequent sequence P be P.sid, then the minimum spatial distance min{d ij} should be less than the relative spatial position constraint rsr,i,j∈P.sid.

[0119] In addition, the spatiotemporal support is defined in the embodiment of the present invention. Assuming that the frequent sequence P forms a spatiotemporal association rule γ β;(sup,conf), where γ and β represent the antecedent and consequent of the association rule respectively; let c rsr (P) and c rsr (γ) represents the number of symbol sequences that satisfy the relative spatial position constraints in the frequent sequence P and the antecedent γ, sup rsr (P) and sup rsr (γ) represent the temporal and spatial support of the frequent sequence P and the antecedent γ, then the association rule γ The spatiotemporal confidence of β is calculated as conf=sup rsr (P) / sup rsr (γ), if conf is not less than the set minimum confidence threshold min_conf, then γ β is a strong spatiotemporal association rule.

[0120] For example: Let the frequent sequence P =<z1,z3> The association rule that can be constructed is z1 z3, the antecedent of this rule is z1, which appears at three spatial positions, γ.sid={1,2,3}, and their spatial position relationship is as follows Figure 8 As shown in the figure, c rsr (P) = c rsr (γ)=2, that is, conf=1>min_conf. This rule is a strong association rule with strong spatiotemporal cohesion.

[0121] In the embodiment of the present invention, firstly, a new vertical structure is proposed to store candidate frequent sequences, and a cohesive item expansion method is proposed for the structure, and it is integrated into the PrefixSpan algorithm to improve the efficiency of frequent sequence pattern growth. Secondly, in the incremental mining process, by analyzing the potential frequent sequences in the incremental data and using them as suffixes, the reverse cohesive item expansion method is used to perform reverse sequence pattern growth, thereby effectively reducing the mining space of candidate sequences. Finally, a new relative spatial position constraint is defined, and the mined frequent sequences are used as the antecedents and consequents of association rules. According to the minimum confidence threshold constraint and the relative spatial position constraint, strong spatiotemporal association rules with strong cohesion are generated, so that the association relationship of spatiotemporal data that occurs compactly in time and space can be discovered in real time.

[0122] Accordingly, an embodiment of the present invention further provides an incremental spatiotemporal data association rule mining system based on cohesive sequence, the system is used to implement the incremental spatiotemporal data association rule mining method based on cohesive sequence, and the system includes:

[0123] The data acquisition module is used to obtain historical spatiotemporal data and convert it into a symbol sequence set;

[0124] A historical partial sequence pattern mining module is used to perform pattern mining on the symbol sequence set by using a sequence pattern mining algorithm based on expansion between cohesive items to obtain a frequent sequence set;

[0125] An incremental partial sequence pattern mining module is used to introduce an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and use a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set;

[0126] The spatiotemporal association rule mining module is used to divide the obtained frequent sequences into the antecedents and consequents of the association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

[0127] The system of this embodiment can be used to execute Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0128] Furthermore, the data acquisition module includes a sensor component, a serial port server, a management workstation, an interface server, an information center storage server, and a platform core switch.

[0129] Among them, the sensor component is connected to the management workstation through the serial port server, the management workstation is connected to the interface server, the interface server is connected to the information center storage server through a unidirectional isolation gateway, the information center storage server is connected to the platform core switch through optical fiber, and the platform core switch is connected to multiple cloud computing nodes and web servers.

[0130] The data acquisition module is a supporting system responsible for sensor monitoring data acquisition. It uses C++ as the development language and is embedded with multiple data communication protocols such as 101, 102, 103, 104, Modbus, CDT, DISA, etc. of IEC 60870-5. The modeling complies with the requirements of the interface reference model, common information model (CIM) and component interface specification (CIS) in IEC 61970, complies with international standards, and can be seamlessly integrated with various systems as middleware; it realizes the access of system data such as monitoring system, integrated energy management and control system, metering, fault analysis and alarm push. The system supports the access of multiple devices and has the ability to parse multiple protocols.

[0131] The data acquisition module adopts a two-level architecture, namely a single integrated management and control system and a cloud platform centralized monitoring system. The integrated management and control system is used to collect real-time operation monitoring data, realize local data monitoring, historical data sampling and storage, and upload key real-time data to the cloud platform centralized monitoring system. The cloud platform centralized monitoring system obtains real-time monitoring data. The communication protocol between the two-level systems can adopt the power standard IEC104 protocol or other protocols. The real-time data acquisition frequency supports seconds according to the protocol requirements, and can support change quantity upload, cyclic upload and call modes.

[0132] Furthermore, the system also includes a monitoring APP, and the monitoring APP includes: a client, a server and a system management background.

[0133] The client is used for user registration and login, online query, modification and logout; the server is used for registration and login verification as well as data transmission, addition, modification and deletion; the system management background is used to manage the database.

[0134] The client is developed and designed using the MUI front-end framework, and HTML5, CSS, and JavaScript are used for front-end development, which is used for user registration and login, online query, modification, and logout. The server is developed using the ThinkJS server-side framework, combined with the MySQL database, which is used for registration and login verification as well as data transmission, addition, modification, and deletion. The system management backend is developed using HTML5, CSS, and JavaScript to manage the database.

[0135] The monitoring APP is easy to operate and has a simple and beautiful interface. It is real-time, and registered users can log in to the system through the mobile APP no matter where they are. The system provides automatic query and display functions, as well as user registration information management functions.

[0136] The incremental spatiotemporal data association rule mining system based on cohesive sequences constructed by the present invention is composed of three main parts: data collection, association rule mining, and monitoring APP, which are interconnected to form a complete system, providing a useful reference for research and development in related fields.

[0137] In terms of experimental verification, two relatively new sequential pattern mining algorithms, VEPRECO based on vertical format and NIA, are used as comparison algorithms to compare with the incremental spatio-temporal association rule mining algorithm based on cohesive sequential pattern (ISTCSP) of the present invention. For different spatio-temporal sequence data sets, the present invention will conduct experimental analysis from the aspects of the influence of algorithm parameters on the number of sequential patterns and the number of association rules, the running time of incremental data, and the interpretation of spatio-temporal association rules.

[0138] In order to evaluate the efficiency of incremental sequence pattern mining and spatiotemporal association rule mining, real sensor datasets Motes, Air Quality and SDWPF are used. These three datasets all contain the spatial location information of the detection sites. Among them, the Motes dataset is a collection of reading logs of sensors deployed in the research laboratory. Each sensor collects a variety of data, including temperature, humidity, light and voltage. Air Quality is an air quality dataset, and SDWPF is a wind power generation dataset.

[0139] Table 1 shows the number of spaces, the number of symbols, the number of subsequences, and the average number of symbols contained in each symbol sequence (average symbol length) for these three symbol sequence sets. Figures 9 to 11 The spatial location information and partial symbol sequences of the detection sites of the three data sets are shown respectively. In addition, in order to verify the effectiveness of the incremental spatiotemporal association rule mining algorithm, the incremental symbols symbolized by ITSSH are used as incremental data.

[0140] Table 1 Experimental data

[0141]

[0142] In order to analyze the impact of parameters on sequential pattern mining, we first analyze the impact of the relative duration constraint threshold rdr on the number of frequent sequences under different minimum support thresholds min_sup. The specific experimental results are shown in Figure 12 to Figure 14 Since the sequence length of the Air Quality dataset is large and the symbol repetition rate is high, it results in more frequent sequences. Therefore, a larger minimum support threshold is set for the Air Quality dataset, and a smaller support threshold is set for other datasets.

[0143] As can be seen from the figure, under the same relative duration constraint rdr setting, the larger the minimum support threshold min_sup, the fewer the number of frequent sequences obtained, and under the same min_sup setting, the smaller the rdr, the fewer the number of frequent sequences obtained. For example: for the Air Quality dataset, rdr is fixed to 1, that is, it is required that the adjacent items of the frequent sequence have no gaps in the original symbol sequence. When min_sup changes from 0.95 to 0.75, the number of frequent sequences increases from 37 to 247, and when min_sup is fixed to 0.9, when rdr changes from 1 to 2, the number of frequent sequences increases from 52 to 167. In addition, when the relative duration constraint rdr is set larger (rdr>1.5), the number of frequent sequences fluctuates greatly, and the degree of influence of rdr on different datasets is different. For example: when rdr changes from 1 to 2, the number of frequent sequences in the Motes dataset increases by about two times, while the number of frequent sequences in the Air Quality dataset and the SDWPF dataset only increases by about one time. This is because the average length of symbols in the Motes dataset is shorter and is more affected by rdr. Therefore, choosing an appropriate relative duration constraint threshold can ensure that the algorithm has better robustness.

[0144] Secondly, the relative duration constraint rdr is fixed to 1.5, and the number of frequent sequences obtained by various sequence pattern mining algorithms under different minimum support thresholds min_sup is further compared. The specific results are shown in Figures 15 to 17 . Through comparison, it is found that the number of frequent sequences will decrease as min_sup increases, and the larger the min_sup is, the more stable the trend of the number of frequent sequences will be. For example, the Motes data set has a larger change trend when min_sup is 0.3-0.35, and a smaller change trend when min_sup is 0.35-0.5. For different algorithms, the NIA algorithm obtains the most frequent sequences, followed by the VEPRECO algorithm, while the number of frequent sequences obtained by the ISTCSP algorithm proposed in the present invention is much smaller than that of these two algorithms. This shows that adding appropriate relative duration constraints can automatically ignore sequences with longer time intervals, thereby obtaining frequent sequences with stronger temporal cohesion.

[0145] In order to analyze the impact of parameters on spatiotemporal association rule mining, we first analyze the impact of relative spatial position constraints rsr on the number of association rules under different minimum confidence thresholds min_conf. The specific experimental results are shown in Figures 18 to 20 In , the units of rsr are meters, kilometers, and kilometers, respectively. Since the Air Quality dataset has more frequent sequences and more constructed association rules, a larger minimum support confidence threshold is set for the Air Quality dataset, and a smaller minimum confidence threshold is set for other datasets.

[0146] From the overall trend, under the same rsr setting, the larger the minimum confidence threshold min_conf, the fewer spatiotemporal association rules are obtained. However, under the same min_conf setting, there is no obvious positive or negative correlation between the number of spatiotemporal association rules and the value of rsr. This is because setting rsr will reduce the support number of the rule antecedent and the support number of the rule itself at the same time, that is, the numerator and denominator are reduced at the same time, and the change in their ratio is unknown. For example: for the Air Quality dataset, if the minimum confidence min_conf is fixed to 0.85, if the relative spatial position constraint rsr is set to 30km, 63 cohesive spatiotemporal association rules are obtained, and if the relative spatial position constraint rdr is increased to 35km, the spatiotemporal association rules obtained do not increase, but decrease to 48. In summary, adding relative spatial position constraints to frequent sequences automatically ignores sequences with farther occurrence positions, and can obtain association rules with stronger spatial cohesion.

[0147] In order to verify the operating efficiency of the algorithm, the present invention compares the running time of different algorithms in the process of mining the historical part and the incremental part of the sequence pattern. First, the minimum support of the three data sets is set to 0.4, 0.85 and 0.3 respectively. The results are as follows: Fig.21As shown, the bottom of the column represents the running time for processing SDB, and the top represents the running time for processing UD. As can be seen from the figure, when processing SDB, the running time of the VEPRECO algorithm is shorter, while when incremental data is added, the running time of the NIA algorithm and the ISTCSP algorithm is shorter. This is because the VEPRECO algorithm needs to mine the entire data set again, which consumes a lot of time, while the NIA algorithm and the ISTCSP algorithm only need to optimize the mining results of historical data. Therefore, with respect to the entire data set, the NIA algorithm and the ISTCSP algorithm are superior to the VEPRECO algorithm in terms of running time. In addition, the running time of the ISTCSP algorithm is slightly higher than that of the NIA algorithm, because the ISTCSP algorithm uses relative duration constraints to eliminate frequent sequences with longer time intervals, while the NIA algorithm does not consider any time constraints. In summary, the method of using potential frequent sequences as suffixes for reverse sequence growth in the present invention can effectively reduce the candidate search space and quickly obtain frequent sequences with strong cohesion.

[0148] Taking wind power generation data as an example, the parameters of the SDWPF data set are set to min_sup=0.25, rdr=1.8, min_conf=0.25, and rsr=2km. For historical spatiotemporal data, the horizontal format sequence set is first converted into a vertical structure TeMap, and symbols with counts less than 33 are removed to obtain all frequent items with a length of 1. Then, the frequent sequences are gradually connected through the expansion between the items of the sequence, and all the frequent sequences of the historical data are obtained through growth. After adding incremental data, the connected symbols of the same type are first merged, and then potential frequent sequences are found and new frequent sequences are obtained through potential frequent sequences. Finally, strong association rules are obtained through minimum confidence and relative space constraints. Table 2 shows some of the obtained spatiotemporal association rules.

[0149] Table 2 Example of SDWPF spatiotemporal association rule mining results

[0150]

[0151] The first spatiotemporal association rule z4z1 z8(0.328,0.566) includes three symbols, which means that within a certain spatial range, when z4 and z1 appear, there is a 56.6% chance that z8 will appear, and the time periods of the three symbols are similar; the second spatiotemporal association rule has the same meaning as the third spatiotemporal association rule, which will not be repeated here. Taking the first spatiotemporal association rule as an example, z4z1 z8 contains two frequent sequences, sequence<z4,z1> The support number is 42, the sequence<z4,z1,z8> The support number of is 35, and their relative spatial positions are as follows Fig. 22As shown. The dots and triangles represent the sequences<z4,z1> and sequence<z4,z1,z8> The location where it occurs. As can be seen from the figure, the sequence<z4,z1,z8> The relative spatial position constraints are satisfied at all 35 sites, and the sequence<z4,z1> The relative spatial position constraints are not met at sid=56 and sid=97. Therefore, the spatiotemporal confidence of this spatiotemporal association rule is 0.875.

[0152] The first association rule (z4z1 z8) and the second association rule (z 10 z 13 The corresponding characteristic change trends of z1) are as follows Fig.23 and Fig.24 As shown, the first association rule occurs at sites #1 and #4, and the second association rule occurs at sites #1 and #3. For the first association rule, at site #4, there is no interval between the three symbols of the association rule. At site #1, z4 is separated from z1 by three symbols, but the interval is not long, so the relative duration constraint is still satisfied at site #1. The same is true for the second association rule. In addition, the consequent z1 of the second association rule appears in the incremental data at site #3, which verifies the effectiveness of the incremental sequence pattern mining of the algorithm of the present invention, and can construct spatiotemporal association rules based on this.

[0153] Taking the first association rule as an example, z4 represents that the feature Etmp continues to be at a large value and the feature Pab3 has a relatively stable change trend, z1 represents that the feature Pab3 has an unsteady change trend and the feature Pab3 has an opposite change trend to the feature Etmp, and z8 represents that the change trend of the feature Wspd is first increased and then decreased, and the change trend of the feature Pab3 is relatively stable. Therefore, it can be obtained from the spatiotemporal association rule z4z1⇒z8(0.328,0.566) that within the range of 0 to 6000 on the Y axis, if the feature Pab3 trend is relatively stable and the value of the feature Etmp continues to be high, and the change trend of the feature Pab3 is unsteady immediately afterwards, then the trend of the feature Pab3 may turn stable next. In summary, the temporal association rules mined by the present invention can predict the state changes of turbine wind motors in a certain area, which is convenient for relevant staff to make early judgments on the efficiency of wind power generation.

[0154] In an exemplary embodiment, the present invention further provides an electronic device, the electronic device comprising:

[0155] processor;

[0156] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the incremental spatiotemporal data association rule mining method based on cohesive sequences are implemented.

[0157] In an exemplary embodiment, the present invention further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the steps of the incremental spatiotemporal data association rule mining method based on cohesive sequences as described above. For example, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0159] References in the specification to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments", etc. indicate that the described embodiments may include a particular feature, structure, or characteristic, but not every embodiment may include the particular feature, structure, or characteristic. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the relevant art to implement such feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described).

[0160] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0161] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0162] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0165] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0166] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.

[0167] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for mining association rules of incremental spatiotemporal data based on cohesive sequences, characterized in that: The following steps are involved: S1. Obtain historical spatiotemporal data and convert it into a symbol sequence set; S2, using a sequence pattern mining algorithm based on expansion between cohesive items to perform pattern mining on the symbol sequence set to obtain a frequent sequence set; S3, introducing an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and using a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set; S4. Divide the obtained frequent sequences into antecedents and consequents of association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

2. The method according to claim 1, characterized in that The step S1 specifically includes: Collect historical spatiotemporal data with spatial information through sensors, wherein the historical spatiotemporal data includes environmental monitoring data, air quality data, and wind power generation data; The historical spatiotemporal data is converted into a symbol sequence set SDB, which is a set of N two-tuples (sid, Seq), where Seq represents the symbol sequence and sid represents the spatial position number corresponding to the symbol sequence; let the symbol sequence Seq= at the nth location with sid=n <I1,...I tid ,...I l >It is composed of l items arranged in order, tid represents the order of appearance, and each item in Seq corresponds to a symbol, that is, any item I tid All belong to the symbol set Z={z1,...,z r }.

3. The method according to claim 1, characterized in that In sequential pattern mining, let sequence P be a subsequence in Seq, then the support number represents the number of tuples containing sequence P in SDB, referred to as c SDB (P), support SDB (P) is equal to the support number divided by the number of symbol sequences, referred to as sup SDB (P); if the support of P in SDB is not less than the set minimum support threshold min_sup, then the sequence P is called a frequent sequence pattern in SDB, referred to as a frequent sequence; The step S2 specifically includes: A vertical data structure TeMap is constructed to store candidate frequent sequences, and a relative duration constraint rdr is added. A cohesive item extension method rdr-extend is designed and integrated into the PrefixSpan algorithm, and a sequential pattern mining algorithm S-PrefixSpan based on cohesive item extension is obtained.

4. The method according to claim 3, characterized in that For frequent sequences, time information is introduced into IDList, and a vertical data structure TeMap is constructed to store the locations of candidate frequent sequences in a key-value manner: the key is the spatial location number sid of the candidate frequent sequence, and the corresponding value is {[t s ,t e ],tid}, including the sequence occurrence order tid, start time t s and the end time t e ; Moreover, TeMap also stores the support count of the sequence, so that it can be counted directly in each iteration; The specific steps of the cohesive item extension method rdr-extend are as follows: Let the sequence to be expanded be P, the candidate sequence be a frequent sequence consisting of a single symbol, that is, the frequent item p, and the new sequence obtained by expansion be P new ; First, for the expanded sequence P new Create an empty TeMap, traverse P to find the sid that coincides with p, and get the sequence P by connecting the smaller P.tid with the larger p.tid new The location information of P, including the start time, end time and order of occurrence; secondly, check P new Whether the relative duration constraint rdr is satisfied, if so, include it in P new -TeMap; Finally, check P new The spatial position number sid appears. If the symbol sequence appears in P for the first time new -TeMap, a support number is counted for it.

5. The method according to claim 4, characterized in that The method of using a sequence pattern mining algorithm based on expansion between cohesive items to perform pattern mining on the symbol sequence set to obtain a frequent sequence set specifically includes: First, remove the infrequent symbol sequences in SDB and include all frequent items p composed of single symbols into the candidate frequent sequence set CS; second, traverse the candidate frequent sequence set CS and connect the sequence P in CS with the frequent item p to obtain a new frequent sequence. Specifically, let the sequence P be the prefix and the frequent item p be the suffix. Use the rdr_extend method to connect the prefix and the suffix to expand into a new sequence P. new , then detect P new Whether it meets the minimum support condition, if it does, it will be included in CS; if not, P will be included in the frequent sequence set CFS; finally, repeat the above steps until the candidate frequent sequence set CS is empty.

6. The method according to claim 1, characterized in that The step S3 specifically includes: Considering the case of incremental data, an incremental symbol sequence set sdb is introduced into SDB, and the updated symbol sequence set is UD, which consists of SDB and sdb. If the last item of SDB corresponds to the same symbol as the first item of sdb, the two items are merged, and the merged item is included in SDB and removed from sdb. The merged SDB is FUD, and the merged sdb is EUD. For the updated symbol sequence set UD, the reverse cohesive item expansion sequence pattern mining algorithm S-Postfixspan is used to expand the sequence forward to obtain the updated frequent sequence set, including: First, update SDB and sdb to FUD and EUD. If the last item of SDB corresponds to the same sign as the first item of sdb, merge the two items into one item p, remove p from sdb, and then reduce the order of occurrence of the remaining items in sdb by 1. Secondly, regard the merged item p as a potential frequent sequence, use S-PostfixSpan to reversely extend p in FUD, obtain the frequent sequence after sequence extension, and include it in the updated frequent sequence set CFS'. Finally, use S-PrefixSpan to mine potential frequent sequences in EUD, and set the threshold of support number min_sup-c SDB (P) / N, the potential frequent sequence set PFS in EUD is obtained, and the potential frequent sequences in PFS are used for reverse expansion to obtain the frequent sequences after sequence expansion, and they are included in the updated frequent sequence set CFS'.

7. The method according to claim 1, characterized in that The step S4 specifically includes: Let the spatial location set of frequent sequence P be P.sid, then the minimum spatial distance min{d ij } should be less than the relative spatial position constraint rsr,i,j∈P.sid; Define the spatiotemporal support, assuming that the frequent sequence P forms a spatiotemporal association rule γ β;(sup,conf), where γ and β represent the antecedent and consequent of the association rule respectively; let c rsr (P) and c rsr (γ) represents the number of symbol sequences that satisfy the relative spatial position constraints in the frequent sequence P and the antecedent γ, sup rsr (P) and sup rsr (γ) represent the temporal and spatial support of the frequent sequence P and the antecedent γ, then the association rule γ The spatiotemporal confidence of β is calculated as conf=sup rsr (P) / sup rsr (γ), if conf is not less than the set minimum confidence threshold min_conf, then γ β is a strong spatiotemporal association rule.

8. A system for mining association rules of incremental spatiotemporal data based on cohesive sequences, the system being used to implement the method according to any one of claims 1 to 7, characterized in that: The system comprises: The data acquisition module is used to obtain historical spatiotemporal data and convert it into a symbol sequence set; A historical partial sequence pattern mining module is used to perform pattern mining on the symbol sequence set by using a sequence pattern mining algorithm based on expansion between cohesive items to obtain a frequent sequence set; An incremental partial sequence pattern mining module is used to introduce an incremental symbol sequence set into the symbol sequence set to obtain an updated symbol sequence set, and use a reverse cohesive item-extension sequence pattern mining algorithm to perform pattern mining on the updated symbol sequence set to obtain an updated frequent sequence set; The spatiotemporal association rule mining module is used to divide the obtained frequent sequences into the antecedents and consequents of the association rules, and add relative spatial position constraints to generate strong spatiotemporal association rules.

9. The system according to claim 8, characterized in that The data acquisition module includes a sensor component, a serial port server, a management workstation, an interface server, an information center storage server, and a platform core switch; Among them, the sensor component is connected to the management workstation through the serial port server, the management workstation is connected to the interface server, the interface server is connected to the information center storage server through a unidirectional isolation gateway, the information center storage server is connected to the platform core switch through optical fiber, and the platform core switch is connected to multiple cloud computing nodes and web servers.

10. The system according to claim 8, characterized in that The system also includes a monitoring APP, which includes: a client, a server and a system management background; The client is used for user registration and login, online query, modification and logout; the server is used for registration and login verification as well as data transmission, addition, modification and deletion; the system management background is used to manage the database.

Citation Information

Patent Citations

  • Dense database quick association rule mining method based on vertical data distribution

    CN107908711A

  • Maximal frequent sequential pattern mining method based on distributed log

    CN108874952A

  • Rare subsequence mining method of multi-dimensional time sequence data applied to atmospheric pollution control

    CN109858507A

  • Non-overlapping adaptive frequent sequence pattern mining method

    CN111930803A

  • Bit data feature mining method, system, equipment and readable medium

    CN112104518A