Knowledge graph generation method and system applied to building operation data mining
By collecting multimodal data on building operations to generate time-series associated data sequences, and performing dynamic mining of entity attribute relationship triples and construction of time-varying relationship networks, the problems of time-series association and timeliness of entity association strength in existing knowledge graphs are solved. This generates a dynamically evolving knowledge graph that can be dynamically updated, improving its adaptability and accuracy.
Patent Information
- Application Number
- CN202511250688.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-09-03
AI Technical Summary
Existing technologies fail to effectively reflect the temporal correlations and changes in the strength of entity associations in building operation data when constructing knowledge graphs. This results in a fixed knowledge graph structure that is difficult to update dynamically and cannot provide real-time and accurate references for relationships.
By collecting multimodal data streams from building operations to generate time-series associated data sequences, dynamic mining of entity attribute relationship triples is performed to construct a time-varying relationship network. Furthermore, a dynamically enhanced path set is generated through an association strength decay mechanism and a path contribution evaluation model, and finally, a dynamically evolving knowledge graph is generated through fusion.
It enables real-time adjustment of entity association strength over time, improving the adaptability and accuracy of the knowledge graph and accurately reflecting the dynamic relationships and key influence paths in building operation data.
Smart Images

Figure CN121233784A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of knowledge graph, in particular to a knowledge graph generation method and system applied to building operation data mining. BACKGROUND
[0002] In the field of building operation management, it is usually necessary to mine data to extract the potential value in the operation data. As a technical means that can effectively represent the correlation between entities, the knowledge graph plays an important role in integrating building operation data and supporting decision analysis. However, the existing methods lack consideration of the time sequence correlation of multi-source data when constructing the knowledge graph, resulting in that the entity relationship mined lacks the characteristic of dynamic change over time. Meanwhile, the setting of the correlation strength between entities is usually fixed based on the initial analysis results, which cannot reflect the time effectiveness change of the entity correlation. The actual influence of the correlation relationship that has not been observed for a long time may have weakened. In addition, when identifying the core influence path between entities, it is usually dependent on the simple accumulation of relationship weights, ignoring the influence of path length on path effectiveness, resulting in that the selected path may not be the key path with the most influence in actual operation. These problems together lead to that the overall structure of the generated knowledge graph is relatively fixed, and it is difficult to dynamically update the network structure and core path label as the building operation data continues to accumulate, so as to provide real-time and accurate correlation reference for building operation management. SUMMARY
[0003] The present application provides a knowledge graph generation method and system applied to building operation data mining.
[0004] In a first aspect, the present application provides a knowledge graph generation method applied to building operation data mining, comprising: collecting building operation multi-modal data stream and generating time sequence correlation data sequence; performing dynamic mining of entity attribute relationship triple based on the time sequence correlation data sequence to obtain a dynamic triple set, the dynamic triple set containing entity pairs, attribute correlation features of the entity pairs and relationship type labels of the entity pairs; constructing a time-varying relationship network through a correlation strength decay mechanism, the time-varying relationship network taking the entity pairs in the dynamic triple set as nodes, the relationship type labels as edges and the attribute correlation features as edge weights; performing dynamic reinforcement of relationship paths based on a path contribution degree evaluation model to generate a dynamic reinforcement path set, the path contribution degree evaluation model determining the path contribution degree by calculating the ratio of the cumulative edge weight to the path length of all possible relationship paths between entity pairs, and selecting the relationship paths with path contribution degrees exceeding a preset threshold as reinforced paths; and generating a dynamic evolution knowledge graph by fusing the time-varying relationship network and the dynamic reinforcement path set.
[0005] In a second aspect, an embodiment of the present application provides a computer system, comprising: a memory, wherein a computer program is stored in the memory; and a processor configured to load the computer program to implement the knowledge graph generation method applied to building operation data mining as described above.
[0006] The knowledge graph generation method applied to building operation data mining provided by the present application solves the problem that single modal data processing or non-time sequence data splicing cannot comprehensively capture the internal correlation of building operation data by collecting building operation multi-modal data streams and generating time sequence correlation data sequences, and provides a more complete data basis for entity correlation mining; the dynamic mining of entity attribute relationship triplets based on the time sequence correlation data sequences obtains a dynamic triplet set containing entity pairs, dynamically fluctuating attribute correlation characteristics and relationship type labels, so that the correlation strength between entities can be adjusted in real time with time, avoiding the limitation that static triplets cannot reflect the time-varying characteristics of building operation data; the time-varying relationship network is constructed through the correlation strength decay mechanism, and the edge weight decay rate is adjusted according to the continuous appearance interval of the entity pair in the time sequence correlation data sequence, so that the edge weight of the relationship network can dynamically reflect the timeliness of entity correlation, solving the problem that fixed weight cannot reflect the correlation strength change with time; the relationship path is dynamically reinforced based on the path contribution degree evaluation model, the path contribution degree is determined by calculating the ratio of the cumulative edge weight of the relationship path between the entity pairs to the path length, the reinforcement path with the contribution degree exceeding the preset threshold is screened out, and the total weight and efficiency of the path are comprehensively considered, improving the effectiveness of the core influence path screening and avoiding the one-sidedness of screening the path only according to the total weight; the dynamic evolution knowledge graph is generated by fusing the time-varying relationship network and the dynamic reinforcement path set, the edge weight is updated in real time through the correlation strength decay mechanism, and the core influence path between the entity pairs is marked through the dynamic reinforcement path set, so that the knowledge graph can accurately reflect the dynamic correlation relationship and key influence path between entities in the building operation data, effectively improving the adaptability and accuracy of the knowledge graph for building operation data mining. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 is a flowchart of a knowledge graph generation method applied to building operation data mining provided by an embodiment of the present application.
[0008] Figure 2 is a composition schematic diagram of a computer system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0009] Please refer to Figure 1 , Figure 1 is a flowchart of a knowledge graph generation method applied to building operation data mining provided by an embodiment of the present application. The method can be executed by a computer system, and the method can include the following steps: Step S100: Collecting building operation multi-modal data streams and generating time-series associated data sequences, the building operation multi-modal data streams include equipment operation state data streams, environment parameter monitoring data streams and space usage record data streams, and the time-series associated data sequences are continuous data sequences with time-series dependent relationship by time stamp alignment processing.
[0010] The equipment operation state data stream in the building operation multi-modal data stream is a record of the real-time running status of various types of equipment in the building. For example, for elevator equipment, the running state data stream will include the current floor, running direction, door opening and closing state, etc. of the elevator; for air conditioning equipment, it will include set temperature, actual temperature, wind speed gear, etc. These data can directly reflect the working status of the equipment at different times. The environment parameter monitoring data stream focuses on the environmental conditions inside the building, such as indoor temperature, humidity, light intensity, and various indicators in air quality (such as carbon dioxide concentration, formaldehyde content, etc.) are recorded. Through monitoring of these environmental parameters, it can be known whether the internal environment of the building is suitable for personnel activities and the normal operation of equipment. The space usage record data stream records the usage of various spaces in the building, such as the personnel access time of the office, the reservation and usage time of the conference room, the occupancy status of the parking lot, etc., reflecting the utilization efficiency and usage regularity of the building space.
[0011] When generating the time-series associated data sequences, first, add accurate time stamps to the data points in each multi-modal data stream. For the equipment operation state data stream, a high-precision clock chip can be integrated in the control module of the equipment, and when the equipment state changes, the time stamp at that moment is recorded synchronously. For the environment parameter monitoring data stream, the monitoring equipment records the time stamp while collecting data. The space usage record data stream can add time stamps through access control systems, reservation systems, etc. when events occur. Then, use data sorting algorithms to sort the data streams according to the time stamps, such as the merge sorting algorithm, and after sorting, associate the data in different data streams according to time sequence. Hash table data structure can be used, with time stamp as key, and data of different data streams at the same time stamp stored in the corresponding value, thus forming continuous data sequences with time-series dependent relationship. In this way, when querying a specific time point, all related multi-modal data at that moment can be quickly obtained.
[0012] Step S200: Dynamic mining of entity attribute relationship triplets based on time-series associated data sequences, obtaining a dynamic triplet set, the dynamic triplet set includes entity pairs, attribute association features of entity pairs and relationship type labels of entity pairs, and the attribute association features present dynamic association strength fluctuations with time stamp changes.
[0013] Entity attribute relation triples are structures used to describe the relationships between entities in building operation data. An entity pair consists of two related entities. In a building operation scenario, this might be a combination of an equipment entity and an environmental entity (e.g., elevator and floor temperature), an environmental entity and a spatial entity (e.g., air quality in a certain area and meeting room in that area), or an equipment entity and a spatial entity (e.g., air conditioning and office). Attribute association features reflect the strength of the association between entity pairs, and this association strength changes over time. For example, the association strength between elevator usage frequency and the frequency of personnel movement on a given floor is significantly higher during weekday rush hours than at other times. Relationship type labels categorize the relationships between entity pairs, such as direct influence, indirect association, and weak association. A direct influence relationship indicates that a change in one entity directly leads to a change in another entity, such as the air conditioning's operating status directly affecting indoor temperature. An indirect association indicates that there is some association between the two entities, but not a direct causal relationship, such as an indirect association between elevator operation and building energy consumption. A weak association indicates a weak association between entity pairs, possibly with only occasional correlation.
[0014] As one implementation method, step S200 can be specifically implemented as the following steps S210-S260: Step S210: Divide the time-series correlated data sequence into sliding time windows to obtain multiple continuous and partially overlapping time-series data segments. Each time-series data segment contains multimodal data content within a preset time length.
[0015] The choice of preset time duration depends on the specific application scenario and analysis requirements. For example, if you want to analyze short-term fluctuations in building operation data, you can choose a shorter preset time duration; if you are interested in long-term trends and patterns, you can choose a longer preset time duration.
[0016] In implementation, the size of the sliding time window and the sliding step size are first determined. The window size is the preset time length, and the sliding step size determines the time interval for each window movement. A loop structure can be used to implement the window sliding. Starting from the beginning of the time-series data sequence, data is extracted according to the window size to form the first time-series data segment. Then, the window moves forward according to the sliding step size to extract the second time-series data segment, and so on, until the window reaches the end of the data sequence. To ensure data continuity and integrity, there will be some overlap between adjacent time-series data segments. For example, when the window size is 1 hour and the sliding step size is 30 minutes, two adjacent time-series data segments will have a 30-minute overlap. When extracting each time-series data segment, the start and end timestamps of the segment need to be recorded simultaneously for subsequent analysis and processing.
[0017] Step S220: Perform entity recognition processing on each time-series data segment, extract the entity identifier sequence of equipment entity, environmental entity and spatial entity. The equipment entity corresponds to the equipment identity identifier in the equipment operation status data stream, the environmental entity corresponds to the monitoring point identity identifier in the environmental parameter monitoring data stream, and the spatial entity corresponds to the area identity identifier in the spatial usage record data stream.
[0018] The purpose of entity recognition processing is to accurately identify different types of entities from time-series data segments and extract their identification information. The identity identifier of a device entity is usually its unique number or name, which uniquely identifies a device within the device's operational status data stream. Examples include an elevator's serial number, an air conditioner's model number and serial number. The monitoring point identity identifier of an environmental entity is related to each monitoring point in the environmental parameter monitoring data stream and may include the monitoring point's location and monitoring type information, such as "3rd floor lobby temperature monitoring point". The regional identity identifier of a spatial entity is used to distinguish different spatial areas within a building and typically consists of floor information and area function information, such as "2nd floor conference room".
[0019] When performing entity recognition, Named Entity Recognition (NER) algorithms from Natural Language Processing (NLP) can be used. First, the text information in the time-series data segments is preprocessed, including noise removal and word segmentation. Then, a trained NER model is used to recognize the processed text. The NER model can be based on a deep learning architecture, such as a Long Short-Term Memory (LSTM) network combined with a Conditional Random Field (CRF). LSTM can effectively process sequential data and capture contextual information in the text, while CRF can model the dependencies between entity labels, improving the accuracy of entity recognition. Training the NER model requires a large amount of labeled data, containing the identifiers and corresponding labels for device entities, environment entities, and spatial entities. By inputting the time-series data segments into the trained NER model, the model outputs the recognized entity identifiers, arranged in the order they appear in the time-series data segments, forming an entity identifier sequence.
[0020] As one implementation method, step S220 can be specifically implemented as the following steps S221-S225: Step S221: Construct an entity recognition rule base. The entity recognition rule base includes equipment entity recognition rules, environmental entity recognition rules, and spatial entity recognition rules. The equipment entity recognition rules define the composition rules of equipment identity as a combination of equipment type information and unique sequence information. The environmental entity recognition rules define the composition rules of monitoring point identity as a combination of area location information and monitoring type information. The spatial entity recognition rules define the composition rules of area identity as a combination of floor location information and area function information.
[0021] Entity recognition rule bases are crucial for entity recognition processing. Equipment entity recognition rules define the specific structure of equipment identification identifiers. For example, for elevator equipment, the equipment type information is "elevator," and the unique sequence information could be the elevator's number; therefore, the equipment identification identifier might be "elevator-001." Environmental entity recognition rules combine area location information and monitoring type information to form the monitoring point's identification identifier based on the characteristics of the monitoring point. For instance, a temperature monitoring point set up in the lobby on the 3rd floor could be identified as "3rd Floor Lobby - Temperature Monitoring Point." Spatial entity recognition rules define area identification identifiers using floor location information and area function information; for example, an identifier like "5th Floor Conference Room" clearly indicates the location and purpose of the space.
[0022] When constructing an entity recognition rule base, a detailed survey and analysis of various equipment, monitoring points, and spatial areas in building operations is required. First, information such as equipment type and serial number is collected to determine the rules for constructing equipment identification identifiers. For environmental monitoring points, their installation location and the types of parameters monitored are recorded, and corresponding recognition rules are formulated. For spatial areas, floor information and the functional uses of the area are clarified, and spatial entity recognition rules are constructed.
[0023] Step S222: Perform rule matching on the device operation status data stream content in the time-series data segment, extract character combinations that conform to the composition rules as candidate device identifiers according to the device entity identification rules, filter invalid candidate identifiers by comparing with preset device ledger information, and obtain device entity identifiers.
[0024] Rule matching is the process of comparing the content of a device operation status data stream in a time-series data segment with device entity identification rules. The device operation status data stream may contain various textual information, such as device operation records and status change information. Using a regular expression matching algorithm, based on the combination pattern of device type information and unique sequence information in the device entity identification rules, character combinations that match the rules are searched in the data stream content. For example, if the device entity identification rule specifies that the device identifier is in the form of "device type-unique number", then character combinations like "elevator-001" and "air conditioner-002" are searched in the device operation status data stream and used as candidate device entity identifiers.
[0025] The pre-set equipment ledger information contains detailed information about all equipment within the building, including equipment type, serial number, installation location, and purchase date. Comparing candidate equipment identifiers with the pre-set equipment ledger information filters out invalid identifiers. For example, if the pre-set equipment ledger only records elevator serial numbers "Elevator-001" and "Elevator-002," and the candidate identifier "Elevator-003" is found in the rule matching, it should be filtered out. The comparison process can be implemented using a database query function. The candidate equipment identifier is used as a query condition to search for matching records in the pre-set equipment ledger information. If a matching record exists, the candidate identifier is retained; otherwise, it is filtered out.
[0026] Step S223: Perform feature matching on the environmental parameter monitoring data stream content in the time series data segment, extract character combinations containing monitoring type information as environmental entity candidate identifiers according to environmental entity recognition rules, filter invalid candidate identifiers by comparing with preset monitoring point configuration information, and obtain environmental entity identifiers.
[0027] Feature matching is a processing method for environmental parameter monitoring data streams. These data streams contain measured values of various environmental parameters along with related text descriptions. Based on environmental entity recognition rules, the system focuses on character combinations within the data stream content that contain monitoring type information (such as temperature, humidity, light intensity, etc.). For example, if the data stream contains "3rd floor conference room temperature 25℃," according to environmental entity recognition rules, "3rd floor conference room - temperature monitoring point" conforms to the rules for identifying monitoring points and is therefore considered a candidate environmental entity identifier.
[0028] The preset monitoring point configuration information contains detailed information about all environmental monitoring points within the building, including their location, monitoring type, and installation time. Candidate environmental entity identifiers are compared with this preset configuration information, filtering out invalid ones. For example, if the preset configuration information only records temperature and humidity monitoring points for the 3rd-floor conference room, and the candidate identifier "3rd-floor conference room - light intensity monitoring point" is obtained through feature matching, it will be filtered out. Similarly, the database query function can be used to perform the comparison process, ensuring that the obtained environmental entity identifiers are valid.
[0029] Step S224: Perform semantic matching on the spatial data stream content in the time series data segment, extract character combinations containing floor location information and area function information as spatial entity candidate identifiers according to the spatial entity recognition rules, filter invalid candidate identifiers by comparing with the preset building floor plan area information, and obtain spatial entity identifiers.
[0030] Semantic matching is the process of analyzing the content of space usage record data streams. These data streams contain usage information and related descriptions of various spatial areas within a building. Based on spatial entity recognition rules, character combinations containing floor location information and area function information are searched within the data stream content. For example, if the data stream records "the 2nd floor meeting room was used from 9:00 AM to 11:00 AM," according to spatial entity recognition rules, "2nd floor meeting room" conforms to the rules for constructing area identifiers and is therefore considered a candidate spatial entity identifier. Pre-defined building floor plan area information consists of detailed information about each spatial area recorded on a pre-drawn building floor plan, including the area's location, function, and area. Candidate spatial entity identifiers are compared with the pre-defined building floor plan area information, filtering out invalid candidate identifiers.
[0031] Step S225: Arrange the device entity identifier, environment entity identifier, and spatial entity identifier in the order of their appearance in the time-series data segment to generate an entity identifier sequence containing the three types of entity identifiers. Each entity identifier in the entity identifier sequence is marked with its first appearance time and duration of continuous appearance in the time-series data segment.
[0032] After obtaining the equipment entity identifier, environmental entity identifier, and spatial entity identifier, they are arranged according to their order of appearance in the time-series data segment. To accurately record the appearance time and duration of each entity identifier, the first appearance time of each entity identifier needs to be recorded during the identification process. For example, when processing the time-series data segment, when the equipment entity identifier "Elevator-001" is first identified, that moment is recorded as its first appearance time. Simultaneously, by tracking subsequent data, the duration of continuous appearance of this entity identifier in the time-series data segment is determined.
[0033] A linked list data structure can be used to store entity identifier sequences. Each node in the linked list contains information such as the entity identifier, the first occurrence time, and the duration of its occurrence. Nodes are inserted into the linked list sequentially according to the order in which the entity identifiers appear in the time-series data segment. In this way, the generated entity identifier sequence can clearly show the occurrence order and time information of various entity identifiers, providing important data support for subsequent entity relationship analysis.
[0034] Step S230: Construct an entity co-occurrence matrix based on the entity identifier sequence. The rows and columns of the entity co-occurrence matrix are entities in the entity identifier sequence, and the matrix elements are the number of times the entity pair co-occurs in the time series data segment. Calculate the initial association strength of the entity pair by the ratio of the number of co-occurrences to the total duration of the time series data segment.
[0035] An entity co-occurrence matrix is an important tool for analyzing the relationships between entities. Its rows and columns consist of entities from a sequence of entity identifiers, and each element in the matrix represents the number of times the corresponding entity pair co-occurs in a time-series data segment. Co-occurrence refers to the simultaneous appearance of two entities in the data stream content at the same timestamp. For example, in a certain time-series data segment, "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" may appear simultaneously at multiple time points; their co-occurrence counts are recorded.
[0036] When constructing the entity co-occurrence matrix, a zero-based matrix is first initialized, with the number of rows and columns equal to the number of entities in the entity identifier sequence. Then, the entity identifier sequence is traversed, and for each timestamp of the data stream content, entity pairs are checked. If two entities appear simultaneously, the corresponding element value in the entity co-occurrence matrix is incremented by 1. For example, when "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" are detected to appear simultaneously, the intersection element of the row containing "Elevator-001" and the column containing "3rd Floor Lobby - Temperature Monitoring Point" in the matrix is incremented by 1.
[0037] When calculating the initial association strength of entity pairs, the ratio of co-occurrence frequency to the total duration of the time-series data segment is used as the initial association strength. The total duration of the time-series data segment can be obtained by the difference between the end timestamp and the start timestamp of the segment. The initial association strength reflects the initial degree of association between entity pairs in the time-series data segment, providing a foundation for subsequent relationship analysis.
[0038] As one implementation method, step S230 can be specifically implemented as the following steps S231-S236: Step S231: Perform deduplication on the entity identifier sequence to obtain an entity set containing unique entity identifiers. The entity set includes a device entity set, an environment entity set, and a spatial entity set.
[0039] Deduplication is performed to ensure the uniqueness of each entity identifier in an entity set. Duplicate entity identifiers may exist in the sequence, possibly due to errors during data collection or multiple identifications of the same entity. A hash set data structure is used to implement deduplication. Hash sets are characterized by fast lookup and insertion, enabling efficient removal of duplicate entity identifiers.
[0040] The entity identifier sequence is traversed, and each entity identifier is inserted into the hash set. Since hash sets do not allow duplicate elements, duplicate entity identifiers are automatically ignored. The resulting hash set is the entity set containing unique entity identifiers. The entity sets are then divided according to entity type into device entity sets, environment entity sets, and space entity sets. For example, all device entity identifiers are stored in the device entity set, environment entity identifiers in the environment entity set, and space entity identifiers in the space entity set.
[0041] Step S232: Construct an initial matrix using the entities in the entity set as row and column indices. The number of rows and columns of the initial matrix are equal to the total number of entities in the entity set.
[0042] The initial matrix forms the basis for constructing the entity co-occurrence matrix. Entities from the entity set are used as row and column indices to ensure the matrix accurately reflects the co-occurrence relationships between entities. First, determine the total number of entities in the entity set, and then create a two-dimensional matrix of all zeros based on this number, with both the number of rows and columns equal to the total number of entities.
[0043] Arrange the entities in the entity set in a certain order (such as alphabetical order or order of appearance), and assign the entities as row and column indices to the matrix in sequence. For example, if the entity set contains three entities: "Elevator-001", "3rd Floor Lobby-Temperature Monitoring Point", and "2nd Floor Conference Room", use them as row and column indices in sequence to construct a 3×3 initial matrix. Each element in the initial matrix is initially set to 0, awaiting subsequent co-occurrence counts.
[0044] Step S233: Traverse all data records in the time-series data segment and identify the entity pairs that appear simultaneously in each data record. Simultaneous appearance means that the entity pairs coexist in the data stream content at the same timestamp.
[0045] When traversing data records in a time-series data segment, each record needs to be analyzed in detail. For each data record, the entity identifiers contained within it are extracted. String matching algorithms can be used to search for strings in the text content of the data record that match the entities in the entity identifier sequence. Determining whether two entities appear simultaneously hinges on whether they coexist in the data stream content at the same timestamp. Timestamp information can be added to the data records; when two entity identifiers are identified, their corresponding timestamps are checked for consistency. If they are the same, the two entities are considered to have appeared simultaneously, forming an entity pair.
[0046] Step S234: For each entity pair that appears simultaneously, increment the value of the element at the corresponding position in the initial matrix by one, and count the number of times the entity pair co-occurs in the time series data segment.
[0047] Once a pair of entities is identified, its corresponding position is located in the initial matrix. Based on the indices of the two entities in the entity set, their row and column positions in the matrix are determined. For example, for the entity pair "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point," where "Elevator-001" has an index of 0 in the entity set and "3rd Floor Lobby - Temperature Monitoring Point" has an index of 1, the element in row 0, column 1 of the initial matrix represents the position of this entity pair.
[0048] Incrementing the element value at that position by 1 indicates that the two entities co-occur again in that time series data segment. By continuously repeating this process, after traversing all data records in the time series data segment, the element values in the initial matrix reflect the number of times the corresponding entity pair co-occurs in the time series data segment.
[0049] Step S235: Calculate the total duration of the time series data segment. The total duration is the difference between the first timestamp and the last timestamp in the time series data segment.
[0050] The total duration of a time-series data segment is calculated to prepare for subsequent calculations of the initial association strength of entity pairs. When processing the time-series data segment, the timestamp of each data record has already been recorded. By finding the timestamps of the first and last data records in the time-series data segment and calculating the difference between them, the total duration of the time-series data segment can be obtained.
[0051] Step S236: Divide the number of co-occurrences of each element in the initial matrix by the total duration to obtain the co-occurrence frequency per unit time of the entity pair. Use the co-occurrence frequency per unit time as the initial association strength of the entity pair to generate the entity co-occurrence matrix.
[0052] Dividing the co-occurrence frequency of each element in the initial matrix by the total duration of the time-series data segment yields the unit-time co-occurrence frequency of entity pairs. The unit-time co-occurrence frequency reflects the co-occurrence of entity pairs within a unit of time, more accurately representing the degree of association between entities. Using the unit-time co-occurrence frequency as the initial association strength of entity pairs, the element values in the initial matrix are updated. The final matrix obtained is the entity co-occurrence matrix.
[0053] Step S240: Perform time decay correction on the initial association strength of entity pairs. Based on the co-occurrence interval of entity pairs in adjacent time-series data segments, adjust the initial association strength through an exponential decay function to generate attribute association features that change dynamically over time.
[0054] Time decay correction takes into account that the strength of the association between entities changes over time. Co-occurrence interval refers to the length of time during which entity pairs do not appear simultaneously in adjacent time series data segments. For example, in two adjacent time series data segments, "elevator-001" and "3rd floor lobby-temperature monitoring point" may co-occur multiple times in the first segment but not simultaneously in the second segment. The co-occurrence interval between them is the difference between the start time of the second segment and the end time of the first segment.
[0055] The exponential decay function is a tool used to adjust the initial correlation strength. Its basic form is f(t) = e^(-t / t). -αt Where t is the co-occurrence interval duration and α is the preset decay coefficient. The magnitude of the decay coefficient α determines the rate at which the association strength decays. The longer the co-occurrence interval duration, the smaller the value of the exponential decay function, and the greater the adjustment to the initial association strength. For example, when the co-occurrence interval duration is short, the value of the exponential decay function is close to 1, and the initial association strength changes little; when the co-occurrence interval duration is long, the value of the exponential decay function approaches 0, and the initial association strength decays significantly.
[0056] As one implementation method, step S240 can be specifically implemented as the following steps S241-S245: Step S241: Extract the timestamp information of two adjacent time series data segments, and calculate the time interval between adjacent time series data segments. The time interval is the difference between the start timestamp of the later time series data segment and the end timestamp of the earlier time series data segment.
[0057] Extracting the timestamp information of two adjacent time-series data segments is a prerequisite for calculating the time interval. When processing time-series data segments, the start and end timestamps of each segment have already been recorded. This timestamp information can be stored using a data storage structure (such as an array or list). For example, the start and end timestamps of each time-series data segment can be stored as elements in a list, arranged sequentially according to the segment order.
[0058] When calculating the time interval between adjacent time series data segments, simply subtract the end timestamp of the preceding time series data segment from the start timestamp of the following segment. This subtraction can be performed using time calculation functions to ensure the accuracy of the result. The time interval reflects the time span between two adjacent time series data segments.
[0059] Step S242: Determine whether the entity pair appears in both adjacent time series data segments. If the entity pair appears only in the previous time series data segment and not in the next time series data segment, then it is determined that the entity pair has a co-occurrence interval duration, which is equal to the time interval between adjacent time series data segments.
[0060] Determining the occurrence of entity pairs in adjacent time-series data segments is crucial for determining the co-occurrence interval. A set data structure can be used to store the entity pairs appearing in each time-series data segment. When processing each time-series data segment, the entity identifiers are iterated through to find all co-occurring entity pairs and stored in a set.
[0061] Compare the sets of entity pairs in two adjacent time series data segments. If an entity pair appears only in the first set but not in the second set, it is considered that the entity pair has a co-occurrence interval. The time interval between adjacent time series data segments is taken as the co-occurrence interval of the entity pair.
[0062] Step S243: If the entity pair appears in both adjacent time series data segments, then the co-occurrence interval of the entity pair is determined to be zero.
[0063] When an entity pair appears in two adjacent time-series data segments, it indicates that the association between them is temporally continuous and there is no co-occurrence interval. In this case, there is no need to perform time decay correction on the initial association strength of the entity pair, and its initial association strength remains unchanged.
[0064] Step S244: Construct an exponential decay function based on the co-occurrence interval duration. The base of the exponential decay function is the natural constant, and the exponent is the negative value of the product of the co-occurrence interval duration and the preset decay coefficient.
[0065] An exponential decay function is constructed based on the co-occurrence interval and a preset decay coefficient. As mentioned earlier, the form of the exponential decay function is f(t) = e -αt , where t is the co-occurrence interval duration and α is the preset attenuation coefficient.
[0066] Step S245: Multiply the initial association strength of the entity pair by the calculation result of the exponential decay function to obtain the association strength after time decay correction, and use the association strength as the attribute association feature that changes dynamically with time.
[0067] Multiplying the initial association strength of an entity pair by the result of the exponential decay function yields the time-decayed association strength. This corrected association strength is then used as a dynamically changing attribute association feature over time. It reflects the change in association strength between entity pairs over time, providing a more accurate description of the dynamic relationships between entities.
[0068] Step S250: Determine the relationship type label of the entity pair based on the numerical range of the attribute association feature. When the attribute association feature is greater than the first threshold, it is marked as a direct influence relationship. When the attribute association feature is between the first threshold and the second threshold, it is marked as an indirect association relationship. When the attribute association feature is less than the second threshold, it is marked as a weak association relationship.
[0069] Relationship type labels are classification identifiers for the relationships between entity pairs. The first and second thresholds are the boundaries used to distinguish different relationship types. A direct impact relationship indicates a strong direct association between the entity pairs; a change in one entity directly leads to a change in the other. For example, the operation of an air conditioner directly affects the indoor temperature; when the air conditioner is in cooling mode, the indoor temperature will drop significantly. An indirect association relationship indicates a certain association between the two entities, but not a direct causal relationship. For example, there is an indirect association between the operation of an elevator and the energy consumption in a building; frequent elevator operation increases energy consumption, but it is not a direct causal relationship. A weak association relationship indicates a weak association between the entity pairs; there may only be occasional correlation.
[0070] As one implementation method, step S250, determining the relation type label of the entity pair based on the numerical range of the attribute association features, can be specifically implemented as the following steps S251-S255: Step S251: Divide entity pairs into three types: device-environment entity pairs, environment-space entity pairs, and device-space entity pairs. Device-environment entity pairs refer to entity pairs composed of device entities and environment entities. Environment-space entity pairs refer to entity pairs composed of environment entities and space entities. Device-space entity pairs refer to entity pairs composed of device entities and space entities.
[0071] Classifying entity pairs allows for a more detailed analysis of the relationships between different types of entities. Equipment-environment entity pairs reflect the interaction between equipment and its environment. For example, the operation of an elevator generates heat, affecting the temperature environment of the floor it's on; "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" constitute an equipment-environment entity pair. Environmental-space entity pairs embody the relationship between environmental factors and spatial areas. For instance, the air quality of a conference room is closely related to the usage of that space; "3rd Floor Conference Room - Air Quality Monitoring Point" and "3rd Floor Conference Room" form an environmental-space entity pair. Equipment-space entity pairs describe the relationship between equipment and spatial areas. For example, air conditioning equipment is installed in an office; "Air Conditioner-002" and "2nd Floor Office" constitute an equipment-space entity pair.
[0072] When classifying entity pairs, the type of entity identifier can be used for judgment. If one entity is a device entity and the other is an environment entity, they are classified as a device-environment entity pair; if one is an environment entity and the other is a space entity, they are classified as an environment-space entity pair; if one is a device entity and the other is a space entity, they are classified as a device-space entity pair. Conditional statements can be used to classify entity pairs, storing different types of entity pairs in different data structures, which facilitates subsequent threshold setting and relationship analysis.
[0073] Step S252: Set a corresponding basic threshold group for each entity pair type. The basic threshold group includes a basic first threshold and a basic second threshold. The basic first threshold of the device environment entity pair is higher than the basic first threshold of the environment space entity pair, and the basic first threshold of the environment space entity pair is higher than the basic first threshold of the device space entity pair. The setting rule of the basic second threshold is the same as that of the basic first threshold.
[0074] Different types of entity pairs exhibit varying degrees of correlation strength, necessitating the establishment of corresponding base threshold sets for each type. Device-environment entity pairs typically exhibit strong direct correlations because device operation directly impacts environmental parameters. For instance, the cooling and heating functions of an air conditioning unit directly alter indoor temperature and humidity, thus the base threshold for device-environment entity pairs is relatively high. Environmental-space entity pairs exhibit relatively weaker correlation strengths because the impact of environmental factors on a spatial area may be indirect or require a certain period of time to accumulate. For example, changes in indoor air quality may not immediately affect the use of a conference room, therefore the base threshold for environmental-space entity pairs is lower than that for device-environment entity pairs. Device-space entity pairs may exhibit even weaker correlation strengths; for example, if a device operates within a large spatial area, its impact on the entire space is relatively small, resulting in the lowest base threshold for device-space entity pairs.
[0075] The setting pattern for the second basic threshold is consistent with that of the first basic threshold, decreasing sequentially in the order of equipment-environment entity pairs, environmental space entity pairs, and equipment-space entity pairs. When setting the basic threshold set, it is necessary to comprehensively consider the actual situation of building operation, historical data, and experience. A suitable basic threshold set can be determined by analyzing a large amount of historical data and statistically analyzing the distribution of association strength among different types of entity pairs.
[0076] Step S253: Extract the attribute association feature sequence of entity pairs in the historical time series data segment, calculate the standard deviation of the attribute association feature sequence as the historical volatility coefficient. The historical volatility coefficient reflects the stability of the association strength of entity pairs. The larger the historical volatility coefficient, the more violent the fluctuation of the association strength.
[0077] An attribute association feature sequence is a sequence of attribute association feature values for entity pairs within a historical time-series data segment. Standard deviation is a statistic used to measure the dispersion of data; by calculating the standard deviation of the attribute association feature sequence, the historical volatility coefficient can be obtained. A larger historical volatility coefficient indicates more drastic fluctuations in the attribute association feature values within the historical data, meaning the association strength between entity pairs is unstable. For example, if an entity pair has a large historical volatility coefficient, it suggests that its association strength varies significantly across different time points and may be influenced by multiple factors. The historical volatility coefficient can be calculated using statistical library functions in a programming language. The attribute association feature sequence is used as input parameters, and the standard deviation calculation function is called to obtain the historical volatility coefficient.
[0078] Step S254: Adjust the basic threshold group according to the historical fluctuation coefficient. When the historical fluctuation coefficient is greater than the preset fluctuation threshold, increase the basic first threshold and basic second threshold of the corresponding entity pair type by the preset adjustment ratio. When the historical fluctuation coefficient is less than or equal to the preset fluctuation threshold, keep the basic threshold group unchanged and generate the dynamically adjusted first threshold and second threshold.
[0079] The preset fluctuation threshold is the boundary for judging whether the correlation strength of entity pairs fluctuates drastically. The preset adjustment ratio is the proportion by which the base threshold set is adjusted when threshold adjustment is needed. When the historical fluctuation coefficient is greater than the preset fluctuation threshold, it indicates that the correlation strength of entity pairs fluctuates drastically, and the original base threshold set may not be able to accurately determine the relationship type. In this case, both the base first threshold and the base second threshold for the corresponding entity pair type are increased by the preset adjustment ratio.
[0080] When the historical fluctuation coefficient is less than or equal to the preset fluctuation threshold, it indicates that the association strength of the entity pair is relatively stable, and the original basic threshold set remains applicable. By dynamically adjusting the threshold in this way, the relationship type of the entity pair can be determined more accurately based on the attribute association characteristics, thus improving the accuracy of relationship classification.
[0081] Step S255: Compare the attribute association features of the entity pair with the dynamically adjusted first threshold and second threshold. When the attribute association features are greater than the dynamically adjusted first threshold, they are marked as a direct influence relationship. When the attribute association features are between the dynamically adjusted first threshold and the second threshold, they are marked as an indirect association relationship. When the attribute association features are less than the dynamically adjusted second threshold, they are marked as a weak association relationship.
[0082] The final step in determining the relationship type label is to compare the attribute association features of the entity pair with dynamically adjusted first and second thresholds. This comparison process is implemented using conditional statements. For example, if the attribute association feature of the entity pair "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" is 4, the dynamically adjusted first threshold is 3.6, and the second threshold is 1.2, since 4 is greater than 3.6, the entity pair is labeled as a direct relationship. If the attribute association feature is 2, which is between 3.6 and 1.2, it is labeled as an indirect relationship. If the attribute association feature is 0.8, which is less than 1.2, it is labeled as a weak relationship.
[0083] In this way, relationship type labels can be accurately assigned to each entity pair, providing important basic information for subsequent relationship network construction and knowledge graph generation.
[0084] Step S260: Combine entity pairs, dynamically changing attribute association features, and relation type labels into dynamic triples, and integrate the dynamic triples corresponding to all time series data segments into a dynamic triple set. Each dynamic triple in the dynamic triple set contains the timestamp information of the corresponding time series data segment.
[0085] A dynamic triple is a structure that includes entity pairs, dynamically changing attribute association features, and relation type labels. When combining entity pairs, attribute association features, and relation type labels into a dynamic triple, it is necessary to ensure the accuracy and consistency of each element. For each time-series data segment, the entity pairs, the time-decay-corrected attribute association features, and the defined relation type labels are combined to form a dynamic triple.
[0086] All dynamic triples corresponding to time-series data segments are integrated into a dynamic triple set. A list data structure can be used to store the dynamic triple set, with each dynamic triple added sequentially to the list. Simultaneously, the timestamp information of the corresponding time-series data segment is added to each dynamic triple for easy subsequent querying and analysis. The dynamic triple set comprehensively records the relationship information between entity pairs and the dynamic changes of these relationships over time, providing a rich data foundation for the subsequent construction of time-varying relationship networks.
[0087] Step S300: Construct a time-varying relation network through an association strength decay mechanism. The time-varying relation network uses entity pairs in the dynamic triple set as nodes, relation type labels as edges, and attribute association features as edge weights. The association strength decay mechanism adjusts the decay rate of the edge weights according to the consecutive occurrence interval of the attribute association features of entity pairs in the time-series relational data sequence.
[0088] Time-varying relation networks are network structures that reflect the dynamic relationships between entities. Entity pairs in a dynamic triplet set serve as nodes, with each node representing a specific entity pair. Relationship type labels act as edges connecting nodes; different relationship type labels (direct influence, indirect association, weak association) represent different types of edges. Attribute association features serve as the weights of the edges, reflecting the strength of the association between entity pairs.
[0089] The association strength decay mechanism is one of the core mechanisms of time-varying relation networks. It adjusts the decay rate of edge weights based on the consecutive occurrence interval of the attribute association features of entity pairs in the time-series relational data. The consecutive occurrence interval refers to the length of time during which entity pairs do not appear consecutively in the time-series relational data. If the consecutive occurrence interval of entity pairs is long, it indicates that the association between them is weak over a period of time, and the decay rate of the edge weights will be faster; if the consecutive occurrence interval is short, the decay rate of the edge weights will be relatively slower.
[0090] As one implementation method, step S300, constructing a time-varying relationship network through a correlation strength decay mechanism, can be specifically implemented as the following steps S310-S360: Step S310: Extract all entity pairs from the dynamic triplet set, and use the two entities in each entity pair as network nodes to generate a node set. The node set includes device entity nodes, environment entity nodes, and spatial entity nodes.
[0091] Extracting all entity pairs from the dynamic triplet set is the first step in constructing the node set. The dynamic triplet set contains multiple dynamic triplets corresponding to time-series data segments, each containing one entity pair. The dynamic triplet set is traversed, and entity pairs are extracted. The two entities in each entity pair are treated as network nodes. For example, "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" are treated as two independent nodes. Based on the entity type, nodes are categorized into equipment entity nodes, environment entity nodes, and space entity nodes. All equipment entities are treated as equipment entity nodes, such as "Elevator-001" and "Air Conditioner-002"; all environment entities are treated as environment entity nodes, such as "3rd Floor Lobby - Temperature Monitoring Point" and "2nd Floor Conference Room - Air Quality Monitoring Point"; and all space entities are treated as space entity nodes, such as "3rd Floor Lobby" and "2nd Floor Conference Room".
[0092] A set data structure can be used to store the node set, ensuring the uniqueness of each node. The extracted nodes are added to the set sequentially, ultimately resulting in a node set containing device entity nodes, environment entity nodes, and spatial entity nodes.
[0093] Step S320: Extract the relation type label for each entity pair from the dynamic triple set, use the relation type label as the edge connecting the corresponding entity node, and generate an edge set. The edge set includes edges that directly affect the relation, edges that indirectly affect the relation, and edges that weakly affect the relation.
[0094] Extracting the relation type label for each entity pair from the dynamic triplet set is a crucial step in constructing the edge set. In a dynamic triplet, the relation type label clarifies the type of relationship between the entity pairs. For example, for the dynamic triplet ("Elevator-001", "3rd Floor Lobby - Temperature Monitoring Point", 2.5 times / hour, direct influence relationship, 9:00 AM - 10:00 AM), the relation type label is "direct influence relationship". The relation type label is then used as the edge connecting the corresponding entity nodes. For example, for the entity pair ("Elevator-001", "3rd Floor Lobby - Temperature Monitoring Point"), "direct influence relationship" is used as the edge connecting the "Elevator-001" node and the "3rd Floor Lobby - Temperature Monitoring Point" node. Based on the different relation type labels, the edge set is divided into direct influence relationship edges, indirect association relationship edges, and weak association relationship edges. A list data structure can be used to store the edges when generating the edge set. Each entity pair and its corresponding relation type label are combined into an edge object, and the edge object is added to the list. The final result is an edge set containing different types of edges, reflecting the relationship types between the entity nodes.
[0095] Step S330: Extract the attribute association features of each entity pair from the dynamic triplet set, use the attribute association features as the initial edge weights of the corresponding edges, and establish a mapping relationship between the edges and the initial edge weights.
[0096] Extracting the attribute association features of each entity pair from the dynamic triplet set is the basis for determining edge weights. Attribute association features reflect the strength of the association between entity pairs. For example, for the dynamic triplet ("elevator-001", "3rd floor lobby-temperature monitoring point", 2.5 times / hour, direct influence relationship, 9:00-10:00 AM), the attribute association feature is 2.5 times / hour.
[0097] The attribute association feature is used as the initial edge weight for the corresponding edge. For the "direct influence relationship" edge connecting the "Elevator-001" node and the "3rd Floor Lobby-Temperature Monitoring Point" node, 2.5 times / hour is used as the initial edge weight. The mapping relationship between edges and initial edge weights can be established using a dictionary data structure, where the key is the edge object and the value is the initial edge weight. For example, {("Elevator-001", "3rd Floor Lobby-Temperature Monitoring Point", "Direct Influence Relationship"): 2.5 times / hour}.
[0098] In this way, each edge is assigned an initial weight, which accurately reflects the initial association strength between entity pairs, providing a foundation for subsequent adjustment of edge weights and network analysis.
[0099] Step S340: Adjust edge weights based on the association strength decay mechanism. The association strength decay mechanism updates edge weights according to the duration of consecutive absence of entity pairs in the temporal association data sequence. The longer the duration of consecutive absence, the greater the decay of edge weights.
[0100] The association strength decay mechanism is the core mechanism for adjusting edge weights. The duration of consecutive absence refers to the length of time during which entity pairs do not appear simultaneously in a temporally associated data sequence. For example, in a temporally associated data sequence, "elevator-001" and "3rd floor lobby-temperature monitoring point" do not appear simultaneously for a period of time; this period is their duration of consecutive absence.
[0101] When a pair of entities is absent for a long period, it indicates that the association between them is weak during this time, and the weight of the edge will decrease more significantly. For example, during a certain period, due to elevator maintenance, "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" do not appear simultaneously. As the duration of their absence increases, the weight of the edge connecting them will gradually decrease.
[0102] As one implementation method, step S340, adjusting edge weights based on the association strength decay mechanism, can be specifically implemented as the following steps S341-S345: Step S341: Monitor the update status of the time-series associated data sequence in real time. When a new time-series data segment is added to the time-series associated data sequence, check whether the entity pair corresponding to each edge in the time-varying relation network appears in the new time-series data segment.
[0103] Real-time monitoring of updates to the time-series correlated data sequence is a prerequisite for edge weight adjustment. This can be achieved using message queues or event listeners. When a new time-series data segment is generated and added to the time-series correlated data sequence, a corresponding event is triggered.
[0104] During event processing, it checks whether the entity pair corresponding to each edge in the time-varying relation network appears in the new time-series data segment. For each edge, its corresponding entity pair is obtained, and then the system searches whether the entity pair appears simultaneously in the new time-series data segment. For example, for the edge connecting "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point", the system checks whether "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" appear simultaneously in the new time-series data segment. This checking process can be performed using string matching algorithms or entity recognition algorithms.
[0105] Step S342: If an entity pair appears in a new time series data segment, update the attribute association feature of the entity pair according to the co-occurrence frequency in the new time series data segment, and update the edge weight of the corresponding edge to the new attribute association feature.
[0106] If an entity pair appears in a new time-series data segment, its attribute association features need to be updated based on the co-occurrence frequency in that segment. First, the co-occurrence frequency of the entity pair in the new time-series data segment is counted. Then, considering the duration of the segment, a new attribute association strength is calculated. The edge weights of the corresponding edges are updated with the new attribute association features. In the mapping relationship between edges and initial edge weights, the weight corresponding to that edge is found and updated with the new attribute association strength. In this way, the edge weights can promptly reflect the latest association strength between entity pairs.
[0107] Step S343: If the entity pair does not appear in the new time series data segment, calculate the duration of continuous absence of the entity pair. The duration of continuous absence is the difference between the end timestamp of the last time series data segment and the end timestamp of the current new time series data segment.
[0108] When an entity pair does not appear in a new time-series data segment, its continuous absence duration needs to be calculated. First, record the end timestamp of the time-series data segment in which the entity pair last appeared. When a new time-series data segment is added, obtain the end timestamp of that segment. The difference between these two timestamps is the continuous absence duration. For example, if the last time-series data segment for "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" ended at 10:00 AM, and the new time-series data segment ends at 11:30 AM, then their continuous absence duration is 1 hour and 30 minutes.
[0109] Step S344: Calculate the attenuation factor based on the duration of continuous absence. The attenuation factor is the ratio of the duration of continuous absence to the preset attenuation reference duration. When the duration of continuous absence is less than the attenuation reference duration, the attenuation factor is the ratio of the duration of continuous absence to the attenuation reference duration. When the duration of continuous absence is greater than or equal to the attenuation reference duration, the attenuation factor is the preset maximum attenuation ratio value, which is less than 1.
[0110] The attenuation factor is a parameter used to adjust edge weights. The preset attenuation baseline duration is a pre-defined time length used as a reference for calculating the attenuation factor. When the duration of consecutive absences is less than the attenuation baseline duration, the attenuation factor is the ratio of the consecutive absence duration to the attenuation baseline duration. For example, if the preset attenuation baseline duration is 2 hours and the consecutive absence duration is 1 hour, then the attenuation factor is 0.5. When the duration of consecutive absences is greater than or equal to the attenuation baseline duration, to avoid excessive attenuation of edge weights, the attenuation factor is set to a preset maximum attenuation ratio value. For example, if the preset maximum attenuation ratio value is 0.8, when the consecutive absence duration reaches or exceeds 2 hours, the attenuation factor is 0.8. When calculating the attenuation factor, conditional statements are used to calculate based on the relationship between the consecutive absence duration and the attenuation baseline duration.
[0111] Step S345: Multiply the current edge weight by the difference between 1 and the attenuation factor to obtain the attenuated edge weight. If the attenuated edge weight is less than the preset minimum weight threshold, set the edge weight to the minimum weight threshold. The minimum weight threshold is a preset constant greater than zero, used to avoid excessive attenuation of edge weight leading to the breakage of relationships between entities.
[0112] The decayed edge weight is obtained by multiplying the current edge weight by the difference between 1 and the decay factor. To prevent excessive decay of edge weights from breaking relationships between entities, a preset minimum weight threshold is set. The preset minimum weight threshold is a constant greater than zero. If the decayed edge weight is less than the preset minimum weight threshold, the edge weight is set to the minimum weight threshold.
[0113] In this way, the edge weights can be guaranteed to change within a reasonable range, maintaining the stability and continuity of relationships between entities and ensuring the effectiveness and reliability of the time-varying relationship network.
[0114] Step S350: Construct a relationship table of node set, edge set and dynamic edge weight. The relationship table records the neighboring nodes of each node, the relationship type label of the connecting edge and the current edge weight.
[0115] The association table is a crucial component of time-varying relational networks, recording the relationships between nodes. First, focusing on each node, we find its adjacent nodes. Adjacent nodes are those directly connected to the given node via edges. For example, for the node "Elevator-001," its adjacent nodes might be "3rd Floor Lobby - Temperature Monitoring Point."
[0116] Record the relationship type label of the edges connecting nodes and their adjacent nodes. For example, the relationship type label of the edge connecting "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" is "Direct Influence Relationship". Simultaneously, record the current edge weight, which dynamically changes as the association strength decay mechanism is adjusted.
[0117] A dictionary data structure can be used to construct a relational table. The dictionary keys are nodes, and the values are lists, where each element contains adjacent nodes, a relation type label, and the current edge weight. For example, {“Elevator-001”:[(“3rd Floor Lobby - Temperature Monitoring Point”, “Direct Influence Relationship”, current edge weight],...}. By constructing this relational table, the connections between nodes, relation types, and edge weights can be clearly displayed, facilitating subsequent querying, analysis, and visualization of time-varying relational networks.
[0118] Step S360: Integrate the node set, edge set, dynamic edge weights, and association table into a time-varying relation network. The structure of the time-varying relation network is dynamically adjusted as the attribute association characteristics of entity pairs change.
[0119] Integrating the node set, edge set, dynamic edge weights, and association table is a key step in constructing a complete time-varying relational network. First, the basic structure of the time-varying relational network is defined. The node set serves as the basic element of the network, representing different entity pairs; the edge set acts as a bridge connecting nodes, reflecting the type of relationship between entity pairs; the dynamic edge weights reflect the strength of the association between entity pairs and adjust dynamically with time and data changes; the association table, as the network's metadata, records detailed connection information between nodes.
[0120] During the integration process, the node set, edge set, and dynamic edge weights are organized according to certain rules. A graph data structure can be used to represent the time-varying relationship network, with nodes as vertices, edges as edges, and edge weights as edge attributes. The relationship table can then be stored as additional information about the graph within the relevant graph data structure for easy querying and updating.
[0121] The structure of a time-varying relational network dynamically adjusts as the attribute association characteristics of entity pairs change. When the attribute association characteristics of an entity pair change, the edge weights are updated accordingly based on the association strength decay mechanism and edge weight adjustment strategy. Simultaneously, depending on the update of the dynamic triplet set, new nodes and edges may be added, or nodes and edges that no longer have associations may be deleted. For example, when new equipment is put into use or new environmental monitoring points are installed, new entity pairs are generated, requiring the addition of corresponding nodes and edges to the time-varying relational network.
[0122] Step S400: Dynamically strengthen relationship paths based on the path contribution evaluation model to generate a set of dynamically strengthened paths. The path contribution evaluation model determines the path contribution by calculating the ratio of the cumulative edge weight of all possible relationship paths between entity pairs to the path length, and selects relationship paths with path contributions exceeding a preset threshold as strengthened paths.
[0123] The path contribution assessment model is a tool used to evaluate the importance of relationship paths between entity pairs. A relationship path between entity pairs is a sequence of nodes and edges connected sequentially, representing the association path between entity pairs. The cumulative edge weight is the sum of the weights of all edges in the path, reflecting the overall strength of the association between entity pairs on the path. The path length refers to the number of edges contained in the path, reflecting the complexity of the path. The path contribution is determined by the ratio of the cumulative edge weight to the path length, reflecting the average association strength per unit path length. A preset threshold is a pre-defined value used to filter out important relationship paths. When the path contribution of a relationship path between entity pairs exceeds the preset threshold, the path is designated as a reinforced path. Reinforced paths represent important paths with strong associations between entity pairs, which are of great significance for the analysis and decision-making of building operation data.
[0124] When generating a dynamic reinforcement path set, the first step is to identify all possible relationship paths between entity pairs. Then, the cumulative edge weight and path length of each path are calculated to obtain the path contribution. Finally, relationship paths with contribution values exceeding a preset threshold are integrated into the dynamic reinforcement path set.
[0125] As one implementation method, step S400, which involves dynamically strengthening the relationship path based on the path contribution evaluation model, can be specifically implemented as follows: S410-S470: Step S410: Using each entity node in the time-varying relation network as the starting node, use the breadth-first search algorithm to traverse all reachable target nodes and record all possible relational paths from the starting node to the target node. The relational path is a sequence formed by connecting entity nodes and edges in sequence.
[0126] Breadth-first search (BFS) starts from the starting node and visits nodes layer by layer until all reachable target nodes have been traversed. In time-varying relational networks, each entity node is used as the starting node, and BFS is used to find all reachable target nodes.
[0127] During the traversal, all possible relationship paths from the starting node to the target node are recorded. A relationship path is a sequence formed by connecting entity nodes and edges in sequence.
[0128] As one implementation method, step S410 involves using a breadth-first search algorithm to traverse all reachable target nodes and recording all possible relationship paths from the starting node to the target node. Specifically, this can be implemented as the following steps S411-S416: Step S411: Initialize the path queue by adding the starting node as the initial path to the path queue. The path length of the initial path is 0, and the cumulative edge weight of the path is 0.
[0129] A path queue is a data structure used to store paths to be traversed. At the start of the breadth-first search algorithm, the path queue is initialized, and the starting node is added to the queue as the initial path. The initial path has a length of 0 because it contains only one node and has no edges; the cumulative edge weight is also 0 because there are no edge weights to accumulate. For example, if "Elevator-001" is used as the starting node, and "Elevator-001" is added to the path queue as the initial path, the path length is 0, and the cumulative edge weight is 0.
[0130] Step S412: Retrieve the first current path from the path queue and obtain the endpoint node of the current path.
[0131] The first path in the path queue is taken as the current path. The current path is the path being processed. By obtaining its endpoint node, we can further search for nodes adjacent to that node and expand the path. For example, the first path in the path queue is "elevator-001", and its endpoint node is "elevator-001".
[0132] Step S413: Query all adjacent nodes directly connected to the endpoint node in the time-varying relation network, and the edges connecting the endpoint node and adjacent nodes.
[0133] In a time-varying relational network, query all adjacent nodes directly connected to the endpoint node. Information about adjacent nodes and connecting edges can be found using an association table. For example, for the endpoint node "Elevator-001", the association table can be used to find that its adjacent nodes might be "3rd Floor Lobby - Temperature Monitoring Point", with the relationship type label of the edges connecting them being "Direct Influence Relationship", and the edge weights being the current dynamic edge weights.
[0134] Step S414: For each adjacent node, determine whether the adjacent node has appeared in the current path. If it has not appeared, combine the current path, edge and adjacent node into a new path. The path length of the new path is the current path length plus 1. The cumulative edge weight of the new path is the cumulative edge weight of the current path plus the current edge weight of the edge. Add the new path to the path queue.
[0135] For each adjacent node, it needs to be determined whether it already appears in the current path. If the adjacent node does not appear in the current path, it means that the node can be used as an extension node of the path. Combine the current path, connecting edges, and adjacent nodes into a new path. The length of the new path is the length of the current path plus 1, because an edge has been added; the cumulative edge weight of the new path is the cumulative edge weight of the current path plus the current edge weight, because the weight of the new edge needs to be accumulated. For example, if the current path is "Elevator-001", the adjacent node is "3rd Floor Lobby-Temperature Monitoring Point", the connecting edge weight is 2, the current path length is 0, and the cumulative edge weight is 0, then the new path is "Elevator-001" - "3rd Floor Lobby-Temperature Monitoring Point", with a path length of 1 and a cumulative edge weight of 2. Add the new path to the path queue for further expansion.
[0136] Step S415: Repeat the steps of retrieving the current path, obtaining adjacent nodes, and generating a new path until the path length in the path queue reaches the preset maximum path length or the path queue is empty.
[0137] The process of retrieving the current path, obtaining adjacent nodes, and generating a new path is repeated until a termination condition is met. There are two termination conditions: first, the path length in the path queue reaches a preset maximum path length (a pre-defined value used to limit path length and prevent the search from expanding indefinitely); second, the path queue is empty, indicating that all possible paths have been traversed. In this way, all reachable target nodes can be systematically traversed, and all possible relational paths can be recorded.
[0138] Step S416: Filter out the paths from all generated paths where the starting node and the target node are different, and use them as possible relationship paths from the starting node to the target node.
[0139] Among all generated paths, some may have the same starting and target nodes. These paths do not meet the requirements and need to be filtered. Paths with different starting and target nodes are selected as possible relationship paths from the starting node to the target node. For example, in the generated paths, there exists a path like "Elevator-001"-"3rd Floor Lobby-Temperature Monitoring Point"-"Elevator-001". Since both the starting and target nodes are "Elevator-001", this path is excluded. However, a path like "Elevator-001"-"3rd Floor Lobby-Temperature Monitoring Point"-"3rd Floor Conference Room" has different starting and target nodes, and this path is considered a possible relationship path.
[0140] Step S420: For each relation path, extract the current edge weight of all edges in the path, and calculate the sum of all edge weights as the cumulative edge weight of the path.
[0141] For each possible relationship path, it is necessary to extract the current edge weights of all edges in the path. This can be obtained using a relational table. For example, for the relationship path "Elevator-001"-"3rd Floor Lobby-Temperature Monitoring Point"-"3rd Floor Conference Room", the weights of the edges connecting "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point", as well as the weights of the edges connecting "3rd Floor Lobby-Temperature Monitoring Point" and "3rd Floor Conference Room" can be obtained.
[0142] The cumulative edge weight of the path is obtained by summing the weights of all edges. The cumulative edge weight reflects the overall strength of the association between entity pairs on the path. For example, if the edge weight connecting "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" is 2, and the edge weight connecting "3rd Floor Lobby-Temperature Monitoring Point" and "3rd Floor Conference Room" is 3, then the cumulative edge weight of the path is 5.
[0143] Step S430: Count the number of edges contained in the relation path as the path length.
[0144] The number of edges in a relational path is counted and used as the path length. The path length reflects the complexity of the path. For example, the relational path "Elevator-001"-"3rd Floor Lobby-Temperature Monitoring Point"-"3rd Floor Conference Room" contains 2 edges, and its path length is 2.
[0145] Step S440: Calculate the path contribution by dividing the cumulative edge weight by the path length. The path contribution reflects the average edge weight per unit path length.
[0146] The path contribution is calculated by dividing the cumulative edge weight by the path length. The path contribution reflects the average edge weight per unit path length, indicating the path's importance. For example, if the cumulative edge weight is 5 and the path length is 2, the path contribution is 2.5. A higher path contribution indicates that the path is more important in the association between entity pairs.
[0147] Step S450: Set a path contribution threshold and identify relationship paths with a path contribution greater than the path contribution threshold as candidate reinforcement paths.
[0148] Setting a path contribution threshold is to filter out important relationship paths. The path contribution threshold is a pre-set value, determined based on actual needs and experience. Relationship paths with a path contribution greater than the path contribution threshold are identified as candidate reinforcement paths.
[0149] Step S460: Redundancy detection is performed on the candidate reinforcement paths. If the starting node, target node and path contribution of two candidate reinforcement paths are the same, the path with fewer edges is retained and the path with more edges is deleted.
[0150] Redundancy detection aims to remove redundant paths from candidate reinforcement paths, thereby improving the quality and effectiveness of the reinforcement paths. When two candidate reinforcement paths have the same starting node, target node, and path contribution, it indicates that the two paths are essentially similar. Only the path with fewer edges needs to be retained, as it is simpler and more directly reflects the relationship between entity pairs.
[0151] As one implementation method, step S460, redundancy detection of candidate enhancement paths, can be specifically implemented as the following steps S461-S466: Step S461: Set the corresponding relationship weight value for the relationship type label. The relationship weight value of a direct relationship is higher than that of an indirect relationship, and the relationship weight value of an indirect relationship is higher than that of a weak relationship.
[0152] Setting corresponding relationship weight values for relationship type labels is to comprehensively consider the relationship type in redundancy detection. Direct influence relationships indicate a strong direct association between entity pairs, and their relationship weight value is relatively high; indirect association relationships indicate a certain association between entity pairs, but not a direct causal relationship, and their relationship weight value is slightly lower; weak association relationships indicate a weak association between entity pairs, and their relationship weight value is the lowest. For example, the relationship weight value for direct influence relationships can be set to 3, the relationship weight value for indirect association relationships to 2, and the relationship weight value for weak association relationships to 1.
[0153] Step S462: For each candidate reinforcement path, extract the relation type labels of all edges in the path, and calculate the sum of relation type weights of all edges in the path based on the relation weight values. The sum of relation type weights is the result of adding the relation weight values of each edge in the path.
[0154] For each candidate reinforcement path, extract the relation type labels for all edges in the path. For example, for the candidate reinforcement path "Elevator-001" - "3rd Floor Lobby - Temperature Monitoring Point" - "3rd Floor Conference Room", extract the relation type labels for the edges connecting "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point", as well as the relation type labels for the edges connecting "3rd Floor Lobby - Temperature Monitoring Point" and "3rd Floor Conference Room". Calculate the sum of the relation type weights for all edges in the path based on the relation weight values. For example, if the relation type of the edge connecting "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" is a direct influence relationship with a relation weight of 3, and the relation type of the edge connecting "3rd Floor Lobby - Temperature Monitoring Point" and "3rd Floor Conference Room" is an indirect association relationship with a relation weight of 2, then the sum of the relation type weights for this path is 5.
[0155] Step S463: Group the candidate reinforcement paths according to the starting node and the target node to obtain multiple node pair path groups. Each node pair path group contains multiple candidate reinforcement paths with the same starting node and target node.
[0156] Candidate reinforcement paths are grouped according to their starting and target nodes. For example, all candidate reinforcement paths with the starting node "Elevator-001" and the target node "3rd Floor Conference Room" are grouped together to obtain a node-pair path group. Each node-pair path group contains multiple candidate reinforcement paths with the same starting and target nodes.
[0157] Step S464: Within each node-path group, candidate reinforcement paths are sorted in ascending order of path length. When the difference in path length between two candidate reinforcement paths is less than a preset length difference threshold, the sum of the relationship type weights of the two paths is further compared.
[0158] Within each node-path pair group, candidate reinforcement paths are sorted in ascending order of path length. A preset length difference threshold is a pre-defined value used to determine whether the length difference between two paths is significant. When the path length difference between two candidate reinforcement paths is less than the preset length difference threshold, it indicates that the two paths are similar in length, and their relationship type weights need to be further compared.
[0159] Step S465: If the difference in the total weight of relation types is greater than the preset weight difference threshold, then retain the candidate reinforcement path with the higher total weight of relation types and delete the candidate reinforcement path with the lower total weight of relation types; if the difference in the total weight of relation types is less than or equal to the preset weight difference threshold, then retain the candidate reinforcement path with the higher path contribution.
[0160] The preset weight difference threshold is a pre-defined value used to determine whether the sum of the relationship type weights of two paths differs significantly. When the difference in the sum of the relationship type weights is greater than the preset weight difference threshold, the candidate reinforcement path with the higher sum of relationship type weights is retained because this path contains more important relationship types. When the difference in the sum of the relationship type weights is less than or equal to the preset weight difference threshold, the candidate reinforcement path with the higher path contribution is retained because path contribution reflects the importance of the path.
[0161] Step S466: When the difference in path length between two candidate reinforcement paths is greater than or equal to a preset length difference threshold, retain the candidate reinforcement path with shorter path length and delete the candidate reinforcement path with longer path length to ensure that the candidate reinforcement path that passes the redundancy detection is optimal in terms of path length, total weight of relation type, and path contribution.
[0162] When the difference in path length between two candidate reinforcement paths is greater than or equal to a preset length difference threshold, it indicates a significant difference in path length, and the candidate reinforcement path with the shorter path length is retained. Shorter paths are more concise and more directly reflect the relationship between entity pairs. In this way, it is ensured that the candidate reinforcement paths that pass the redundancy detection are optimal in terms of path length, total relation type weights, and path contribution.
[0163] Step S470: Integrate the candidate reinforcement paths that pass the redundancy detection into a dynamic reinforcement path set. Each reinforcement path in the dynamic reinforcement path set is labeled with its path contribution and the relationship type label of the edges it contains.
[0164] Candidate reinforcement paths that pass redundancy detection are integrated into a dynamic reinforcement path set. During the integration process, each reinforcement path is labeled with its path contribution and the relationship type of its edges. For example, for the reinforcement path "Elevator-001" - "3rd Floor Lobby - Temperature Monitoring Point" - "3rd Floor Conference Room", its path contribution is labeled as 2.5, the relationship type of the edge connecting "Elevator-001" and "3rd Floor Lobby - Temperature Monitoring Point" is direct influence, and the relationship type of the edge connecting "3rd Floor Lobby - Temperature Monitoring Point" and "3rd Floor Conference Room" is indirect association. The dynamic reinforcement path set clearly shows the important association paths between entity pairs, providing important information for subsequent knowledge graph generation and building operation analysis.
[0165] Step S500: Integrate the time-varying relation network and the dynamic reinforcement path set to generate a dynamic evolution knowledge graph. The dynamic evolution knowledge graph updates edge weights in real time through the association strength decay mechanism and marks the core influence paths between entity pairs through the dynamic reinforcement path set.
[0166] Dynamically evolving knowledge graphs are the result of fusing time-varying relation networks and dynamic reinforcement path sets. The time-varying relation network reflects the dynamic relationships between entity pairs, while the dynamic reinforcement path set highlights the important association paths between entity pairs. By fusing these two components, a more comprehensive and accurate knowledge graph reflecting the relationships between entities in building operation data can be constructed.
[0167] The association strength decay mechanism continues to play a role in the dynamically evolving knowledge graph, updating edge weights in real time. As building operation data changes continuously, the association strength between entity pairs also changes. The association strength decay mechanism adjusts edge weights based on the consecutive occurrence intervals of the attribute association characteristics of entity pairs in the time-series association data sequence, ensuring that the knowledge graph can reflect the latest relationship information in real time.
[0168] The dynamic reinforcement path set is used to annotate the core influence paths between entity pairs. Core influence paths are those between entity pairs that have a strong correlation and significant impact. By annotating these paths, users can quickly identify and analyze the key relationships between entity pairs. For example, in a dynamic evolutionary knowledge graph, for the entity pair "Elevator-001" and "3rd Floor Conference Room," the dynamic reinforcement path set might annotate a core influence path: "Elevator-001" - "3rd Floor Lobby - Temperature Monitoring Point" - "3rd Floor Conference Room." Users can use this path to understand the important relationships between these two entity pairs.
[0169] As one implementation method, step S500, which involves fusing the time-varying relationship network and the dynamic reinforcement path set to generate a dynamically evolving knowledge graph, can be specifically implemented as the following steps S510-S560: Step S510: Use the node set of the time-varying relation network as the entity layer of the dynamically evolving knowledge graph. Each entity node in the entity layer retains its corresponding device entity, environment entity, or spatial entity attribute information.
[0170] The node set of the time-varying relational network is directly used as the entity layer of the dynamically evolving knowledge graph. The entity layer is the foundation of the knowledge graph, containing various entity nodes. Each entity node corresponds to a specific equipment entity, environmental entity, or spatial entity, and retains its related attribute information. For example, for the node "Elevator-001," its equipment entity attribute information such as equipment type, operating speed, and maintenance records is retained; for the node "3rd Floor Lobby - Temperature Monitoring Point," its environmental entity attribute information such as monitoring location, monitoring accuracy, and data acquisition frequency is retained; and for the node "3rd Floor Conference Room," its spatial entity attribute information such as area, capacity, and usage frequency is retained. By retaining this attribute information, the entity layer can more comprehensively describe the various entities in building operations.
[0171] Step S520: The edge set of the time-varying relation network is used as the relation layer of the dynamically evolving knowledge graph. Each edge in the relation layer retains its relation type label and dynamic edge weight updated through the association strength decay mechanism.
[0172] The edge set of the time-varying relational network is used as the relation layer of the dynamically evolving knowledge graph. The relation layer describes the relationships between entities, with each edge corresponding to a specific relation type label, such as direct influence, indirect association, or weak association. Simultaneously, the edge weights are dynamically updated in real-time through a correlation strength decay mechanism, reflecting the strength of the association between entities. For example, the edge connecting "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" has a direct influence relationship label, and its weight is dynamically adjusted based on elevator operation and changes in temperature monitoring data. In this way, the relation layer accurately reflects the dynamic relationships between entities.
[0173] Step S530: Map the reinforcement paths in the dynamic reinforcement path set to the time-varying relation network, and mark the edges contained in the reinforcement paths in the relation layer. The special marking includes the path contribution and path priority ranking.
[0174] The reinforcement paths in the dynamic reinforcement path set are mapped to a time-varying relation network. In the relation layer, edges contained within a reinforcement path are specially labeled. These labels include path contribution and path priority ranking. Path contribution reflects the importance of the reinforcement path, while path priority ranking distinguishes the relative importance of different reinforcement paths. For example, for the reinforcement path "Elevator-001" - "3rd Floor Lobby-Temperature Monitoring Point" - "3rd Floor Conference Room," the edges connecting these nodes are specially labeled in the relation layer with a path contribution of 2.5, and their paths are ranked according to their importance. By specially labeling reinforcement paths, users can quickly identify and analyze the core influence paths between entity pairs.
[0175] Step S540: Construct an association index between the entity layer and the relationship layer. The association index records the adjacent entity nodes of each entity node, the relationship type label of the connecting edge, the dynamic edge weight, and whether it belongs to the reinforcement path.
[0176] The association index serves as a bridge connecting the entity layer and the relationship layer, recording the association information between entity nodes. For each entity node, the association index records its adjacent entity nodes, the relationship type label of the connecting edge, the dynamic edge weight, and whether the edge belongs to a reinforcement path. For example, for the node "Elevator-001", the association index records its adjacent node "3rd Floor Lobby - Temperature Monitoring Point", the relationship type label of the connecting edge is "direct influence relationship", the dynamic edge weight is the current real-time weight, and whether the edge belongs to a reinforcement path. By constructing the association index, it is convenient to query and analyze the relationship information between entities, improving the efficiency of knowledge graph utilization.
[0177] Step S550: Set dynamic update trigger conditions. When the change magnitude of the attribute association features in the dynamic triple set exceeds the preset change threshold, the edge weight update of the time-varying relationship network is triggered, and the dynamic reinforcement path set and association index are updated synchronously.
[0178] Setting dynamic update trigger conditions ensures that the dynamically evolving knowledge graph can reflect changes in building operation data in real time. The attribute association features in the dynamic triplet set reflect the strength of the association between entity pairs. When the change in attribute association features exceeds a preset change threshold, it indicates a significant change in the relationship between entities. At this point, the edge weights of the time-varying relationship network are updated, adjusting the edge weights according to the association strength decay mechanism. Simultaneously, the dynamic reinforcement path set is updated, re-evaluating and filtering reinforcement paths to ensure they accurately reflect the latest core impact paths. Furthermore, the association index is updated to guarantee the accuracy of association information at the entity and relationship layers. For example, with a preset change threshold of 0.5, when the change in the attribute association features of "Elevator-001" and "3rd Floor Lobby-Temperature Monitoring Point" reaches 0.6, edge weight updates, dynamic reinforcement path set updates, and association index updates are triggered.
[0179] Step S560: Integrate the entity layer, relationship layer, association index, and dynamic update mechanism into a dynamic evolution knowledge graph. The dynamic evolution knowledge graph intuitively displays the relationship between entities in building operation data through the entity layer and relationship layer, strengthens the path annotation of the core influence path, and maintains the consistency between the knowledge graph and real-time building operation data through the dynamic update mechanism.
[0180] The knowledge graph integrates an entity layer, a relationship layer, an association index, and a dynamic update mechanism into a dynamically evolving knowledge graph. The entity layer displays various entities in building operations, the relationship layer describes the relationships between entities, the association index provides connection information between entities and relationships, and the dynamic update mechanism ensures the knowledge graph reflects the latest data changes in real time. Through the entity and relationship layers, users can intuitively see the relationships between entities in building operation data. For example, users can clearly see the relationships between elevator equipment and environmental parameter monitoring points, or spatial areas. By strengthening path annotation of core influence paths, users can quickly identify key association paths between entity pairs, facilitating in-depth analysis and decision-making. Through the dynamic update mechanism, the knowledge graph maintains consistency with real-time building operation data, providing strong support for the management and optimization of building operations.
[0181] It is understood that the various algorithms involved in the above descriptions of the embodiments of the present invention can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of the present invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solutions of the present invention. For example, they can use normalization to eliminate dimensional conflicts before feature fusion, use interpolation to eliminate dimensional differences, reasonably set thresholds based on historical data, experience or business scenario requirements, train the model based on a general model training method, set the number of layers in the model structure based on actual needs, select activation functions, etc. The present invention will not provide redundant descriptions of overly detailed implementation processes here.
[0182] Please see Figure 2 , Figure 2 This is a schematic diagram of a computer system provided in an embodiment of the present invention. The computer system includes at least a processor 101, a communication interface 102, and a memory 103. The processor 101, communication interface 102, and memory 103 can be connected via a bus or other means. The processor 101 (or Central Processing Unit, CPU) is the computing and control core of the computer system, capable of parsing various instructions and processing various data within the computer system. The communication interface 102 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 101; the communication interface 102 can also be used for data transmission and interaction within the computer system. The memory 103 is a storage device in the computer system used to store programs and data. It is understood that the memory 103 here can include the computer system's built-in memory, or it can include extended memory supported by the computer system. The memory 103 provides storage space, which stores the computer system's operating system; this invention does not limit this storage space.
[0183] In one embodiment, the processor 101 executes the knowledge graph generation method for building operation data mining provided above in the embodiments of the present invention by running a computer program in the memory 103.
Claims
1. A method for generating a knowledge graph applied to building operation data mining, characterized in that, The method comprises the following steps: Collecting building operation multi-modal data streams and generating time-series correlation data sequences; Based on the time-series correlation data sequences, dynamic mining of entity attribute relationship triples is performed to obtain a dynamic triple set, which contains entity pairs, attribute correlation characteristics of entity pairs, and relationship type labels of entity pairs; A time-varying relationship network is constructed through a correlation strength decay mechanism, which takes entity pairs in the dynamic triple set as nodes, relationship type labels as edges, and attribute correlation characteristics as edge weights; Based on a path contribution degree evaluation model, relationship paths are dynamically reinforced to generate a dynamic reinforcement path set, wherein the path contribution degree evaluation model determines the path contribution degree by calculating the ratio of the cumulative edge weight to the path length of all possible relationship paths between entity pairs, and selects relationship paths with path contribution degrees exceeding a preset threshold as reinforced paths; The time-varying relationship network and the dynamic reinforcement path set are fused to generate a dynamic evolution knowledge graph.
2. The method of claim 1, wherein, The dynamic mining of entity attribute relationship triples based on the time-series correlation data sequences to obtain a dynamic triple set comprises the following steps: The time-series correlation data sequences are divided into multiple continuous and partially overlapping time window segments, each containing multi-modal data content within a preset time length; Each time window segment is subjected to entity recognition processing to extract entity identification sequences of device entities, environment entities, and space entities, wherein the device entities correspond to device identity labels in device operation state data streams, the environment entities correspond to monitoring point identity labels in environment parameter monitoring data streams, and the space entities correspond to region identity labels in space usage record data streams; An entity co-occurrence matrix is constructed based on the entity identification sequences, wherein the rows and columns of the matrix are entities in the entity identification sequences, and the matrix elements are the co-occurrence frequencies of entity pairs in the time window segments. The initial correlation strength of the entity pairs is calculated by the ratio of the co-occurrence frequency to the total time length of the time window segments; The initial correlation strength of the entity pairs is time-decay corrected. According to the co-occurrence interval time length of the entity pairs in adjacent time window segments, the initial correlation strength is adjusted by an exponential decay function to generate attribute correlation characteristics that dynamically change over time; Based on the numerical range of the attribute correlation characteristics, the relationship type labels of the entity pairs are determined. When the attribute correlation characteristics are greater than a first threshold, they are marked as direct influence relationships. When the attribute correlation characteristics are between the first threshold and a second threshold, they are marked as indirect correlation relationships. When the attribute correlation characteristics are less than the second threshold, they are marked as weak correlation relationships; The entity pairs, dynamically changing attribute correlation characteristics, and relationship type labels are combined into dynamic triples. The dynamic triples corresponding to all time window segments are integrated into a dynamic triple set, wherein each dynamic triple in the dynamic triple set contains corresponding time stamp information of the time window segment.
3. The method of claim 2, wherein, The entity recognition processing of each time window segment to extract entity identification sequences of device entities, environment entities, and space entities comprises the following steps: The entity identification rule library includes device entity identification rules, environment entity identification rules, and space entity identification rules, the device entity identification rules define the constituting rules of device identity as the combination of device type information and unique sequence information, the environment entity identification rules define the constituting rules of monitoring point identity as the combination of area position information and monitoring type information, and the space entity identification rules define the constituting rules of area identity as the combination of floor position information and area function information; The device running state data stream content in the time sequence data segment is subjected to rule matching, device entity candidate identifiers are extracted as character combinations conforming to the constituting rules according to the device entity identification rules, invalid candidate identifiers are filtered through comparison with preset device account information, and device entity identifiers are obtained; The environment parameter monitoring data stream content in the time sequence data segment is subjected to feature matching, environment entity candidate identifiers are extracted as character combinations containing monitoring type information according to the environment entity identification rules, invalid candidate identifiers are filtered through comparison with preset monitoring point configuration information, and environment entity identifiers are obtained; The space use record data stream content in the time sequence data segment is subjected to semantic matching, space entity candidate identifiers are extracted as character combinations containing floor position information and area function information according to the space entity identification rules, invalid candidate identifiers are filtered through comparison with preset building plan area information, and space entity identifiers are obtained; The device entity identifiers, the environment entity identifiers, and the space entity identifiers are arranged in the order of appearance in the time sequence data segment, an entity identification sequence containing the three types of entity identifiers is generated, and each entity identifier in the entity identification sequence is marked with a first appearance time point and a continuous appearance time length in the time sequence data segment.
4. The method of claim 2, wherein, The entity co-occurrence matrix is constructed based on the entity identification sequence, including: The entity identification sequence is subjected to deduplication processing to obtain an entity set containing unique entity identifiers, the entity set includes a device entity set, an environment entity set, and a space entity set; An initial matrix is constructed with entities in the entity set as row indexes and column indexes, and the number of rows and the number of columns of the initial matrix are equal to the total number of entities in the entity set; All data records in the time sequence data segment are traversed to identify entity pairs appearing simultaneously in each data record; For each simultaneously appearing entity pair, the element value at the corresponding position in the initial matrix is incremented by one to count the co-occurrence number of the entity pair in the time sequence data segment; The total duration of the time sequence data segment is calculated, which is the difference between the first timestamp and the last timestamp in the time sequence data segment; The co-occurrence number of each element in the initial matrix is divided by the total duration to obtain the unit time co-occurrence frequency of the entity pair, the unit time co-occurrence frequency is taken as the initial correlation strength of the entity pair, and the entity co-occurrence matrix is generated.
5. The method of claim 2, wherein, The initial correlation strength of the entity pair is subjected to time decay correction, including: Timestamp information of adjacent two time sequence data segments is extracted, and the time interval of adjacent time sequence data segments is calculated, which is the difference between the starting timestamp of the latter time sequence data segment and the ending timestamp of the former time sequence data segment; judging whether the entity pair appears in both adjacent time sequence data segments, if the entity pair only appears in the previous time sequence data segment and does not appear in the subsequent time sequence data segment, determining that the entity pair has a co-occurrence interval length, the co-occurrence interval length being equal to the time interval of the adjacent time sequence data segments; if the entity pair appears in both adjacent time sequence data segments, determining that the co-occurrence interval length of the entity pair is zero; constructing an exponential decay function based on the co-occurrence interval length, the base of the exponential decay function being a natural constant, and the index being the negative value of the product of the co-occurrence interval length and a preset decay coefficient; multiplying the initial association strength of the entity pair by the calculation result of the exponential decay function to obtain the association strength after time decay correction, and taking the association strength as the attribute association feature that dynamically changes over time.
6. The method of claim 1, wherein, The time-varying relationship network is constructed through the association strength decay mechanism, comprising: extracting all entity pairs from the dynamic triple set, taking the two entities in each entity pair as network nodes respectively to generate a node set, the node set including device entity nodes, environment entity nodes and space entity nodes; extracting the relationship type label of each entity pair from the dynamic triple set, taking the relationship type label as the edge connecting the corresponding entity nodes to generate an edge set, the edge set including direct influence relationship edges, indirect association relationship edges and weak association relationship edges; extracting the attribute association feature of each entity pair from the dynamic triple set, taking the attribute association feature as the initial edge weight of the corresponding edge to establish a mapping relationship between the edge and the initial edge weight; adjusting the edge weight based on the association strength decay mechanism, the association strength decay mechanism updating the edge weight according to the continuous non-appearance length of the entity pair in the time sequence association data sequence, the longer the continuous non-appearance length, the greater the edge weight decay amplitude; constructing an association relationship table of the node set, the edge set and the dynamic edge weight, the association relationship table recording the adjacent nodes of each node, the relationship type label of the connecting edge and the current edge weight; integrating the node set, the edge set, the dynamic edge weight and the association relationship table into a time-varying relationship network, the structure of the time-varying relationship network dynamically adjusting with the change of the attribute association feature of the entity pair.
7. The method of claim 6, wherein, The edge weight is adjusted based on the association strength decay mechanism, comprising: monitoring the update of the time sequence association data sequence in real time, when a new time sequence data segment is added to the time sequence association data sequence, checking whether the entity pair corresponding to each edge in the time-varying relationship network appears in the new time sequence data segment; if the entity pair appears in the new time sequence data segment, updating the attribute association feature of the entity pair according to the co-occurrence times in the new time sequence data segment, and updating the edge weight of the corresponding edge to the new attribute association feature; if the entity pair does not appear in the new time sequence data segment, calculating the continuous non-appearance length of the entity pair, the continuous non-appearance length being the difference between the end time stamp of the last time sequence data segment and the end time stamp of the current new time sequence data segment; The attenuation factor is calculated according to the continuous non-occurrence time length, and the attenuation factor is a ratio of the continuous non-occurrence time length to a preset attenuation reference time length; when the continuous non-occurrence time length is less than the attenuation reference time length, the attenuation factor is a ratio of the continuous non-occurrence time length to the attenuation reference time length; when the continuous non-occurrence time length is greater than or equal to the attenuation reference time length, the attenuation factor is a preset maximum attenuation ratio value, and the preset maximum attenuation ratio value is less than 1; The current edge weight is multiplied by a difference between 1 and the attenuation factor to obtain an attenuated edge weight; if the attenuated edge weight is less than a preset minimum weight threshold, the edge weight is set to the minimum weight threshold, and the minimum weight threshold is a preset constant greater than zero.
8. The method of claim 1, wherein, The relationship path is dynamically reinforced based on the path contribution degree evaluation model, including: Each entity node in the time-varying relationship network is taken as a starting node, all reachable target nodes are traversed, and all possible relationship paths from the starting node to the target node are recorded, the relationship path being a sequence formed by entity nodes and edges connected in sequence; For each relationship path, the current edge weight of all edges in the path is extracted, and the sum of all edge weights is calculated as path cumulative edge weight; The number of edges contained in the relationship path is counted as path length; The path contribution degree is calculated by dividing the path cumulative edge weight by the path length, and the path contribution degree reflects the average edge weight per unit path length; A path contribution degree threshold is set, and the relationship path with the path contribution degree greater than the path contribution degree threshold is determined as a candidate reinforcement path; Redundancy detection is performed on the candidate reinforcement path, if the starting node, target node and path contribution degree of two candidate reinforcement paths are all the same, the path with fewer edges is retained, and the path with more edges is deleted; The candidate reinforcement paths after redundancy detection are integrated into a dynamic reinforcement path set, and each reinforcement path in the dynamic reinforcement path set is labeled with its path contribution degree and relationship type label of the contained edge.
9. The method of claim 8, wherein, The starting node is taken as an initial path, the initial path is added to the path queue, the path length of the initial path is 0, and the path cumulative edge weight of the initial path is 0; The first current path is taken out from the path queue, and the end node of the current path is obtained; All adjacent nodes directly connected with the end node in the time-varying relationship network and the edges connecting the end node and the adjacent nodes are queried; For each adjacent node, it is judged whether the adjacent node has appeared in the current path, if not, the current path, the edge and the adjacent node are combined into a new path, the path length of the new path is the current path length plus 1, the path cumulative edge weight of the new path is the current path cumulative edge weight plus the current edge weight of the edge; the new path is added to the path queue; The steps of taking out the current path, obtaining the adjacent node and generating the new path are repeated until the path length in the path queue reaches a preset maximum path length or the path queue is empty; From all generated paths, the paths different from the starting node and the target node are selected as possible relationship paths from the starting node to the target node. It includes:
10. A computer system, characterized by A memory in which a computer program is stored; A processor is configured to load the computer program to implement the method for generating a knowledge graph applied to building operation data mining according to any one of claims 1-9.
Citation Information
Patent Citations
Interpretable commodity recommendation method and system based on time series knowledge graph
CN112085559A
Method and system for constructing space-time dynamic graph of engineering construction project
CN119474407A
Knowledge graph generation method and system for science and technology project risk control
CN120296180A
Enterprise data risk processing method and system based on dynamic knowledge graph
CN120494538A
Knowledge-graph extrapolating method and system based on multi-layer perception
US20240086731A1