A real-time classification method and system for bridge prestressed tension construction data flow
Patent Information
- Application Number
- CN202311646211.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-12-04
AI Technical Summary
[0005]实际中的工业数据流会因网络传输故障、传感器失灵等原因出现缺失值,对于这些复杂情况人工匹配的方法会受到严重的影响,从而也会影响分类结果
[0040]本发明中的桥梁预应力张拉施工数据具有分布不均匀,特征差异小等特点,通过采用贝叶斯模型中的先验概率替换经验熵中每个钢束数出现的概率,提升了分类的准确性;同时,在分类时采用决策树和贝叶斯两个模型进行双重校验满足了桥梁钢束数序列数据对于分类准确性的高要求。
Smart Images

Figure CN117633655B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data classification, and specifically to a real-time classification method and system for data streams in bridge prestressing tensioning construction. Background Technology
[0002] Classification, in essence, involves taking a given dataset and, using a specific learning method, finding a function or model that can classify the data into known categories, thus assigning the data to those categories. Classification is a fundamental problem in machine learning and one of the core problems in the field of data analysis.
[0003] In industrial bridge projects, there are usually multiple bridges in a project, and each bridge involves a lot of data. Therefore, it is necessary to classify the data of each bridge from the numerous tension data.
[0004] Among related technologies, decision tree algorithms are used for classification because they perform well for probabilistic classification problems. However, for imbalanced datasets like industrial tension data, significant variance can occur when calculating the number of samples. Common data acquisition techniques in decision tree algorithms include bootstrapping and feature-based random sampling. While these increase the model's diversity and generalization ability, they are not suitable for classifying industrial bridge data due to its unique characteristics and can even reduce accuracy to some extent.
[0005] In real-world industrial data streams, missing values can occur due to network transmission failures, sensor malfunctions, and other reasons. Manual matching methods are severely impacted by these complex situations, consequently affecting classification results. Current methods for determining data stream partitioning points mostly employ real-time windowing, threshold determination, and feature change detection. However, industrial bridge data lacks distinct features, making these methods unsuitable. Summary of the Invention
[0006] In order to overcome the defects existing in the prior art, the purpose of this invention is to provide a real-time classification method and system for data streams in bridge prestressing tensioning construction.
[0007] To achieve the above-mentioned objectives of this invention, this invention provides a real-time classification method for data streams during bridge prestressing tensioning construction, comprising the following steps:
[0008] Obtain the raw data of each bridge in the project from the server and generate a dataset;
[0009] Real-time collection and preprocessing of tension data during the prestressing tensioning construction of each bridge within the project;
[0010] A classifier is constructed based on a decision tree model and a Bayesian model. The classifier is trained on the dataset. During the training process, the probability of the decision tree model is compared with the prior probability of the Bayesian model. If the two are different, the prior probability of the Bayesian model is used to replace the probability of the decision tree model to obtain the optimal feature index value of the decision tree and generate the decision tree.
[0011] The preprocessed tension data is input into the trained classifier for classification.
[0012] This method uses the probability of the decision tree model and the prior probability of the Bayesian model to classify tension data. It overcomes the problem that the decision tree model ignores imbalanced data when counting the number of samples during training. It also solves the problem that the decision tree model is not conducive to the accurate classification of bridge tension data due to the large number of categories, the large difference in the number of samples in some categories, and the small difference in some features. This method improves the accuracy of bridge tension data classification.
[0013] In one alternative scheme of this real-time classification method for bridge prestressing tensioning construction data streams, the step of generating a dataset using the original data is as follows:
[0014] Separate the sequence of steel strand counts for each bridge from the raw data;
[0015] The lengths of all steel strand number sequences are supplemented to the maximum length of steel strand number sequences existing in this project;
[0016] Replace the elements from 1 to the maximum length - 1 in the length-supplemented steel strand number sequence with 0 in stages to obtain all the element combinations of the steel strand number sequence.
[0017] The dataset for this project is obtained by combining all elements of each steel strand number sequence and adding labels.
[0018] This option allows for the rapid and comprehensive generation of datasets from raw data.
[0019] In one alternative scheme of the real-time classification method for bridge prestressed tensioning construction data stream, during the preprocessing of tensioning data, the continuity of tensioning data is determined based on the data number of the steel strands in the tensioning data, and a sliding window of fixed length is used to process the steel strand number segments. The length of the sliding window is determined by the maximum length of the steel strand number sequence in the dataset.
[0020] This alternative approach, which determines the continuity of tensioning data based on the number, can ensure the integrity of the sequence and avoid data misalignment caused by ignoring missing data when a small amount of data is missing; using the maximum length of the steel strand number sequence as the length of the sliding window can enhance the generalization ability of the model.
[0021] In one alternative scheme of the real-time classification method for bridge prestressed tensioning construction data stream, the length of the sliding window is set according to the maximum length of the steel strand number sequence in the dataset, the steel strand number segments in the collected tensioning data are placed in the sliding window, and the continuity of the data is determined according to the data number corresponding to the steel strand number segment.
[0022] If they are not continuous, they are processed according to the difference between the data numbers of two adjacent steel strand segments. If the difference is less than the remaining size of the current sliding window, the steel strand segments are placed into the sliding window in the order of their data numbers, and missing positions are filled with 0. If the difference is greater than or equal to the remaining size of the current sliding window, the current sliding window is filled in completely, and the sliding window is initialized according to the remaining difference.
[0023] If they are consecutive, place the steel strand number segments into the sliding window in order of data number.
[0024] In one alternative to this real-time classification method for bridge prestressing tensioning construction data streams, training the classifier includes the following steps:
[0025] Based on the dataset, the Shannon entropy of the data corresponding to each bridge is calculated in the decision tree model. During the calculation process, the probability of the decision tree for each feature is compared with the prior probability of Bayes. If they are different, the prior probability of Bayes is used to replace the probability of the decision tree to calculate the empirical entropy.
[0026] Iterate through all the data for each bridge, calculate the empirical conditional entropy and information gain value based on the empirical entropy, and find the optimal feature index value;
[0027] Generate a decision tree based on the optimal feature index value.
[0028] The classifier trained using this alternative approach can improve classification accuracy.
[0029] In one alternative scheme of the real-time classification method for bridge prestressing tensioning construction data stream, during classification, the data in the sliding window is put into the trained decision tree model and Bayesian model to obtain the decision tree prediction results, Bayesian prediction results and their respective prediction probabilities. The actual prediction results are obtained by comparing the decision tree prediction results and the naive Bayesian prediction results.
[0030] This alternative approach uses two models for dual verification during classification, further improving classification accuracy.
[0031] The actual prediction result is calculated as follows:
[0032] in, CR1 and CR2 are the predicted bridge steel strand number sequences X={x1,x2,x3…xn} and Y={y1,y2,y3…yn} corresponding to the decision tree prediction result R1 and the Bayesian prediction result R2, respectively. The number of identical non-zero elements is compared with the actual data sequence M={ml,m2,m3…mn} in the sliding window. C is the number of non-zero elements in the sliding window * λ, where λ is a set coefficient.
[0033] In one alternative scheme of the real-time classification method for bridge prestressing tensioning construction data stream, when the prediction probability no longer increases and the actual length of the data in the sliding window is the same as the length of the prediction result sequence, a division point is added to the data stream. At this time, the actual data in the sliding window is the data of a bridge.
[0034] When the predicted probability decreases, a split point is added to the data stream. The split point is set before the current data, and the data received this time is placed into the initialized sliding window as a new set of data.
[0035] In this alternative approach, when the probability decreases, it means that the currently received data and the previously received data do not belong to the same bridge. This indicates that the previous data belonged to the same bridge, and we can make the distinction based on this. If the newly received data belongs to a different bridge, we need to re-predict which bridge the data belongs to.
[0036] In one option of this real-time classification method for bridge prestressing tensioning construction data stream, the real-time tension force value in the classified tensioning data is compared with a set value. If the difference exceeds a set threshold, an alarm is triggered, conveniently alerting relevant personnel to the abnormal tensioning of the duct.
[0037] This invention also provides a real-time classification system for bridge prestressed tensioning construction data streams, characterized in that it includes a tensioning data acquisition unit, a processing unit, and a storage unit; the tensioning data acquisition unit is connected to the processing unit and sends the acquired tensioning data to the processing unit; the processing unit is communicatively connected to a server and obtains the original data of each bridge in the project from the server; the processing unit is communicatively connected to the storage unit, and the storage unit is used to store at least one executable instruction, which causes the processing unit to perform operations corresponding to the above-described real-time classification method for bridge prestressed tensioning construction data streams based on the tensioning data and the original data, thereby performing real-time classification of the bridge prestressed tensioning construction data streams.
[0038] This system possesses all the advantages of the aforementioned real-time classification methods for bridge prestressing tensioning construction data streams.
[0039] The beneficial effects of this invention are:
[0040] The bridge prestressing tensioning construction data in this invention has the characteristics of uneven distribution and small feature differences. By replacing the probability of each steel strand number in the empirical entropy with the prior probability in the Bayesian model, the accuracy of classification is improved. At the same time, the dual verification of decision tree and Bayesian models is used in the classification to meet the high requirements of classification accuracy for bridge steel strand number sequence data.
[0041] This invention can be used to solve the problem of whether the tension force value is qualified during the prestressing process of bridges, which helps to discover potential problems early and optimize construction quality.
[0042] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0043] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0044] Figure 1 This is a flowchart illustrating the present invention;
[0045] Figure 2 This is a schematic diagram of the data preprocessing process. Detailed Implementation
[0046] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0047] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0048] like Figure 1 As shown, this invention provides a real-time classification method for data streams during bridge prestressing tensioning construction, specifically including the following steps:
[0049] Key tensioning data during the prestressing tensioning construction of bridges are collected in real time, and the original data of each bridge in the project are obtained from the server to generate a dataset.
[0050] In practical engineering, sensors are typically installed to collect key tensioning data in real time during the prestressing tensioning process of bridges. This key tensioning data includes tensioning start time, tensioning end time, data number, original data ID, project ID, ..., number of steel strands, terminal number, tension force value, etc. The data number refers to the sequential number of the data transmitted during the tensioning process. This key tensioning data is concatenated into a JSON string for easy data transmission and use. After each tensioning cycle of the bridge is completed, the sensors immediately transmit the data. Furthermore, at the start of each project, the system automatically retrieves the original data for that project from the server, including the actual number of ducts and steel strands for each bridge.
[0051] In this embodiment, the steps for generating a dataset using the original data are as follows:
[0052] The sequence of steel strand counts for each bridge is extracted from the original data; the steel strand count sequence is the sequence of the number of steel strands in each duct of a bridge according to the duct number.
[0053] The length of all steel strand number sequences is supplemented to the maximum length K of steel strand number sequences in this project, but the original length of each steel strand number sequence is recorded at the same time.
[0054] Replace elements 1 to K-1 in the length-padded steel strand number sequence with 0 in stages to obtain all element combinations of the steel strand number sequence. Specifically:
[0055] Let the sequence of steel strand numbers for a certain bridge be S = [s1, s2, s3, s4, ..., sn-1, sn]. First, let si = 0 and replace the original elements one by one to obtain the set of data with one missing position {Si}. Then, use the same method to obtain the set of data with two missing positions {Ssi}. Repeat the steps until the maximum missing length K-1 positions are obtained, resulting in a set {S, {Si}, {Ssi}, ...}. After removing duplicates, this is the complete set of steel strand number sequences S.
[0056] For example, if a sequence of steel strand numbers is [7, 8, 9, 10], then S = [7, 8, 9, 10].
[0057] S1={[0,8,9,10]}, S2={[7,0,9,10]}, S3={[7,8,0,10]}, S4={[7,8,9,0]};
[0058] Ss1={[0,0,9,10],[0,8,0,10],[0,8,9,0]},
[0059] Ss2={[0,0,9,10],[7,0,0,10],[7,0,9,0]},
[0060] Ss3={[0,8,0,10],[7,0,0,10],[7,8,0,0]},
[0061] Ss4={[0,8,9,0],[7,0,9,0],[7,8,0,0]},
[0062] Sss1={[0,0,0,10]}, Sss2={[0,0,9,0]}, Sss1={[0,8,0,0]}, Sss2={[7,0,0,0]}.
[0063] The deduplicated set is {[0, 8, 9, 10], [0, 0, 9, 10], [0, 8, 0, 10], [0, 8, 9, 0], [7, 0, 9, 10], [7, 0, 0, 10], [7, 0, 9, 0], [7, 8, 0, 10], [7, 8, 0, 0], [7, 8, 9, 0], [7, 8, 9, 10], [0, 0, 0, 10], [0, 0, 9, 0], [0, 8, 0, 0], [7, 0, 0, 0]}.
[0064] Then, add labels to all combinations of each steel strand number sequence and save them to a file to obtain the complete dataset for this project.
[0065] The key tensioning data acquired in real time is preprocessed. In this embodiment, the continuity of the tensioning data is determined based on the data number of the steel strands in the tensioning data, and a sliding window of fixed length is used to process the steel strand number segments. The length of the sliding window is determined by the maximum length K of the steel strand number sequence in the dataset.
[0066] Specifically, such as Figure 2 As shown, the length of the sliding window is set according to the maximum length K of the steel strand number sequence in the dataset. The steel strand number segments in the collected tension data are placed into the sliding window, and the continuity of the data is determined according to the data number corresponding to the steel strand number segment.
[0067] If they are not continuous, they are processed according to the difference between the data numbers of two adjacent steel strand segments. If the difference is less than the remaining size of the current sliding window, the steel strand segments are placed into the sliding window in the order of their data numbers, and missing positions are filled with 0. If the difference is greater than or equal to the remaining size of the current sliding window, the current sliding window is filled in completely, and the sliding window is initialized according to the remaining difference.
[0068] If they are consecutive, place the steel strand number segments into the sliding window in order of data number.
[0069] Then, a classifier is constructed based on the decision tree model and the Bayesian model. The classifier is trained based on the dataset. During the training process, the Shannon entropy of the data corresponding to each bridge is calculated in the decision tree model based on the dataset. During the calculation, the probability of the decision tree for each feature is compared with the prior probability of the Bayesian model. If they are different, the prior probability of the Bayesian model is used to replace the probability of the decision tree to calculate the empirical entropy.
[0070]
[0071] Where H(D) is the empirical entropy of dataset D, n is the number of categories, Pi is the proportion of the i-th category sample in dataset D, i.e. the probability of the decision tree, and Mi is the prior probability of Bayes.
[0072] By iterating through all the data for each bridge, calculating the empirical conditional entropy and information gain value based on the empirical entropy, the index of the optimal feature will be changed, and the optimal feature index value will be found.
[0073] g(D, A) = H(D) - H(D|A),
[0074]
[0075] Where g(D, A) is the information gain, D is the dataset, A is the feature, and prob is the information gain. i The probability of a subset partitioned based on features, prob i = Length of the i-th subset / Length of the dataset, H(D|A) is the empirical conditional entropy.
[0076] A decision tree is generated based on the optimal feature index value. The tree model is saved, and the trained Bayesian model is also saved to obtain the trained classifier.
[0077] The preprocessed tension data is input into the trained classifier for classification.
[0078] During classification, the data in the sliding window is put into the trained decision tree model and Bayesian model to obtain the decision tree prediction result, the Bayesian prediction result and their respective prediction probabilities. The actual prediction result R is obtained by comparing the decision tree prediction result and the Naive Bayes prediction result. R refers to the predicted class, which is the bridge ID in this scheme.
[0079] In this embodiment, the actual prediction result R is calculated as follows:
[0080] in, R1 is the prediction result of the decision tree, R2 is the prediction result of the Bayesian method, CR1 and CR2 are the number of non-zero elements in the predicted bridge steel strand number sequence X = {x1, x2, x3…xn} and Y = {y1, y2, y3…yn} in the sliding window compared with the actual data sequence M = {ml, m2, m3…mn} in the sliding window, respectively. C is the number of non-zero elements in the sliding window * λ, where λ is a set coefficient, less than or equal to 1. In this embodiment, λ is preferably, but not limited to, 0.8. When R = other, it means that R1 and R2 are significantly different from the data in the sliding window, and there is a possibility of data partitioning error. In this case, the sliding window needs to be updated, moved one position to the right, and the above steps are repeated until an actual result is obtained.
[0081] During the prediction process, when the prediction probability no longer increases and the actual length of the data within the sliding window (i.e., the actual length of the steel strand number sequence) is the same as the length of the prediction result sequence (i.e., the original length of the steel strand number sequence corresponding to the prediction result R), a split point is added to the data stream. At this point, the actual data in the sliding window is the data of a bridge. If they are different, data is added to the sliding window and the prediction continues.
[0082] When the predicted probability decreases, a split point is added to the data stream. The split point is set before the current data, and the data received this time is placed into the initialized sliding window as a new set of data.
[0083] The real-time classification results are displayed to the construction workers in a visual manner, and warning signals are issued based on the classification results to remind the construction workers to pay attention to abnormal situations.
[0084] After the sensor receives a data point and obtains a matching result, it establishes a task for the corresponding project. It compares the real-time tension force value in the tension data obtained from the classification with the set value. If the difference between the two exceeds the set threshold, an alarm is triggered, prompting relevant personnel to indicate that the tension of the duct is abnormal.
[0085] This invention also proposes a real-time classification system for bridge prestressed tensioning construction data streams, including a tensioning data acquisition module, a processing unit, and a storage unit. The tensioning data acquisition unit is connected to the processing unit and sends the acquired tensioning data to the processing unit. The processing unit is communicatively connected to a server to obtain the original data of each bridge in the project from the server. The processing unit is communicatively connected to the storage unit, which stores at least one executable instruction. The executable instruction causes the processing unit to perform operations corresponding to the aforementioned real-time classification method for bridge prestressed tensioning construction data streams based on the tensioning data and the original data, thereby performing real-time classification of the bridge prestressed tensioning construction data streams.
[0086] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0087] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A real-time classification method for data streams in bridge prestressing tensioning construction, characterized in that, Includes the following steps: Obtain the raw data of each bridge in the project from the server and generate a dataset; Real-time collection and preprocessing of tension data during the prestressing tensioning construction of each bridge within the project; A classifier is constructed based on a decision tree model and a Bayesian model. The classifier is trained on the dataset. During training, the probabilities of the decision tree model are compared with the prior probabilities of the Bayesian model. Based on the dataset, the Shannon entropy of each bridge's corresponding data is calculated in the decision tree model. During the calculation, the probability of each feature in the decision tree model is compared with the prior probability in the Bayesian model. If they are different, the prior probability of the Bayesian model is used instead of the probability of the decision tree model to calculate the empirical entropy. , Where D is the dataset, H(D) is the empirical entropy of dataset D, n is the number of categories, Pi is the proportion of the i-th category sample in dataset D, i.e. the probability of the decision tree, and Mi is the prior probability of Bayes. By iterating through all the data for each bridge, calculating the empirical conditional entropy and information gain based on the empirical entropy, the optimal feature index value of the decision tree is obtained. g(D, A) = H(D) - H(D|A), , Where g(D, A) is the information gain value, A is the feature, and prob i The probability of a subset partitioned based on features, prob i = Length of the i-th subset / Length of the dataset, H(D|A) is the empirical conditional entropy; Generate a decision tree based on the optimal feature index value; The preprocessed tension data is input into the trained classifier for classification. During classification, the data in the sliding window is fed into the trained decision tree model and the Bayesian model to obtain the decision tree prediction results, the Bayesian prediction results, and their respective prediction probabilities. The actual prediction results are then obtained by comparing the decision tree prediction results and the Naive Bayes prediction results. Actual prediction results , in, CR1 is the number of identical non-zero elements in the predicted bridge steel strand number sequence corresponding to the decision tree prediction result R1 compared with the actual data sequence in the sliding window. CR2 is the number of identical non-zero elements in the predicted bridge steel strand number sequence corresponding to the Bayes prediction result R2 compared with the actual data sequence in the sliding window. C is the number of non-zero elements in the sliding window * λ, where λ is a set coefficient.
2. The real-time classification method for bridge prestressing tensioning construction data stream according to claim 1, characterized in that, The steps to generate a dataset using the original data are as follows: Separate the sequence of steel strand counts for each bridge from the raw data; The lengths of all steel strand number sequences are supplemented to the maximum length of steel strand number sequences existing in this project; Replace the elements from 1 to the maximum length - 1 in the length-supplemented steel strand number sequence with 0 in stages to obtain all element combinations of the steel strand number sequence. The dataset for this project is obtained by combining all elements of each steel strand number sequence and adding labels.
3. The real-time classification method for bridge prestressing tensioning construction data stream according to claim 1, characterized in that, During the preprocessing of tensioning data, the continuity of the tensioning data is determined by the data number of the steel strands in the tensioning data, and a sliding window of fixed length is used to process the steel strand number segments. The length of the sliding window is determined by the maximum length of the steel strand number sequence in the dataset.
4. The real-time classification method for bridge prestressing tensioning construction data stream according to claim 3, characterized in that, The length of the sliding window is set according to the maximum length of the steel strand number sequence in the dataset. The steel strand number segments in the collected tension data are placed into the sliding window, and the continuity of the data is determined according to the data number corresponding to the steel strand number segment. If they are not continuous, they are processed according to the difference between the data numbers of two adjacent steel strand segments. If the difference is less than the remaining size of the current sliding window, the steel strand segments are placed into the sliding window in the order of their data numbers, and missing positions are filled with 0. If the difference is greater than or equal to the remaining size of the current sliding window, the current sliding window is filled in completely, and the sliding window is initialized according to the remaining difference. If they are consecutive, place the steel strand number segments into the sliding window in order of data number.
5. The real-time classification method for bridge prestressing tensioning construction data stream according to claim 1, characterized in that, When the prediction probability no longer increases and the actual length of the data in the sliding window is the same as the length of the prediction result sequence, the data stream adds a dividing point. At this time, the actual data in the sliding window is the data of a bridge. When the predicted probability decreases, a split point is added to the data stream. The split point is set at the current data position, and the data received this time is placed into the initialized sliding window as a new set of data.
6. The real-time classification method for bridge prestressing tensioning construction data stream according to claim 1, characterized in that, The system compares the real-time tension force value in the tension data obtained from the classification with the set value. If the difference between the two exceeds the set threshold, an alarm is triggered.
7. A real-time classification system for data streams in bridge prestressing tensioning construction, characterized in that, The system includes a tension data acquisition unit, a processing unit, and a storage unit. The tension data acquisition unit is connected to the processing unit and sends the acquired tension data to the processing unit. The processing unit is communicatively connected to a server to obtain the original data of each bridge in the project from the server. The processing unit is also communicatively connected to the storage unit, which stores at least one executable instruction. The executable instruction causes the processing unit to perform the operation corresponding to the real-time classification method for bridge prestressed tensioning construction data stream as described in any one of claims 1-6, based on the tension data and the original data, thereby performing real-time classification of the bridge prestressed tensioning construction data stream.