Concept Lattice Method for Spatial Association Discovery in the Urban Service Industry

: A relative lag in research methods, technical means and research paradigms has restricted the rapid development of geography and urban computing. Hence, there is a certain gap between urban data and industry applications. In this paper, a spatial association discovery framework for the urban service industry based on a concept lattice is proposed. First, location data are used to form the formal context expressed by 0 and 1. Frequent closed itemsets and a concept lattice are computed on the basis of the formal context of the urban service industry. Frequent closed itemsets can filter out redundant information in frequent itemsets, uniquely determine the complete set of all frequent itemsets, and be orders of magnitude smaller than the latter. Second, spatial frequent closed itemsets and association rules discovery algorithms are designed and built based on the formal context. The inputs of the frequent closed itemsets discovery algorithms include the given formal context and frequent threshold value, while the outputs are all frequent closed itemsets and the partial order relationship between them. Newly added attributes create new concepts to guarantee the uniqueness of the new spatial association concept. The inputs of spatial association rules discovery algorithms include frequent closed itemsets and confidence threshold values, and a rule is confident when and only if its confidence degree is not less than the confidence threshold value. Third, the spatial association of the urban service industry in Nanning, China is taken as a case to verify the method. The results are basically consistent with the spatial distribution of the urban service industry in Nanning City. This study enriches the theories and methods of geography as well as urban computing, and these findings can provide guidance for location-based service planning and management of urban services.


Introduction
Spatial association and aggregation of the urban service industry are industry characteristics. Identifying these characteristics requires some methods based on spatial data [1]. Due to the rapid development of e-commerce, mainstream online platforms offer real-time data sources for all related subjects and provide geo-tagging data for geographic research [2][3][4]. Utilizing the public data of these e-commerce platforms to conduct urban computing based on big data, services for urban planning and management can be provided [5,6]. There is a certain gap between the big data and industry applications, and researchers need to find appropriate research methods to turn data into knowledge for the essence of research objectives and research questions [7]. The association analysis was developed from the classic "beer and diaper" story, presented by Agrawal [8]. Spatial association belongs to the category of association rule mining. Researchers can divide up spatial objects to generate a series of Definition 1 [26]. A formal context F is a triple: where U is a collection of all objects, A is a collection of all attributes, and R ⊆ U × A is the relationship between U and A; here, u ∈ U, a ∈ A, uRa means object u has the attribute a, which is equivalent to R(u, a) = 1, while R(u, a) = 0 means the opposite.
The formal context can correspond to the actual transaction in the urban service industry calculation. An arbitrary spatial location in the city system is an object, and everything around an arbitrary spatial position (such as hospitals, supermarkets, hotels, etc.) is an attribute; then, all spatial points in a city can be regarded as collections of objects, and all the entity types that appear can be considered as collections of all attributes. Then, uRa can be expressed as whether there are hotels, snack shops and other service shops in the vicinity of a certain location; for example, if there is a distribution of hotels around the railway station without the distribution of fast food restaurants, it can be expressed as R (railway station, hotel) = 1, R (railway station, fast food restaurant) = 0. The distribution of various entity types can be converted into a formal context problem in a city.
As shown in Figure 1, the service types of each entity are assumed to be a (snack shop), b (apartment hotel), c (beauty salon), d (three-star hotel), e (Chinese restaurant), and f (budget hotel). The spatial distribution of the urban services industry can be converted into a formal context, where U = {1, 2, 3, 4, 5, 6} and A = {a, b, c, d, e, f }. The formal context naturally corresponds to the actual transaction in the urban service industry calculation. An arbitrary spatial location in the city system is an object (such as 1), and everything around an arbitrary spatial position (such as a, b, c, etc.) is its attribute. Hence, all spatial points in a city can be regarded as collections of objects, and all of the entity types that appear can be considered as collections of all attributes. Finally, uRa can be expressed as whether there are hotels, snack shops and other service shops in the vicinity of a certain location. The study of the distribution of various entity types can be converted into a formal context analysis problem in a city. Definition 2 [27]. A Galois relationship is a pair of mappings between the set of arbitrary objects E ⊆ U and the set of arbitrary attributes I ⊆ A: f (E) = {a ∈ A |∀u ∈ E, uRa} (2) and g(I) = {u ∈ U |∀a ∈ I, uRa}.
Definition 3 [27]. Let E ⊆ U and I ⊆ A if tuple C = (E, I) meets the following: f (E) = I and g(I) = E.
Then, C is a formal concept for F, referred to as the concept. The collection of all concepts on the formal context is recorded as CS(F).
Definition 4 [11]. Let concepts C 1 = (E 1 , I 1 ) and C 2 = (E 2 , We say that there is a partial order relationship between C 1 and C 2 , denoted as C 1 < C 2 or C 2 > C 1 . We often refer to C 1 as the sub-concept of C 2 , and C 2 as the parent concept of C 1 .
Definition 5 [11]. The concept lattice is a tuple: Namely, a concept lattice is composed of the entire concept CS(F) from the formal context F and the partial order relationship < between the two concepts.
The calculation and analysis of the concept lattice problem can be carried out for spatial association and aggregation of the urban service industry. To calculate the distance between the two entities, a given radius (such as a 100-m distance around each entity shop) can be used to calculate all business services within the distance between adjacent points in actual computation, and then the distance table can be created using a specific search radius within the scope of the distance between the two groups of points. The distance table is a property table that is based on a spatial point adjacent to a distance threshold.

Frequent Closed Itemset
Through the transformation of the formal context, the transaction was replaced by the spatial neighborhoods in the transaction database. The spatial association rule is converted into the spatial co-location rule so that the spatial association problem can be generalized as the point collection database of the spatial index. Therefore, it is possible to find the co-location subsets of frequent spatial event types according to the location map to find the spatial co-location pattern, while the co-location subset corresponds to the itemset in the transaction database. The distance threshold of 100 meters is set in Figure 1, and a, b, and c are in the vicinity of point 1, so {a, b, c} is the spatial neighborhood of point 1, which is the transaction in the spatial database.
The definitions are presented as follows.
Definition 6 [28]. Given the formal context F = (U, A, R), the support of any concept C = (E, I) is Definition 7 [28]. Given frequent threshold ρ, concept C = (E, I) is called frequent if and only if {a}, {b}, and {c} are 1-itemsets and {a, b}, {b, c} are 2-itemsets in Figure 1. If the minimum support degree is set to 30%, the 2-itemset {a, b} appears three times, but the formal context has six objects, so the support degree is 50% greater than the minimum support degree; thus, the 2-itemset {a, b} can be called a frequent itemset. The spatial partition has generally been used in previous methods to produce a series of transactions in the spatial database, resulting in a different set of items, through the iterative method of layer-by-layer search, scanning the itemset of each item to facilitate using an Apriori algorithm. The algorithm of the scanning itemset can get six 1-itemsets, 15 2-itemsets, 20 3-itemsets, 15 4-itemsets, and six 5-itemsets, for a total of 62 itemsets in Figure 1. If the minimum support degree is set to 0.3, then it can get 18 frequent itemsets in Figure 1.
The relation of the concept lattice is two mappings between the object sets and the attribute sets, which can be defined as a closed operation γ = α · β = β(α(l)); for itemset l, the closed operation γ(l) represents the largest itemset that contains all objects the itemset l has. For frequent itemset l, if γ(l) = l, then the itemset is a closed itemset; if it meets greater than the minimum support degree, then the itemset is a frequent closed itemset. A closed itemset refers to an itemset for which the support count of its direct super set is not equal to its own support count. The occurrence count of itemset {e, f} is 2, but the occurrence count of the direct super set {b, d, e, f}, {c, e, f} of itemset {e, f} is 1, which is not equal to the occurrence count of itemset {e, f}, so the itemset {e, f} is a closed itemset; if the minimum support degree is set to 30%, the itemset {e, f} is also a frequent closed itemset. The occurrence count of itemset {a, b} is 3, but the occurrence count of super item {a, b, c} for itemset {a, b} is 3, so the itemset {a, b} is not a closed itemset.

Spatial Association Rule
Each concept lattice node is essentially a maximum itemset; it provides a platform for the mining of association rules, which embodies the inclusion and classification of concepts. Because the rule itself is described by the relation between the intent of the concept lattice, while it represents the including and included relations between the extent of the concept lattice, so the concept node unifies the relationship between the intent and extent of the concept lattice. The association rule is generally denoted as X → Y , where the left itemset X is the prerequisite condition, and the right itemset Y is the corresponding association result, which is used to represent the implied association in the data. For example, the association rule {hotel → cake shop} represents that the two spatial entities of the hotel and cake shop have a certain degree of association and aggregation.
As for the strength of the spatial association, for example, which is the higher degree of aggregation between hotel and cake shop, snack shop or private restaurant? It is expressed by the association analysis of the two core concepts of support degree and confidence degree. For example, there are 10,000 spatial service entities, including 1000 hotels, 2000 cake shops, and 500 private restaurants, and there are 800 hotels spatially associated with cake shops and 100 hotels spatially associated with private restaurants. Support degree [8]: The probability of the occurrence of all the itemsets {X, Y}, that is, the probability of X and Y occurring at the same time.
In general, a minimum threshold (minsup, Minimum Support) is set to eliminate the spatial position association rule with a low appearance ratio to reserve the more frequent rules of closed itemsets. Spatial association rules are generated on the basis of frequent closed itemsets, so the support degree is equal to the frequent closed itemsets. In the above specific spatial service entity data, the minimum threshold is assumed to be 5% due to the support of {hotel, cake shop} being 800/10,000 = 8%, but the support of {hotel, private restaurant} is 100/10,000 = 1%, so the frequent closed itemset {hotel, cake shop} meets the basic support requirements, and it is a spatial closed frequent itemset; then, the spatial association rule hotel → cake shop and cake shop → hotel are reserved at the same time, but the two spatial association rules of the spatial itemset {hotel, private restaurant} are eliminated.
Confidence degree [8]. The probability that the associated result Y occurs under the condition of occurrence that the prerequisite condition X of association rule, that is, it is the possibility of Y when it has X in an itemset at the same time.
The confidence degree is the second threshold for generating strong association rules, and a minimum threshold (mincon, Minimum Confidence) is required to continue filtering. In the above-mentioned context, when the minimum threshold is 70%, the confidence degree of the rule hotel → cake shop is 800/1000 = 80%, but the confidence degree of the rule cake shop → hotel is 800/2000 = 40%; then, the rule hotel → cake shop is reserved, and the rule cake shop → hotel is eliminated.

Frequent Closed Itemset Discovery
The node of the concept lattice corresponds to the itemset in the association analysis, and the following conclusions can be drawn from the characteristics of frequent closed itemsets and the concept lattice: (1) Each node of the concept lattice is a closed itemset, but it is not necessarily a frequent closed itemset.
(2) All intent sets of the concept lattice are equal to a collection of closed itemsets that can be derived from a spatial transaction database. (3) Frequent closed itemsets can filter out redundant information in frequent itemsets. This not only can determine the frequency information of all frequent itemsets, but is also several orders of magnitude smaller than frequent itemsets.
To obtain the concept lattice from the formal context, the following operational definition is needed.
Definition 8 [29]. Given a formal context F = (U, A, R), we can define operations on object sets X ⊆ U and attribute sets B ⊆ A as X * = {a |a ∈ A, ∀x ∈ X, xRa}; A total of 15 closed itemsets from the above definitions are obtained, the minimum support degree is also set to 0.3, and 10 frequent closed itemsets can be obtained. Along with the increase in the number, frequent closed itemsets are orders of magnitude smaller than frequent itemsets without losing all the frequency information of frequent itemsets and thus can produce spatial association rules. It is listed in detail in Figure 2 and Table 1.  The frequent closed itemsets discovery algorithms have been designed based on the concept of the concept lattice and frequent closed itemsets, and the detailed algorithms are seen in Algorithm 1 and Algorithm 2. The inputs of Algorithm 1 are included: the given formal context F T is transposed from F, and frequent threshold value ρ, the outputs are all frequent closed itemsets and the partial order relationship between them, and these partial order relationships are generated by Algorithm 2. Newly added attributes will create new concepts; to guarantee the uniqueness of the new concept, Algorithm 1 introduces two conditions: (1) the extent of all concepts except concept C are not equal to C; and (2) the intersection of all the extents of parent concepts and E({a}) is not equal to C. When the two conditions are met simultaneously, the algorithm will produce a new frequent concept C * = (C(I) ∪ {a}, C).
Remove the edge/relationship between C * and C if C(E) ⊆ C (E); 12. ENDFOR 13.
Remove the edge/relationship between C * and C if C(E) ⊆ C (E); 15. ENDFOR 16.
Remove the edge/relationship between C and C if C ∈ C.children or C ∈ C .parent; 19. ENDFOR

Spatial Association Rule Discovery
Once the spatial frequent closed itemsets are mined, spatial association rules can be directly generated by these itemsets that are greater than the minimum support degree and minimum confidence degree; the specific production process is as follows: • For each frequent closed itemset, all of the non-empty subsets l are generated; The minimum support degree is 50% and the minimum confidence degree is 75% in Figure 1, and then all association rules from frequent closed itemsets can be obtained in Table 2. It can be seen that there are fewer redundant rules than frequent itemsets. For example, the frequent itemset {a, b} is not a frequent closed itemset, but it appears in nodes {a, b} and {a, b, c}, so the rule a → b will be produced by these nodes at the same time, and there are redundant rules that will increase the computational burden. Table 2. Spatial association rules from frequent closed itemsets.

Rules
Support Confidence Rules Support Confidence The algorithms to derive all of the spatial association rules have also been designed based on the spatial frequent closed itemset FL, and the detailed processes are seen in Algorithm 3 and Algorithm 4.

Algorithm 3.
Generate Association Rules. Input: The set of association rules Longer-Rules( , );

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the entire set of confident association rules, the size of the resulted itemset should be increased. This process is implemented by Line 2 in Algorithm 4. In detail, given two itemsets with length m-1, their previous m-2 items being the same, and their last items being different, the two itemsets can be merged into one new itemset with length k. For example, {a, b, c} and {a, b, d} can be merged into {a, b, c, d} (m = 4). For each of the frequent closed itemsets (concepts) in , there is a recursive procedure, that is, the next itemset is processed after all of the confident rules are derived from the current itemset. There is a condition |C| ≥ 2 in line 2 of Algorithm 3 because the rule cannot be generated when the number of attributes is 1.

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the entire set of confident association rules, the size of the resulted itemset should be increased. This process is implemented by Line 2 in Algorithm 4. In detail, given two itemsets with length m-1, their previous m-2 items being the same, and their last items being different, the two itemsets can be merged into one new itemset with length k. For example, {a, b, c} and {a, b, d} can be merged into {a, b, c, d} (m = 4). For each of the frequent closed itemsets (concepts) in , there is a recursive procedure, that is, the next itemset is processed after all of the confident rules are derived from the current itemset. There is a condition |C| ≥ 2 in line 2 of Algorithm 3 because the rule cannot be generated when the number of attributes is 1. FOR (each concept C ∈ FL and |C| ≥ 2) DO 3.

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the entire set of confident association rules, the size of the resulted itemset should be increased. This process is implemented by Line 2 in Algorithm 4. In detail, given two itemsets with length m-1, their previous m-2 items being the same, and their last items being different, the two itemsets can be merged into one new itemset with length k. For example, {a, b, c} and {a, b, d} can be merged into {a, b, c, d} (m = 4). For each of the frequent closed itemsets (concepts) in , there is a recursive procedure, that is, the next itemset is processed after all of the confident rules are derived from the current itemset. There is a condition |C| ≥ 2 in line 2 of Algorithm 3 because the rule cannot be generated when the number of attributes is 1.

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the entire set of confident association rules, the size of the resulted itemset should be increased. This process is implemented by Line 2 in Algorithm 4. In detail, given two itemsets with length m-1, their previous m-2 items being the same, and their last items being different, the two itemsets can be merged into one new itemset with length k. For example, {a, b, c} and {a, b, d} can be merged into {a, b, c, d} (m = 4). For each of the frequent closed itemsets (concepts) in , there is a recursive procedure, that is, the next itemset is processed after all of the confident rules are derived from the current itemset. There is a condition |C| ≥ 2 in line 2 of Algorithm 3 because the rule cannot be generated when the number of attributes is 1.  Longer-Rules(C, H 1 );

ENDFOR
The inputs include the frequent closed itemsets FL and confidence threshold value δ in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than δ. The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the entire set of confident association rules, the size of the resulted itemset should be increased. This process is implemented by Line 2 in Algorithm 4. In detail, given two itemsets with length m-1, their previous m-2 items being the same, and their last items being different, the two itemsets can be merged into one new itemset with length k. For example, {a, b, c} and {a, b, d} can be merged into {a, b, c, d} (m = 4). For each of the frequent closed itemsets (concepts) in FL, there is a recursive procedure, that is, the next itemset is processed after all of the confident rules are derived from the current itemset. There is a condition |C| ≥ 2 in line 2 of Algorithm 3 because the rule cannot be generated when the number of attributes is 1.

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the

ENDFOR
The inputs include the frequent closed itemsets and confidence threshold value in Algorithm 3, and a rule is confident when and only if its confidence degree is not less than . The basic idea of the algorithm also consists of two steps, namely, it generates a confident rule with a "result" length of 1 and then generates the other rules with longer "result" lengths. First, "result" is denoted as the latter part of an association rule. Hence, they are actually the subset of an itemset. Second, the length of "result" is one means by which the corresponding itemset (i.e., the latter part of an association rule) only contains one item. Third, because the purpose of our work is to obtain the Call Generate-Rules(C, H 1 ); 11. ENDFOR 12. ENDIF

Research Area and Data Sources
To verify the practicability of this approach, this paper studies the association and aggregation of the urban service industry in Nanning city, China. Nanning is the capital of the Guangxi Zhuang Autonomous Region of China, the specific location is seen in Figure 3. The urban service industry of Nanning is very developed. A total of five categories, 88 small departments (https://nn.nuomi.com), and more than 13,000 information records with coordinates were obtained. On this basis, those with a number of records fewer than 10 were excluded, and a total of 68 departments and 12,739 spatial service entities were obtained.

Computing Framework
This study used Python crawler technology to obtain real-time spatial data of the urban service industry from the Baidu Nuomi website and established a spatial database of the Nanning service industry, including spatial location. In the ARC GIS platform, the spatial data of the urban service industry in the case area were converted into a neighborhood table by the near operation based on the linear distance neighborhood. To mine and calculate the concept lattice, we used SQL technology to transform the spatial neighborhood table of the service industry into the spatial formal context of the service industry composed of 0 and 1. Using Algorithms 1 and 2, the spatial association concept and frequent closed itemsets of the Nanning service industry were mined on the basis of spatial formal context. The spatial association rules of the urban service industry were mined by Algorithms 3 and 4 on the basis of frequent closed itemsets. According to the frequent closed itemsets and spatial association rules of the service industry, we analyzed the spatial association characteristics of the service industry in Nanning and compared superiority and applicability with other mining methods. The specific process is seen in Figure 4.

Results Analysis
Four distance thresholds of 10 meters, 50 meters, 100 meters, and 200 meters were tested. Due to space reasons, the following only discusses the case of the distance threshold of 100 meters. The minimum support degree for designing frequent closed itemsets was 0.1 in this study. The following Table 3 lists the top 20 frequent 2-frequent closed itemsets and frequent 3-frequent closed itemsets arranged in descending order of support. Table 3. Top 20 2-frequent closed itemsets and 3-frequent closed itemsets of the urban service industry in Nanning city, China.  The snack food appears in many frequent closed itemsets with high ordering, as can be seen from Table 3, and the frequency is also very high in other distance thresholds. This shows that snack food is a type of popular consumption entity store, which is distributed around various industries. The snack food industry in Nanning does not have the characteristics of being aggregated with other industries. However, through the distance threshold analysis of 10 meters, 50 meters, and 100 meters, the popular consumption hotels in Nanning have the characteristic of compact layout, which shows that the practitioners of the popular consumption type of hotel industry in Nanning are interested in the layout of the competitors, thus improving the passenger flow and forming the spatial aggregation of the regional industry brand. Similarly, many cognitive rules can be summed up; for example, we can see that the support degree of the 2-frequent closed itemset is higher than that of the 3-frequent closed itemset in the results because the probability of 2 types of industries in one place is greater than the probability of having 3 types of industries, which is also in line with our cognition.

2-itemsets Support
The top 30 spatial association rules based on frequent closed itemsets in Nanning are listed in the following Table 4. The snack food appears in the left-hand items and right-hand items of the many rules with high support degrees, which can also be seen in Table 4, and from the other side, the snack food industry in Nanning does not have obvious spatial aggregation with a specific industry. However, for the hotel industry, it is obvious that there are two rules: {General Hotel} → {Budget Hotel} and {General Hotel} → {Budget Hotel}. The support is 0.306, and the confidence degrees are 1 and 0.764, respectively, which illustrates the compact layout of the popular consumption type hotel industry in Nanning.

Methods of Evaluation
We can find the spatial association of the urban service industry using a quantitative method. Spatial association research is on the basis of frequent itemsets in the past. The frequent itemsets algorithm represented by the Apriori algorithm has already had mature computing packages in the mainstream computing languages and has many commercial applications, which proved the strong application requirement of the association problem. However, these algorithms are not designed to solve spatial problems, and each association rule-mining algorithm has its own application scope. For the mining process based on frequent itemsets, due to the number of scanning instances, the length of itemsets in the R language calculation package must be specified before it can be calculated.
The concept of frequent closed itemsets based on the concept lattice is proposed, and the concept lattice is used as the basic data structure of formal concept analysis. Each concept lattice node can be treated as a closed itemset. With the increase of the number, the frequent closed itemsets are more frequent than the frequent itemsets. The frequent closed itemsets are orders of magnitude smaller but do not lose the frequency information of all frequent itemsets, and they can also generate spatial association rules.
Four distance thresholds of 10 meters, 50 meters, 100 meters, and 200 meters were tested in the case area, and the results of various distance thresholds are similar to those of the Arules package based on the Apriori algorithm in the R language. Both the itemsets and closed itemsets based on the concept lattice are huge, and it is not necessary to calculate all closed itemsets. We carried out the calculation of all closed itemsets within six items for the case area and thus compared the results with the Apriori algorithm. The minimum support degree for designing frequent itemsets and frequent closed itemsets is 0.1, and the Apriori algorithm generates 4111 frequent itemsets, including 291 2-frequent itemsets and 882 3-frequent itemsets. This method generates 3660 frequent closed itemsets, including 264 2-frequent closed itemsets and 789 3-frequent closed itemsets. The support degree value and the order of the frequent closed itemsets in order of support of this method were consistent with the Apriori algorithm in the case study, and this method has a slight advantage over the operation time cost of the length of the specified itemsets. The spatial association rules that are generated by frequent itemsets and frequent closed itemsets are the same. The time spent on rule generation will be small only because the number of closed itemsets is reduced. The lattice miner software (https://sourceforge.net/projects/lattice-miner/) can calculate all closed itemsets, but the computation time was two weeks for the 100 meters threshold, and the rules cannot be customized. The computation time of this method is one week for all closed itemsets.

Spatial Association Discovery
Through the research of this paper, we found that the physical stores of the service industry were scattered in every corner of the city, and there was a certain spatial association between them in the spatial distribution. Through the association analysis, we can find a spatial aggregation and association between service industries. Spatial association discovery can play an important role in service industry layout, location, and location-based service store recommendation. The spatial association support degree of the service industry will decrease with the increase of the distance threshold. In the city service industry of Nanning, the hotel industry has the characteristic of a compact layout, which shows that all types of mass consumption hotels gather together to form the brand spatial aggregation effect. In different distance thresholds, as a type of mass consumption entity store, snack shops are distributed around various industries, with no clustering characteristics with other industries.

Limitations and Recommendations for Future Research
The data source in the study was the open information of the Baidu Nuomi website, which could have real-time massive data. Because the user registration was the business itself, not a qualified surveying and mapping company, the spatial coordinate accuracy of the data source was not necessarily guaranteed. Although the data of the study crawled all of the data of the case area in the website, it did not include all of the types of urban service industry and could not summarize all of the associations of the service industry in the case area. In this study, only the software and algorithm of frequent closed itemsets and association rules were implemented, and the transformation of spatial formal text was not implemented in the software.
In terms of future research needs, the software cannot achieve the generation of the association rules of the specified left-hand side item or right-hand side item, and the concise solution of the association rules based on reduction and the visual expression of the results of the itemset and association rules will be our next step.

Conclusions
In this paper, the authors proposed a spatial association framework for the urban service industry based on the concept lattice. The process of spatial data mining could be understood as the process of forming concepts and producing knowledge from spatial databases through the learning of large amounts of data. Based on the concept of frequent closed itemsets and the concept lattice, an incremental algorithm for spatial frequent closed sets and a spatial association rule algorithm were designed based on frequent closed itemsets. Finally, the algorithm was implemented, and the software was created. The algorithm and software verification was carried out on the problem of spatial association and aggregation of the urban service industry in Nanning, Guangxi, China. The method proposed in this paper was the extension of the concept lattice in spatial computing and urban computing. It could enrich the application scope of the concept lattice and could also consolidate the mathematical foundation of spatial computing, which was an exploration of the geospatial computing methodology.

Conflicts of Interest:
The authors declare no conflicts of interest.