Method and device for processing city-wide data
By constructing interconnected relationships between city-wide data across spatial and attribute dimensions and utilizing knowledge graph technology, the problem of fragmented city-wide data was solved, enabling deep data integration and rapid retrieval, thereby improving data quality and query efficiency.
Patent Information
- Application Number
- CN202210943654.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-08-08
AI Technical Summary
In existing technologies, the failure to intelligently construct data relationships across the entire city results in data fragmentation, which limits the breadth and depth of data value discovery and information retrieval.
By introducing the concept of knowledge graphs, we construct the connectivity of urban data across the entire city by linking multi-source data at the table level in terms of spatial and attribute dimensions. We then use geospatial data as a hub to achieve seamless data fusion and association, thus establishing an urban knowledge graph.
It enables rapid retrieval and display of city-wide data, improves data quality and query efficiency, breaks down barriers between data, and achieves deep data integration and value discovery.
Smart Images

Figure CN115374198B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of urban data processing, and particularly relates to a processing method and device for urban global data. BACKGROUND
[0002] With the in-depth application of various technologies such as Internet of Things, big data, cloud computing, etc. in the field of city, multi-source data such as urban Internet of Things sensing and government affairs sensing is continuously gathered and accumulated, which drives the process of urban intelligent construction to pay more and more attention to the construction of big data platform. Target, China's major cities (municipalities, provincial capitals, vice-provincial cities) have basically built unified government affairs sharing and exchange platforms, and some major cities are starting or promoting the construction of city-level big data platforms.
[0003] The city-level big data platform mainly uses data gathering technology to break through the barriers of complex network environments under different physical domains, security domains and management domains, and aggregates the originally scattered multi-source data together. Although data gathering work realizes data interconnection under different network environments, the obtained urban original public data still has problems of scattered data and low quality, and it is urgent to improve data quality through data governance, extract key information, and on this basis, break through the barriers between data and realize global data connection.
[0004] Therefore, how to deeply integrate and govern the massive multi-source urban global data has become a technical problem to be solved. SUMMARY
[0005] The purpose of the present application is to provide a processing method and device for urban global data, which is used for deeply integrating urban global data in different fields and associating them with corresponding spatial elements, so as to realize quick retrieval and display of related data.
[0006] The present application provides a processing method for urban global data, comprising:
[0007] obtaining first urban data and performing data spatialization processing on the first urban data; obtaining second urban data having an association relationship with a target spatial element; selecting target urban data from the second urban data and associating the first urban data with the target urban data; wherein the data spatialization processing is used to associate the first urban data with a corresponding spatial element; the target urban data and the first urban data have a content-associated attribute field; the target spatial element is a spatial element associated with the first urban data; and the target spatial element comprises at least one spatial element.
[0008] Optionally, the data spatialization processing of the first city data comprises: in a case where the first city data contains spatial coordinate information, associating the first city data with a spatial element related to the spatial coordinate information according to the spatial coordinate information.
[0009] Optionally, the data spatialization processing of the first city data comprises: in a case where the first city data does not contain spatial coordinate information, performing semantic analysis on text content contained in the first city data and generating a semantic analysis result; determining the target spatial element related to the first city data according to the semantic analysis result and associating the first city data with the target spatial element.
[0010] Optionally, the filtering of the target city data from the second city data and the association of the first city data with the target city data comprise: performing normalization processing on the first city data according to attributes of content contained in each field of the first city data and performing semantic labeling on the fields in the first city data.
[0011] Optionally, after the normalization processing of the first city data according to the attributes of content contained in each field of the first city data and the labeling of the fields contained in the first city data, the method further comprises: performing similarity calculation on the labeled content of each field in the first city data and the labeled content of each field in the second city data to determine the target city data; wherein a text similarity degree of the labeled content of a first field of the target city data and the labeled content of a second field of the first city data satisfies a preset similarity degree.
[0012] Optionally, the similarity calculation on the labeled content of each field in the first city data and the labeled content of each field in the second city data to determine the target city data comprises: obtaining first labeled content of the first field and second labeled content of the second field and performing word segmentation processing on the first labeled content and the second labeled content respectively; calculating a first feature vector of the first labeled content and a second feature vector of the second labeled content based on the segmented first labeled content and the segmented second labeled content; calculating an Euclidean distance between the first labeled content and the second labeled content according to the first feature vector and the second feature vector; calculating a text similarity degree between the first labeled content and the second labeled content according to the Euclidean distance between the first labeled content and the second labeled content; and determining that the content corresponding to the first field and the content corresponding to the second field have relevance in a case where the text similarity degree of the first labeled content and the second labeled content satisfies a preset similarity degree.
[0013] Optionally, the method further comprises: establishing a knowledge triple among the categories of spatial elements based on a spatial position correlation relationship between different spatial elements; wherein the spatial position correlation relationship is used to indicate a spatial position relationship between two spatial elements; the spatial position correlation relationship comprises: a containing relationship, an adjacent relationship, and an intersecting relationship; and the knowledge triple comprises: a spatial position correlation relationship between spatial elements of the same type and a spatial position correlation relationship between spatial elements of different types.
[0014] Optionally, after the establishing of the knowledge triple among the categories of spatial elements based on the spatial position correlation relationship between different spatial elements, the method further comprises: constructing a city knowledge graph based on the city data associated with each spatial element, the correlation relationship between the city data, and the knowledge triple; wherein the city knowledge graph is used to count city state data based on spatial elements.
[0015] Optionally, after the constructing of the city knowledge graph based on the city data associated with each spatial element, the correlation relationship between the city data, and the knowledge triple, the method further comprises: displaying a target interface based on the city knowledge graph; and in response to a target operation of selecting a target region and a target function by a user, displaying statistical data associated with the target function and contained in a target element corresponding to the target region.
[0016] The application also provides a processing device for city global data, comprising:
[0017] an acquisition module configured to acquire first city data; a data processing module configured to perform data spatialization processing on the first city data; the acquisition module is further configured to acquire second city data having a correlation relationship with a target spatial element; and a data correlation module configured to filter target city data from the second city data and correlate the first city data with the target city data; wherein the data spatialization processing is used to correlate the first city data with corresponding spatial elements; the target city data and the first city data have a content-related attribute field; the target spatial element is a spatial element associated with the first city data; and the target spatial element comprises at least one spatial element.
[0018] Optionally, the data processing module is specifically configured to, in a case where the first city data contains spatial coordinate information, correlate the first city data with spatial elements related to the spatial coordinate information according to the spatial coordinate information.
[0019] Optionally, the apparatus further comprises an analysis module, configured to perform semantic analysis on text content contained in the first city data and generate a semantic analysis result, in a case where the first city data does not contain spatial coordinate information; and the data processing module is specifically configured to determine the target spatial element related to the first city data according to the semantic analysis result, and associate the first city data with the target spatial element.
[0020] Optionally, the apparatus further comprises a labeling module, configured to perform standardized processing on the first city data according to attributes of content contained in each field of the first city data, and perform semantic labeling on the fields in the first city data.
[0021] Optionally, the apparatus further comprises a calculation module and a determination module; the calculation module is configured to perform similarity calculation on labeled content of each field in the first city data and labeled content of each field in the second city data; and the determination module is configured to determine the target city data, wherein a text similarity degree of labeled content of a first field of the target city data and labeled content of a second field of the first city data satisfies a preset similarity degree.
[0022] Optionally, the acquisition module is further configured to acquire first labeled content of the first field and second labeled content of the second field; the data processing module is specifically configured to perform word segmentation processing on the first labeled content and the second labeled content, respectively; the calculation module is specifically configured to calculate a first feature vector of the first labeled content and a second feature vector of the second labeled content based on the segmented first labeled content and the segmented second labeled content; the calculation module is specifically further configured to calculate an Euclidean distance between the first labeled content and the second labeled content according to the first feature vector and the second feature vector; the calculation module is specifically further configured to calculate a text similarity degree between the first labeled content and the second labeled content according to the Euclidean distance between the first labeled content and the second labeled content; and the determination module is further configured to determine that content corresponding to the first field and content corresponding to the second field have relevance, in a case where the text similarity degree of the first labeled content and the second labeled content satisfies a preset similarity degree.
[0023] Optionally, the apparatus further comprises a constructing module, configured to establish a knowledge triple among spatial element categories based on spatial position correlation relationships among different spatial elements; wherein the spatial position correlation relationship is used to indicate a spatial position relationship between two spatial elements; the spatial position correlation relationship comprises a containing relationship, an adjacent relationship, and an intersecting relationship; and the knowledge triple comprises a spatial position correlation relationship among spatial elements of the same type and a spatial position correlation relationship among spatial elements of different types.
[0024] Optionally, the constructing module is further configured to construct a city knowledge graph based on the city data associated with each spatial element, the correlation relationships among the city data, and the knowledge triple; wherein the city knowledge graph is used to count city state data based on spatial elements.
[0025] Optionally, the apparatus further comprises a display module and an operation module; the display module is configured to display a target interface based on the city knowledge graph; and the operation module is configured to display statistical data associated with a target function and contained in a target element corresponding to a target region in response to a target operation of a target function selected by a user.
[0026] The present application also provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the city global data processing method according to any one of the above.
[0027] The present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the city global data processing method according to any one of the above when executing the program.
[0028] The present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the city global data processing method according to any one of the above.
[0029] The city global data processing method and apparatus provided by the present application can associate city global data in different fields according to spatial elements and attributes, facilitating the query and statistics of city data. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0031] Figure 1 is a flowchart of the processing method of the urban global data provided by the present application;
[0032] Figure 2 is an example of the data graph visualization table based on the data connection relationship table provided by the present application;
[0033] Figure 3 is an interface diagram of the target interface constructed based on the urban knowledge graph provided by the present application;
[0034] Figure 4 is a structural diagram of the processing device of the urban global data provided by the present application;
[0035] Figure 5 is a structural diagram of the electronic device provided by the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely in the following with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.
[0037] The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, not to describe a particular order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" and the like are usually a class, not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally means that the front and rear associated objects are in an "or" relationship.
[0038] In view of the technical problems in the related art, the embodiment of the present application aims to solve the problem of how to establish the connection relationship of city-wide data, introduces the idea and technical means of knowledge graph, extracts the table-level association and entity relationship of city multi-source data in two dimensions of space and attribute, and constructs a graph organization mode which can reasonably and intuitively visually express the connection relationship of city-wide data, and the main representation form of the graph organization mode is knowledge triple.
[0039] In the current smart city data platform construction and other fields, although data is aggregated, if the massive data aggregated cannot intelligently construct the association relationship between data and data, these data are still independent and cannot provide more extensive and deep search results for city information query, which limits the value exploration of data. However, city data in two dimensions of space and attribute actually has natural connection.
[0040] Specifically, first, the association relationship between city data tables needs to be established, and then the city object entity information is extracted and stored according to the association relationship between data tables to form an organization and management mode of city-wide data connection. When extracting the association relationship between city data tables, since geographic spatial data naturally has two contents of geometric spatial graph and attribute information table, therefore, taking geographic spatial data as the pivot, the spatial knowledge and attribute knowledge of city elements can be seamlessly associated. Therefore, the association relationship construction of city-wide data can mainly start from two aspects of spatial association and attribute association.
[0041] The processing method of city-wide data provided by the embodiment of the present application will be described in detail in combination with the drawings, specific embodiments and application scenarios.
[0042] As shown in the figure, Figure 1 The processing method of city-wide data provided by the embodiment of the present application can include the following steps 101 to 103:
[0043] Step 101, acquiring first city data and performing data spatialization processing on the first city data.
[0044] The data spatialization processing is used to associate the first city data with corresponding spatial elements.
[0045] It can be understood that city-wide data involves various data contents, including geographic spatial data, sensor data and various public service data, and there are association relationships between these data in geographic space and attribute information, such as: a city plot (which can be expressed by geographic spatial elements, including geometric graph and attribute table) contains multiple buildings, and the buildings contain multiple enterprises, which is a kind of association relationship in geographic space.
[0046] Exemplarily, the first city data is city-wide data, i.e., data generated by any field in the city during normal operation. In order to be able to associate city data in different fields, the embodiment of the application associates city data in different fields with spatial elements to associate city data generated in different fields in the first level.
[0047] Exemplarily, the first city data includes at least one city data, for example, the first city data can be real-time data generated in a certain field, or a plurality of data stored in a database in a certain field for a period of time.
[0048] It should be noted that the city data in the embodiment of the application is data stored in accordance with the database storage format. That is, the first city data exists in the form of a database table (data table).
[0049] Exemplarily, after obtaining the first city data, the target spatial element related to the first city data can be determined through the information carried by the first city data. The target spatial element can be one or more spatial elements in the city spatial element. The city spatial element can include plots, roads, buildings, etc.
[0050] Specifically, the corresponding spatial element can be determined by performing location analysis on the information carried by the first city data, i.e., the step 101 can include the following step 101a:
[0051] Step 101a, in the case where the first city data contains spatial coordinate information, the first city data is associated with the spatial element related to the spatial coordinate information according to the spatial coordinate information.
[0052] Exemplarily, for spatial city data, the attribute table thereof contains point coordinates of data objects, for example, geographic coordinates (x, y) of the location of an Internet of Things device. For such data, a spatial point file data can be generated according to the coordinate point pair by directly using a geographic information system (GIS) related software.
[0053] It should be noted that the relationship between the point corresponding to the above spatial coordinate information and the nearby spatial element can include: adjacent, intersecting, containing, etc. Due to the existence of errors, it can not be determined according to the above spatial coordinate information which spatial element the first city data belongs to, therefore, when determining the spatial element related to the first city data according to the above spatial coordinate information, if the specific spatial element cannot be determined, all spatial elements having adjacent, intersecting or containing relationship with the above point can be associated. Then, according to the specific data matching result, the spatial element to which the first city data belongs is determined.
[0054] Specifically, the corresponding spatial element of the first city data can also be determined by performing semantic analysis on the information carried by the first city data, that is, the above step 101 can include the following step 101b1 and step 101b2:
[0055] Step 101b1, in the case that the first city data does not contain spatial coordinate information, performing semantic analysis on the text content contained in the first city data and generating a semantic analysis result.
[0056] Step 101b2, determining the target spatial element related to the first city data according to the semantic analysis result, and associating the first city data with the target spatial element.
[0057] Exemplarily, for non-spatial data, the attribute table contains the name and address information of the data object, for example: a certain enterprise is located at *** city ** road ** room, therefore, by comparing the city name and address library, the spatial information of the matched name and address data in the library can be assigned to the corresponding city object, and then the spatial data file is generated.
[0058] Exemplarily, after obtaining the spatial point file data corresponding to the first city data, or the spatial data file, the target spatial element associated with the first city data can be determined.
[0059] For example, the first data is the tax payment information of a certain enterprise, after the enterprise completes the tax payment, the system can determine the enterprise address according to the enterprise information of the enterprise, and associate the tax payment information with the building or land corresponding to the enterprise address.
[0060] Step 102, obtaining second city data having an association relationship with the target spatial element.
[0061] The target spatial element is a spatial element associated with the first city data; the target spatial element includes at least one spatial element.
[0062] Exemplarily, the above-mentioned association relationship can include a direct association relationship and an indirect association relationship, that is, the above-mentioned second city data can be city data having a direct association relationship with the target spatial element, or can be city data having an indirect association relationship with the target spatial element.
[0063] For example, taking the above-mentioned target spatial element as a target building as an example, the second city data can include building information of the target building, can also include enterprise information of a target enterprise in the target building, and can further include enterprise information of an enterprise legal person of the target enterprise and relative information of the enterprise legal person, and the like.
[0064] Exemplarily, after the above-mentioned first city data is associated with the target spatial element, the first city data also needs to be associated with the city data associated with the target spatial element.
[0065] It can be understood that, for a building, not only includes building basic information (such as: building name, building code, land area, etc.), but also includes building energy consumption information (such as: building water consumption, power consumption, etc.), and the two types of information are usually from different systems and stored in different data tables after data aggregation; obviously, these different data tables all contain the description of the building object, and therefore have an association relationship in attribute.
[0066] Step 103, screening target city data from the second city data, and associating the first city data with the target city data.
[0067] Among them, the target city data and the first city data have content-associated attribute fields.
[0068] Exemplarily, in order to associate the data with the same attribute or category, first, all city data associated with the target spatial element need to be obtained, and the first city data is respectively matched with each city data in feature.
[0069] Specifically, the above-mentioned step 102 can include the following step 102a:
[0070] Step 102a, according to the attribute of the content contained in each field in the first city data, normalizing the first city data, and performing semantic annotation on the fields in the first city data.
[0071] It can be understood that, due to different formats of stored data and different naming methods between different fields, the city data generated between different fields cannot be directly associated, and needs to be matched according to the information contained in the city data. However, based on the existing data storage method, it can not be possible to directly identify the category or attribute information of the city data through the information contained in the city data. At this time, the fields of the city data need to be labeled.
[0072] Exemplarily, for the second city data described above, since the association between different city data has been completed, when performing the table-level attribute association on the first city data described above, the labeling of the fields does not need to be repeated again (the labeling of the fields has been performed according to the method in the step 102a described above).
[0073] Exemplarily, after the labeling of the fields of the first city data described above, the target city data associated with the first city data can be screened from the second city data according to the labeling content of the fields.
[0074] Specifically, after the step 102a described above, the step 102 can further include the following step 102b:
[0075] The step 102b, performing natural language analysis on the labeling content of each field in the first city data and the labeling content of each field in the second city data, and determining the target city data.
[0076] The similarity between the labeling content of the first field of the target city data and the labeling content of the second field of the first city data meets a preset similarity.
[0077] It should be noted that, after the association of the city data between different fields, the city data can be stored separately according to the content having relevance. Meanwhile, the first city data can be associated with one or more city data.
[0078] Exemplarily, before labeling the fields of the city data, a corpus needs to be created, that is, it needs to be determined which content the fields can be labeled as.
[0079] Exemplarily, before the step 102 described above, the city global data processing method provided by the embodiment of the present application can further include the following step S1
[0080] S1, obtaining a target data set.
[0081] The target data set includes a plurality of city data.
[0082] S2, segmenting any target data in the target data set, dividing the city data in the target data set into multiple phrases, and performing deduplication processing.
[0083] S3, constructing a phrase set according to the phrases after deduplication.
[0084] Exemplarily, after obtaining the above phrase set, the city data that needs to be associated and matched can be labeled based on the phrase set.
[0085] For example, the following is the building basic information table shown in Table 1 and the enterprise basic information table shown in Table 2:
[0086] Field name Label content ID Building code Name Building name Area Building area …… ……
[0087] Table 1
[0088] Field name Label content ID Enterprise code Name Enterprise name B_Name Enterprise name of building …… ……
[0089] Table 2
[0090] The basic information of the building a is stored in the format of the data table shown in Table 1, and the basic information of the enterprise a is stored in the format of the data table shown in Table 2. According to the field name, the true meaning of the content corresponding to each field cannot be determined, so it is necessary to label the fields to clearly indicate the attribute information of the content stored in each field.
[0091] Exemplarily, after completing the labeling of the above first city data, the text similarity between the labeled contents of the fields of different city data can be calculated by using a natural language processing (NLP) text matching method.
[0092] Exemplarily, there are many natural language processing text matching methods, and such methods can be used to calculate the text similarity between table fields. The higher the similarity of the text description of two table fields, the greater the possibility of associating the two tables based on the two fields.
[0093] Text similarity calculation mainly includes the following steps: first, text segmentation (such as using "n-gram language model", "word segmentation", "syntax analysis", etc.), then feature construction of the text, that is, using numerical vectors to describe the position of the text in the semantic space (this step can be skipped in some specific methods), such as TF, TF-IDF, Simhash, etc. methods; again, use different methods (such as Euclidean distance, cosine distance, Hamming distance, minimum edit distance) to measure the relative distance of different text feature vectors in the semantic space, thereby calculating the text similarity.
[0094] Specifically, after the step 102b, the step 102 can further include the following step 102c.
[0095] The step 102c performs similarity calculation on the annotation content of each field in the first city data and the annotation content of each field in the second city data to determine the target city data.
[0096] The similarity between the annotation content of the first field of the target city data and the annotation content of the second field of the first city data meets a preset similarity.
[0097] For example, after calculating the similarity between the two annotation contents, if the similarity is greater than a similarity threshold, it can be determined that the two city data corresponding to the two annotation contents have relevance.
[0098] Specifically, the method of similarity calculation in the step 102c can include the following steps 102c1 to 102c5.
[0099] The step 102c1 obtains the first annotation content of the first field and the second annotation content of the second field, and performs word segmentation processing on the first annotation content and the second annotation content, respectively.
[0100] The step 102c2 calculates a first feature vector of the first annotation content and a second feature vector of the second annotation content based on the first annotation content after word segmentation and the second annotation content after word segmentation.
[0101] The step 102c3 calculates the Euclidean distance between the first annotation content and the second annotation content according to the first feature vector and the second feature vector.
[0102] The step 102c4 calculates the text similarity between the first annotation content and the second annotation content according to the Euclidean distance between the first annotation content and the second annotation content.
[0103] The step 102c5 determines that the content corresponding to the first field and the content corresponding to the second field have relevance in the case that the text similarity between the first annotation content and the second annotation content meets a preset similarity.
[0104] It should be noted that the relevance between the target city data and the first city data means that the content corresponding to the first field of the target city data and the content corresponding to the second field of the first city data are associated. The associated data can be stored in the database.
[0105] For example, the Name field in the building basic information table and the Name field and the B_Name field in the enterprise basic information table are taken as examples to calculate the text similarity. The following three texts are input: String 1: building name; String 2: enterprise name; and String 3: enterprise building name.
[0106] Step 1, text segmentation: taking the bigram model in the n-gram language model method as an example, the text is segmented String 1: building, building, building name, name String 2: enterprise, enterprise name, name String 3: enterprise, enterprise, enterprise, enterprise, building, building, building name, name.
[0107] Step 2, feature construction: according to the above text segmentation result, taking the bag-of-words model as an example, a corpus is constructed, that is: {building, building, building name, name, enterprise, enterprise name, enterprise, enterprise, enterprise, building, building, building name, name} The feature vectors of the three texts are: the feature vector of String 1 is (1, 1, 1, 1, 0, 0, 0, 0, 0), the feature vector of String 2 is (0, 0, 0, 1, 1, 1, 0, 0, 0), and the feature vector of String 3 is (1, 1, 1, 1, 1, 0, 1, 1, 1).
[0108] Step 3, distance measurement and similarity calculation: taking the text similarity calculation based on the Euclidean distance as an example, first calculate the Euclidean distance between any two texts:
[0109]
[0110]
[0111]
[0112] Dis 12 represents the Euclidean distance between String 1 and String 2; Dis 13 represents the Euclidean distance between String 1 and String 3; and Dis 23 represents the Euclidean distance between String 2 and String 3.
[0113] Then, the similarity between any two texts is calculated:
[0114]
[0115]
[0116]
[0117] Similarity (String 1, String 2) = 1 - Distance (String 1, String 2) / Max (String 1, String 2) 12 represents the text similarity of String 1 and String 2; Similarity 13 represents the text similarity of String 1 and String 3; Similarity 23 represents the text similarity of String 2 and String 3.
[0118] Finally, the Name field in the building basic information table has the highest correlation degree with the B_Name field in the enterprise basic information table, and the construction of the attribute association triple based on the association can be preferentially considered, that is, (Building1.Name ~ association ~ Enterprise.B_Name).
[0119] Exemplarily, after the similarity between the contents corresponding to the fields of different data tables is calculated through the above steps, it can be recorded in the form of a table, as shown in Table 3 below
[0120] Data table 1. Field n Data table 2. Field m Similarity
[0121] Table 3
[0122] Then, a value between 0 and 1 can be set as a similarity threshold value for identifying field pairs without substantial association relationship (less than the threshold value) and deleting in the above table, and finally obtaining a similarity table of data table fields. Based on the similarity table, the interconnection relationship between the data tables (identified by knowledge triple) is determined through manual identification and confirmation, that is, (data table 1. field n ~ attribute association ~ data table 2. field m).
[0123] It should be noted that in the embodiments of the present application, the above knowledge triple is used to establish the association relationship between different levels of data.
[0124] Optionally, in the embodiments of the present application, the table-level association relationship obtained by comprehensively considering the above two steps can establish the final city-wide data interconnection relationship table.
[0125] Specifically, the city-wide data processing method provided by the embodiments of the present application can further include the following step 104:
[0126] Step 104, based on the spatial position association relationship between different spatial elements, establishing a knowledge triple between spatial element categories.
[0127] The spatial location association is used to indicate the spatial location relationship between two spatial elements; the spatial location association includes: containment relationship, adjacency relationship, intersection relationship, connectivity relationship, overlap relationship, connection relationship, top-bottom position relationship, etc.; the knowledge triple includes: spatial location association between spatial elements of the same type, and spatial location association between spatial elements of different types.
[0128] For example, the data connectivity table for urban plots (represented by vector data of polygon features, possessing structured data table attributes) can be shown in Table 4 below:
[0129] Data 1 Association relationship Data 2 Plot Spatial inclusion Community Community Spatial inclusion Building Building. name Attribute association Electricity data. building name Building. name Attribute association Enterprise directory. office address Enterprise directory. name Attribute association Taxation. enterprise name Enterprise directory. legal person name Attribute association Household information. name Household information. community name Attribute association Community. name
[0130] Table 4
[0131] For example, based on this association table, the data table relationships of the entire city's data can be visually represented. For instance... Figure 2 The image shows a data map visualization example based on a data connectivity table. Buildings and residential areas belong to different categories of spatial elements. Buildings and residential areas have an inclusion relationship in space (buildings belong to the same category of spatial elements and are spatially adjacent, though not explicitly shown in the image). Residential areas and land parcels also have a spatial inclusion relationship. Each of the three spatial elements—buildings, residential areas, and subway stations—has associated urban data, such as: electricity consumption data and business directories associated with buildings; resident information associated with residential areas; resident information is also associated with business directories (the resident works for a company within the building); and tax information is associated with business directories (a company's tax information).
[0132] For example, after obtaining the above knowledge triples, a city knowledge graph can be constructed based on the city data associated with each spatial element in the knowledge triples and the relationships between the city data.
[0133] Specifically, after step 104 above, the method for processing city-wide data provided in this application embodiment may further include the following step 105:
[0134] Step 105: Construct a city knowledge graph based on the city data associated with each spatial element, the relationships between the city data, and the knowledge triples.
[0135] The city knowledge graph is used to statistically analyze city status data based on spatial elements.
[0136] For example, for a certain spatial data (referred to as: source spatial data, such as a land parcel - a vector data expressed in polygons), for each element (such as: each polygon patch of the land parcel), relevant elements / sets of elements that have a certain spatial relationship (such as: containment, proximity, intersection, etc.) with other spatial data (referred to as: target spatial data, such as buildings, etc.) are extracted and stored as knowledge triples, such as: (Land Parcel ID, spatial containment, information building ID).
[0137] For example, the extraction of spatial relationship knowledge from spatial entities can be accomplished directly using conventional spatial analysis methods, such as the correlation analysis tools provided by ArcGIS software. These tools can then be used to visualize urban knowledge graphs.
[0138] Specifically, after step 105 above, the method for processing city-wide data provided in this application embodiment may further include the following steps 106 and 107:
[0139] Step 106: Display the target interface based on the city knowledge graph.
[0140] Step 106: In response to the user's target operation of selecting a target area and a target function, display the statistical data related to the target function contained in the target element corresponding to the target area.
[0141] For example, such as Figure 3 The image shows a visualization interface (i.e., the target interface mentioned above) constructed using relevant analysis tools. The achievable technical effect is as follows: when a user selects the plot corresponding to community A, relevant information about community A can be displayed. Users can select the information to display based on their actual needs. For example, if a user selects to display the number of households, total electricity consumption, and total water consumption, statistical information for community A based on these parameters can be displayed.
[0142] The method for processing city-wide data provided in this application first acquires first city data and performs spatialization processing on it. Then, it acquires second city data that is associated with target spatial elements. Finally, it filters out target city data from the second city data and associates the first city data with the target city data. In this way, city-wide data from different fields can be associated according to spatial elements and attributes, facilitating the querying and statistical analysis of city data.
[0143] It should be noted that the execution subject of the city global data processing method provided in the embodiments of the present application can be a city global data processing device, or a control module in the city global data processing device for executing the city global data processing method. In the embodiments of the present application, the city global data processing device is taken as an example to illustrate the city global data processing device provided in the embodiments of the present application.
[0144] It should be noted that the city global data processing method shown in each method figure in the embodiments of the present application is exemplarily described by taking one figure in the embodiments of the present application as an example. In the specific implementation, the city global data processing method shown in each method figure can also be implemented in combination with any other figure that can be combined as described in the above embodiments, which will not be described here.
[0145] The city global data processing device provided in the present application is described below, and the city global data processing method described below can be mutually corresponding and referred to the city global data processing method described above.
[0146] Figure 4 The structure diagram of the city global data processing device provided in an embodiment of the present application is shown in FIG. 4, which specifically includes: Figure 4
[0147] The acquisition module 401 is configured to acquire first city data; the data processing module 402 is configured to perform data spatialization processing on the first city data; the acquisition module 401 is further configured to acquire second city data having an association relationship with a target spatial element; and the data processing module 402 is configured to filter out target city data from the second city data and associate the first city data with the target city data. The data spatialization processing is configured to associate the first city data with a corresponding spatial element. The target city data and the first city data have an attribute field related in content. The target spatial element is a spatial element associated with the first city data. The target spatial element includes at least one spatial element.
[0148] Optionally, the data processing module 402 is specifically configured to, in a case where the first city data contains spatial coordinate information, associate the first city data with a spatial element related to the spatial coordinate information according to the spatial coordinate information.
[0149] Optionally, the apparatus further comprises an analysis module, configured to perform semantic analysis on text content contained in the first city data and generate a semantic analysis result, in a case where the first city data does not contain spatial coordinate information; and the data processing module 402 is specifically configured to determine the target spatial element related to the first city data according to the semantic analysis result, and associate the first city data with the target spatial element.
[0150] Optionally, the apparatus further comprises a labeling module, configured to perform standardized processing on the first city data according to attributes of content contained in each field of the first city data, and perform semantic labeling on the fields in the first city data.
[0151] Optionally, the apparatus further comprises a calculation module and a determination module; the calculation module is configured to perform similarity calculation on labeled content of each field in the first city data and labeled content of each field in the second city data; and the determination module is configured to determine the target city data, wherein a text similarity degree of labeled content of a first field of the target city data and labeled content of a second field of the first city data satisfies a preset similarity degree.
[0152] Optionally, the acquisition module 401 is further configured to acquire first labeled content of the first field and second labeled content of the second field; the data processing module 402 is specifically configured to perform word segmentation processing on the first labeled content and the second labeled content, respectively; the calculation module is specifically configured to calculate a first feature vector of the first labeled content and a second feature vector of the second labeled content based on the segmented first labeled content and the segmented second labeled content; the calculation module is further configured to calculate an Euclidean distance between the first labeled content and the second labeled content according to the first feature vector and the second feature vector; and the calculation module is further configured to calculate a text similarity degree between the first labeled content and the second labeled content according to the Euclidean distance between the first labeled content and the second labeled content; and the determination module is further configured to determine that content corresponding to the first field and content corresponding to the second field have relevance, in a case where the text similarity degree of the first labeled content and the second labeled content satisfies a preset similarity degree.
[0153] Optionally, the apparatus further comprises a constructing module, configured to establish a knowledge triple among spatial element categories based on spatial position correlations among different spatial elements; wherein the spatial position correlation is used to indicate a spatial position relationship between two spatial elements; the spatial position correlation comprises a containing relationship, an adjacent relationship, and an intersecting relationship; and the knowledge triple comprises a spatial position correlation among spatial elements of the same type and a spatial position correlation among spatial elements of different types.
[0154] Optionally, the constructing module is further configured to construct a city knowledge graph based on the city data associated with each spatial element, the correlations among the city data, and the knowledge triple; wherein the city knowledge graph is used to count city state data based on spatial elements.
[0155] Optionally, the apparatus further comprises a display module and an operation module; the display module is configured to display a target interface based on the city knowledge graph; and the operation module is configured to display statistical data associated with a target function and contained in a target element corresponding to a target region in response to a target operation of a target function selected by a user.
[0156] The apparatus for processing city global data provided in the present application, when processing city global data, first acquires first city data and performs data spatialization processing on the first city data. Then, second city data having a correlation with a target spatial element is acquired. Finally, target city data is filtered from the second city data, and the first city data is associated with the target city data. In this way, city global data in different fields can be associated according to spatial elements and attributes, facilitating the query and statistics of city data.
[0157] Figure 5 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 5As shown, the electronic device can include a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 complete mutual communication through the communications bus 540. The processor 510 can invoke a logical instruction in the memory 530 to execute a processing method of city global data, the method including: acquiring first city data and performing data spatialization processing on the first city data; acquiring second city data having an associated relationship with a target spatial element; filtering target city data from the second city data and associating the first city data with the target city data; wherein the data spatialization processing is used to associate the first city data with a corresponding spatial element; the target city data has a content-associated attribute field with the first city data; the target spatial element is a spatial element associated with the first city data; and the target spatial element includes at least one spatial element.
[0158] In addition, the logical instruction in the memory 530 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0159] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a computer readable storage medium, and the computer program comprises program instructions, and the computer program instructions can be executed by a computer to implement the method for processing city-wide data provided by the above method, and the method comprises the following steps: obtaining first city data, and performing data spatialization processing on the first city data; obtaining second city data associated with a target spatial element; screening target city data from the second city data, and associating the first city data with the target city data; wherein the data spatialization processing is used to associate the first city data with a corresponding spatial element; the target city data and the first city data have a content-associated attribute field; the target spatial element is a spatial element associated with the first city data; and the target spatial element comprises at least one spatial element.
[0160] In another aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for processing city-wide data provided by the above method, and the method comprises the following steps: obtaining first city data, and performing data spatialization processing on the first city data; obtaining second city data associated with a target spatial element; screening target city data from the second city data, and associating the first city data with the target city data; wherein the data spatialization processing is used to associate the first city data with a corresponding spatial element; the target city data and the first city data have a content-associated attribute field; the target spatial element is a spatial element associated with the first city data; and the target spatial element comprises at least one spatial element.
[0161] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0162] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the description of the above embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that contributes to the technical solutions can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0163] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing urban global data, characterized in that, The method comprises the following steps: acquiring first city data and performing data spatialization processing on the first city data; acquiring second city data having an association relationship with a target spatial element; performing normalization processing on the first city data according to the attributes of the contents contained in each field of the first city data, and performing semantic labeling on the fields in the first city data; performing similarity calculation on the labeled contents of each field in the first city data and the labeled contents of each field in the second city data to determine the target city data; wherein the text similarity degree of the labeled content of the first field of the target city data and the labeled content of the second field of the first city data meets a preset similarity degree; the data spatialization processing is used to associate the first city data with a corresponding spatial element; the target city data and the first city data have an attribute field associated in content; the target spatial element is a spatial element associated with the first city data; the target spatial element comprises at least one spatial element; performing similarity calculation on the labeled contents of each field in the first city data and the labeled contents of each field in the second city data to determine the target city data, comprising: acquiring the first labeled content of the first field and the second labeled content of the second field, and performing word segmentation processing on the first labeled content and the second labeled content respectively; based on the first segmented labeled content and the second segmented labeled content, calculating a first feature vector of the first labeled content and a second feature vector of the second labeled content; calculating the Euclidean distance between the first labeled content and the second labeled content according to the first feature vector and the second feature vector; calculating the text similarity between the first labeled content and the second labeled content according to the Euclidean distance between the first labeled content and the second labeled content; in the case that the text similarity degree of the first labeled content and the second labeled content meets the preset similarity degree, it is determined that the content corresponding to the first field and the content corresponding to the second field have an association.
2. The method of claim 1, wherein, the data spatialization processing on the first city data comprises: in the case that the first city data contains spatial coordinate information, associating the first city data with a spatial element related to the spatial coordinate information according to the spatial coordinate information.
3. The method of claim 1, wherein, the data spatialization processing on the first city data comprises: in the case that the first city data does not contain spatial coordinate information, performing semantic analysis on the text content contained in the first city data and generating a semantic analysis result; determining the target spatial element related to the first city data according to the semantic analysis result, and associating the first city data with the target spatial element.
4. The method of claim 1, wherein, The method further comprises: establishing a knowledge triple between spatial element categories based on the spatial position association relationship between different spatial elements; The spatial position association relationship is used to indicate a spatial position relationship between two spatial elements, and includes a containing relationship, an adjacent relationship, and an intersection relationship.
5. The method of claim 4, wherein, After the knowledge triplets between spatial element categories are established based on the spatial position association relationships between different spatial elements, the method further includes: constructing a city knowledge graph based on the city data associated with each spatial element, the association relationships between the city data, and the knowledge triplets. The city knowledge graph is used to count city state data based on spatial elements.
6. The method of claim 5, wherein, After the city knowledge graph is constructed based on the city data associated with each spatial element, the association relationships between the city data, and the knowledge triplets, the method further includes: displaying a target interface based on the city knowledge graph; in response to a target operation of selecting a target region and a target function by a user, displaying statistical data associated with the target function and contained in a target element corresponding to the target region.
7. An urban domain data processing apparatus, characterized by comprising: The device includes: an acquisition module configured to acquire first city data; a data processing module configured to perform data spatialization processing on the first city data; the acquisition module is further configured to acquire second city data having an association relationship with a target spatial element; a labeling module configured to perform standardized processing on the first city data according to attributes of contents contained in each field of the first city data, and perform semantic labeling on the fields in the first city data; a calculation module configured to perform similarity calculation on the labeled contents of each field in the first city data and the labeled contents of each field in the second city data; a determination module configured to perform similarity calculation on the labeled contents of each field in the first city data and the labeled contents of each field in the second city data, and determine target city data; wherein a text similarity degree of the labeled content of a first field of the target city data and the labeled content of a second field of the first city data satisfies a preset similarity degree; the data spatialization processing is used to associate the first city data with a corresponding spatial element; the target city data has a content-associated attribute field with the first city data; the target spatial element is a spatial element associated with the first city data; the target spatial element includes at least one spatial element; the acquisition module is further configured to acquire first labeling content of the first field and second labeling content of the second field; the data processing module is specifically configured to perform word segmentation processing on the first labeling content and the second labeling content, respectively; the calculation module is specifically configured to calculate a first feature vector of the first labeling content and a second feature vector of the second labeling content based on the segmented first labeling content and the segmented second labeling content; and the determination module is specifically configured to determine the target city data based on the first feature vector and the second feature vector. The computing module is specifically further configured to calculate an Euclidean distance between the first annotated content and the second annotated content according to the first feature vector and the second feature vector. The computing module is specifically further configured to calculate a text similarity between the first annotated content and the second annotated content according to the Euclidean distance between the first annotated content and the second annotated content. The determining module is further configured to determine that the content corresponding to the first field and the content corresponding to the second field have relevance in a case where the text similarity between the first annotated content and the second annotated content meets a preset similarity.
Citation Information
Patent Citations
Multi-data source-based data processing method and device
CN108415965A
Resilient city knowledge graph construction method based on city elements and multi-disaster fusion
CN113886596A