Cement dosage detection method and computer equipment
By constructing a linear regression model and using historical data to estimate cement dose, the problem of time-consuming and labor-intensive and errors of traditional methods is solved, and the rapid and accurate detection of cement dose is achieved, and the quality of concrete and engineering efficiency are improved.
Patent Information
- Application Number
- CN202410922909.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Traditional cement dose determination methods are time-consuming and labor-intensive and may have errors, making it difficult to ensure the quality and performance of concrete.
By obtaining historical concrete data for data preprocessing, a linear regression model is constructed, and the model is used to estimate the cement dose of concrete to be detected to improve detection efficiency and accuracy.
It realizes rapid and accurate testing of cement dose, reduces test costs and time, accelerates project progress, and improves the quality and performance of concrete.
Smart Images

Figure CN118761322B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cement dosage detection, and in particular, to a cement dosage detection method and computer equipment. Background Art
[0002] In the field of concrete production and construction, ensuring the quality and performance of concrete is of vital importance. The strength and durability of concrete largely depends on its mix proportion, especially the amount of cement. Traditional methods of determining cement dosage rely on empirical formulas or experimental methods, which are time-consuming, labor-intensive, and may contain errors. Summary of the invention
[0003] The main purpose of this application is to provide a cement dosage detection method and computer equipment to use historical concrete data to build a model to accurately predict the cement dosage of concrete and improve the detection efficiency of cement dosage.
[0004] In order to achieve the above-mentioned invention object, the present application provides a cement dosage detection method, comprising:
[0005] Acquire historical concrete data, wherein the historical concrete data includes reference cement dosage, reference water-binder ratio, reference admixture dosage and reference concrete strength;
[0006] Performing data preprocessing on the historical concrete data to obtain standard concrete data;
[0007] Determining a plurality of target-related parameters related to a reference cement dosage according to the standard concrete data;
[0008] Constructing a linear regression model according to the multiple target association parameters, inputting the standard concrete data into the linear regression model for training, and obtaining a cement dosage estimation model;
[0009] Acquire concrete sample data of the concrete to be tested, input the concrete sample data into the cement dosage estimation model, and obtain the target cement dosage of the concrete to be tested.
[0010] In one embodiment, data preprocessing is performed on the historical concrete data to obtain standard concrete data, including:
[0011] After data cleaning, data standardization and data classification are performed on the historical concrete data in sequence, standard concrete data are obtained.
[0012] In one embodiment, a plurality of target-related parameters related to a reference cement dosage are determined based on the standard concrete data, including:
[0013] Determine a plurality of initial correlation parameters from the standard concrete data, and calculate the reference cement dosage and an average value of each initial correlation parameter respectively;
[0014] Calculating the difference between each reference cement dosage and each corresponding initial correlation parameter respectively, to obtain a plurality of first difference values of each initial correlation parameter;
[0015] Calculating the difference between the reference cement dosage and the average value of each initial correlation parameter respectively to obtain a second difference value of each initial correlation parameter;
[0016] Calculating the product of each first difference value of each of the initial association parameters and the corresponding second difference value to obtain a plurality of first values of each of the initial association parameters;
[0017] After adding the multiple first values of each of the initial association parameters, a second value of each of the initial association parameters is obtained;
[0018] Calculating the sum of squares of the plurality of first values of each of the initial association parameters and performing a square root operation to obtain a third value of each of the initial association parameters;
[0019] Calculating the ratio of the second value of each of the initial correlation parameters to the corresponding third value to obtain the correlation strength between the reference cement dosage and each of the initial correlation parameters;
[0020] An initial correlation parameter whose correlation strength is greater than a preset value is selected from the plurality of initial correlation parameters as a target correlation parameter.
[0021] In one embodiment, a linear regression model is constructed based on the multiple target association parameters, including the following formula:
[0022]
[0023] Wherein, Y is the reference cement dosage, D 0 , D 1 , D 2 …D N is the model parameter, the X 1 , X 2 …X N is the target association parameter, N is the number of target association parameters, F is the error term, and F is a constant.
[0024] In one embodiment, the standard concrete data is input into the linear regression model for training to obtain a cement dosage estimation model, including:
[0025] Setting training conditions, inputting the standard concrete data into the linear regression model, iteratively training the linear regression model according to the training conditions, and obtaining a training result output after each iterative training of the linear regression model, wherein the training conditions include the number of training times and the training time;
[0026] Based on the training results output after each iterative training of the linear regression model, a preset square cross entropy loss function is used to respectively calculate the square cross entropy loss value after each iterative training of the linear regression model;
[0027] Calculate the standard deviation according to the square cross entropy loss value after each iterative training of the linear regression model, and determine whether the standard deviation is lower than a preset standard deviation;
[0028] When it is determined that the standard deviation is lower than the preset standard deviation, determining whether each of the square cross entropy loss values is lower than a preset square cross entropy loss value, the preset square cross entropy loss value is 0.8;
[0029] When it is determined that any of the square cross entropy loss values is not lower than the preset square cross entropy loss value, the gradient of each of the model parameters in the linear regression model with respect to the square cross entropy loss value is calculated using a preset chain rule of derivation;
[0030] Based on the gradient of each model parameter to the square cross entropy loss value, each model parameter of the linear regression model is adjusted in turn according to the preset stochastic gradient descent method, and the linear regression model is re-iteratively trained according to the training conditions using the standard concrete data until the standard deviation is lower than the preset standard deviation and each square cross entropy loss value is lower than the preset square cross entropy loss value, so as to obtain a trained cement dosage estimation model.
[0031] In one embodiment, the gradient of each model parameter in the linear regression model to the squared cross entropy loss value is calculated using a preset chain rule of derivation, including:
[0032] For each model parameter in the linear regression model, calculate the gradient of a preset square cross entropy loss function with respect to each model parameter to obtain an initial gradient of each model parameter;
[0033] Calculate the gradient of the intermediate variable corresponding to each of the model parameters to the square cross entropy loss value according to a preset Sigmoid function to obtain the intermediate gradient of each of the model parameters;
[0034] The initial gradient of each model parameter is multiplied by the corresponding intermediate gradient, and the square root is calculated to obtain the gradient of each model parameter with respect to the squared cross entropy loss value.
[0035] In one embodiment, after preprocessing the historical concrete data to obtain standard concrete data, the method further includes:
[0036] Filtering target data from the standard concrete data;
[0037] Encrypting the target data according to an elliptic curve encryption algorithm to obtain target encrypted data, calculating the information volume of the target encrypted data, and evenly dividing the target encrypted data into a plurality of data blocks according to the information volume of the target encrypted data;
[0038] Traversing each storage node of the pre-built distributed storage system, mapping each storage node to a different first hash value, wherein the first hash value of each storage node is on the same hash ring, wherein the hash ring is a continuous space from 0 to M, where M is a positive integer;
[0039] Calculate the second hash value of each data block respectively, and map the second hash value of each data block to the first storage node encountered when searching clockwise on the hash ring, to obtain the target storage node of each data block;
[0040] Each of the data blocks is stored in a corresponding target storage node respectively, and the segmentation information of each of the data blocks is recorded, and a comparison table between the segmentation information of each of the data blocks and the target data is constructed, wherein the segmentation information includes the segmentation identifier and sorting information of the data block.
[0041] In one embodiment, filtering out target data from the standard concrete data includes:
[0042] Determine a label of each of the standard concrete data, and use a word embedding algorithm to vectorize the label of each of the standard concrete data to obtain a first vector of each of the standard concrete data;
[0043] Determine a target label of the target data, and vectorize the target label using a word embedding algorithm to obtain a second vector of the target data;
[0044] The cosine distance between the first vector of each standard concrete data and the second vector of the target data is calculated respectively, and the standard concrete data whose cosine distance is greater than a preset cosine distance is selected as the target data, and the preset cosine distance is 0.95.
[0045] In one embodiment, after constructing the comparison table between the segmentation information and the target data of each data block, the method further includes:
[0046] In response to a data acquisition request for the target data, querying a target storage node corresponding to each data block of the target data according to the data acquisition request;
[0047] Respectively acquiring each data block corresponding to the target data from the target storage node of each data block to obtain a plurality of target data blocks;
[0048] Querying the target segmentation information of each target data block from the comparison table, extracting the segmentation identifier and sorting information of the target segmentation information of each target data block, and splicing the multiple target data blocks according to the segmentation identifier and sorting information of each target data block to obtain target encrypted data;
[0049] After decrypting the target encrypted data, the target data is obtained.
[0050] The present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0051] The present application provides a cement dosage detection method and computer equipment, which obtains historical concrete data, performs data preprocessing on the historical concrete data, obtains standard concrete data, determines multiple target association parameters related to a reference cement dosage based on the standard concrete data, builds a linear regression model based on the multiple target association parameters, inputs the standard concrete data into the linear regression model for training, and obtains a cement dosage estimation model; obtains concrete sample data of the concrete to be detected, inputs the concrete sample data into the cement dosage estimation model, and obtains the target cement dosage of the concrete to be detected, so as to fully utilize the historical concrete data to build a model, and automatically and accurately predicts the target cement dosage of the concrete to be detected through the model, thereby reducing the test cost and time and accelerating the project progress. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of a cement dosage detection method according to an embodiment of the present application;
[0053] Figure 2 This is a schematic block diagram of the structure of a cement dosage detection device according to an embodiment of the present application;
[0054] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0055] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] A cement dosage detection method proposed in the present application, the execution subject is a computer device, the computer device can be any type of static or mobile computing device, and can also be a mobile or static server. The components of the computer device include but are not limited to memory and processor. The processor is connected to the memory through a bus, and the database is used to save data. The computer device also includes an access device, which enables the computer device to communicate via one or more networks. Examples of these networks include a combination of a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN) or a communication network such as the Internet. The access device may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as IEEE802.11 wireless local area network (WLAN) wireless interface, a global microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, etc.
[0058] refer to Figure 1 In one embodiment, the present application provides a cement dosage detection method, the method comprising:
[0059] S100, obtaining historical concrete data, wherein the historical concrete data includes reference cement dosage, reference water-binder ratio, reference admixture dosage and reference concrete strength;
[0060] S200, performing data preprocessing on the historical concrete data to obtain standard concrete data;
[0061] S300, determining a plurality of target associated parameters related to a reference cement dosage according to the standard concrete data;
[0062] S400, constructing a linear regression model according to the multiple target association parameters, inputting the standard concrete data into the linear regression model for training, and obtaining a cement dosage estimation model;
[0063] S500: Acquire concrete sample data of the concrete to be tested, input the concrete sample data into the cement dosage estimation model, and obtain the target cement dosage of the concrete to be tested.
[0064] Among them, historical concrete data refers to data collected during the past concrete production process, including cement dosage, water-cement ratio, admixture dosage and concrete strength. The water-cement ratio is an important parameter in concrete, which refers to the ratio of the volume of water in concrete to the volume of cement. This ratio has a significant impact on the strength, workability (i.e., the construction properties of concrete such as fluidity and plasticity) and durability of concrete. The reference admixture dosage refers to the amount of admixture determined in advance during the concrete production process according to design requirements or construction conditions. An admixture is a chemical substance added to concrete to improve the performance of concrete. Concrete strength refers to the ability of concrete to resist damage when subjected to pressure or tension, which directly affects the safety and durability of concrete structures.
[0065] Data preprocessing is a data processing method that cleans, formats, and standardizes raw data to facilitate subsequent analysis and modeling. After data preprocessing, the data set that meets certain standards and formats is called standard concrete data.
[0066] The target correlation parameter is a parameter related to cement dosage, such as water-binder ratio, admixture dosage, etc. When a parameter highly correlated with cement dosage is selected from standard concrete data as the target correlation parameter, the correlation coefficient between cement dosage and other parameters, such as the Pearson correlation coefficient, can be calculated to evaluate the strength of the linear relationship between them. In addition, a scatter plot matrix or heat map can be drawn to visualize the correlation between parameters.
[0067] Linear regression models are used to predict the relationship between a continuous dependent variable (such as cement dosage) and one or more independent variables (such as target association parameters). This cement dosage estimation model is a model built based on linear regression and is used to predict the required cement dosage in concrete.
[0068] When constructing the model in this embodiment, a linear regression method can be used to construct the model, determine the coefficients of various parameters, and then use standard concrete data to train the model, and adjust the model parameters to minimize the prediction error. Finally, the accuracy and generalization ability of the model are evaluated, such as through cross-validation and other methods, and finally a qualified cement dosage estimation model is obtained for automatically predicting the cement dosage of the concrete to be tested.
[0069] Finally, concrete sample data of the concrete to be tested is obtained. The concrete sample data is data corresponding to target associated parameters related to cement dosage, such as specific values of water-cement ratio and specific values of admixture dosage, etc. The concrete sample data is input into the cement dosage estimation model, and the target cement dosage of the concrete to be tested is automatically predicted using the cement dosage estimation model.
[0070] For example, suppose there is a set of historical concrete data, including 1,000 samples, each of which records the cement dosage, water-binder ratio, admixture dosage, and concrete strength. First, the computer device preprocesses the data, and then selects the water-binder ratio and admixture dosage as the target association parameters. Next, a linear regression model is constructed using the computer device, and the model parameters are obtained through training. Finally, for a new concrete sample, its water-binder ratio and admixture dosage are input, and the model predicts the required cement dosage. For example, if the water-binder ratio of the new sample is 0.5 and the admixture dosage is 1.5 liters, based on the trained model, the computer device may predict that the cement dosage is 300 kg, which helps to optimize the use of cement, reduce costs, and ensure the quality of concrete.
[0071] The present application provides a cement dosage detection method, which obtains historical concrete data, performs data preprocessing on the historical concrete data, obtains standard concrete data, determines multiple target association parameters related to a reference cement dosage based on the standard concrete data, builds a linear regression model based on the multiple target association parameters, inputs the standard concrete data into the linear regression model for training, and obtains a cement dosage estimation model; obtains concrete sample data of the concrete to be detected, inputs the concrete sample data into the cement dosage estimation model, and obtains the target cement dosage of the concrete to be detected, so as to fully utilize the historical concrete data to build a model, and automatically and accurately predicts the target cement dosage of the concrete to be detected through the model, thereby reducing the test cost and time and accelerating the progress of the project.
[0072] In one embodiment, data preprocessing is performed on the historical concrete data to obtain standard concrete data, including:
[0073] After data cleaning, data standardization and data classification are performed on the historical concrete data in sequence, standard concrete data are obtained.
[0074] In this embodiment, data preprocessing of historical concrete data to obtain standard concrete data is an important step before data analysis and modeling. This embodiment provides the following data preprocessing method:
[0075] 1. Data cleaning
[0076] Remove Duplicate Records: Check for and remove duplicate entries in your dataset.
[0077] Identify and handle missing values: Determine the cause of missing data, and then choose to fill missing values (such as using the mean, median, mode, or a predictive model), delete records, or mark them with a special value such as NaN.
[0078] 2. Data formatting
[0079] Standardize data formats: Make sure all data follows the same format, such as date, time, or numeric format.
[0080] Convert data types: Convert data to the appropriate type, such as converting a string to a numeric or date type.
[0081] 3. Data Standardization
[0082] Scaling values: Use min-max standardization or Z-score standardization to scale the data to a uniform range or distribution.
[0083] 4. Data smoothing
[0084] For data with noise, smoothing techniques can be used to reduce fluctuations.
[0085] 5. Data classification
[0086] The data items are divided into different categories or groups according to certain criteria or characteristics. This process is often used in pattern recognition, information retrieval, machine learning and other fields.
[0087] The quality of data preprocessing directly affects the performance of the model and the reliability of the results. Through the above steps, this embodiment can ensure that the data set is clean, consistent, and in a uniform format, and is suitable for further analysis and modeling.
[0088] In one embodiment, a plurality of target-related parameters related to a reference cement dosage are determined based on the standard concrete data, including:
[0089] Determine a plurality of initial correlation parameters from the standard concrete data, and calculate the reference cement dosage and an average value of each initial correlation parameter respectively;
[0090] Calculating the difference between each reference cement dosage and each corresponding initial correlation parameter respectively, to obtain a plurality of first difference values of each initial correlation parameter;
[0091] Calculating the difference between the reference cement dosage and the average value of each initial correlation parameter respectively to obtain a second difference value of each initial correlation parameter;
[0092] Calculating the product of each first difference value of each of the initial association parameters and the corresponding second difference value to obtain a plurality of first values of each of the initial association parameters;
[0093] After adding the multiple first values of each of the initial association parameters, a second value of each of the initial association parameters is obtained;
[0094] Calculating the sum of squares of the plurality of first values of each of the initial association parameters and performing a square root operation to obtain a third value of each of the initial association parameters;
[0095] Calculating the ratio of the second value of each of the initial correlation parameters to the corresponding third value to obtain the correlation strength between the reference cement dosage and each of the initial correlation parameters;
[0096] An initial correlation parameter whose correlation strength is greater than a preset value is selected from the plurality of initial correlation parameters as a target correlation parameter.
[0097] In this embodiment, the initial associated parameters refer to parameters in the concrete data that may be associated with cement dosage, such as water-binder ratio, aggregate dosage, etc.
[0098] In this embodiment, the reference cement dosage and the average value of each initial associated parameter in the standard concrete data are calculated respectively, the difference between each reference cement dosage and each corresponding initial associated parameter is calculated to obtain multiple first difference values of each initial associated parameter, the difference between the average value of the reference cement dosage and each initial associated parameter is calculated to obtain the second difference value of each initial associated parameter, for each first difference value of each initial associated parameter, the product of each first difference value and the corresponding second difference value is calculated to obtain the first value, and the multiple first values of each initial associated parameter are added to obtain the second value of each initial associated parameter, the square sum of all the first values of each initial associated parameter is calculated, and then a square root operation is performed to obtain the third value, and the ratio of the second value of each initial associated parameter to the corresponding third value is calculated to obtain the association strength between the reference cement dosage and each initial associated parameter. The association strength represents a quantitative indicator of the degree of association between the reference cement dosage and the initial associated parameter. Finally, according to a preset association strength threshold, the initial associated parameter with an association strength greater than the threshold is screened out as the target association parameter.
[0099] For example, suppose there is the following concrete data set, including cement dosage (C) and two initial associated parameters: water-binder ratio (W) and aggregate dosage (A), taking aggregate dosage (A) as an example.
[0100] Standard concrete dataset:
[0101] C:[300,350,400];
[0102] A:[1000,1100,1200];
[0103] Calculate the average:
[0104] Average value of C: (300+350+400) / 3=350;
[0105] The average value of A: (1000+1100+1200) / 3=1100;
[0106] Calculate the difference:
[0107] For A, the first difference: [700,750,800]; the second difference: [800,750,700];
[0108] Calculate the first value:
[0109] For A: [(700*800), (750*750), (800*700)], i.e. [560000, 562500, 560000];
[0110] Calculate the second value:
[0111] For A: [560000+562500+560000=1682500];
[0112] Calculate the third value:
[0113] Calculate the strength of association:
[0114] For A: 1682500 / 971393≈1.7.
[0115] Filter target associated parameters:
[0116] Assuming that the preset association strength threshold is 1.5, A (aggregate amount) will be selected as the target association parameter.
[0117] This embodiment helps to accurately identify key parameters that have a significant impact on cement dosage by quantitatively evaluating the degree of correlation between initial correlation parameters and cement dosage. At the same time, the screened target correlation parameters can be used for subsequent concrete design optimization, quality control or model construction.
[0118] In one embodiment, a linear regression model is constructed based on the multiple target association parameters, including the following formula:
[0119]
[0120] Wherein, Y is the reference cement dosage, D 0 , D 1 , D 2 …D N is the model parameter, the X 1 , X 2 …X N is the target association parameter, N is the number of target association parameters, F is the error term, and F is a constant.
[0121] In one embodiment, the standard concrete data is input into the linear regression model for training to obtain a cement dosage estimation model, including:
[0122] Setting training conditions, inputting the standard concrete data into the linear regression model, iteratively training the linear regression model according to the training conditions, and obtaining a training result output after each iterative training of the linear regression model, wherein the training conditions include the number of training times and the training time;
[0123] Based on the training results output after each iterative training of the linear regression model, a preset square cross entropy loss function is used to respectively calculate the square cross entropy loss value after each iterative training of the linear regression model;
[0124] Calculate the standard deviation according to the square cross entropy loss value after each iterative training of the linear regression model, and determine whether the standard deviation is lower than a preset standard deviation;
[0125] When it is determined that the standard deviation is lower than the preset standard deviation, determining whether each of the square cross entropy loss values is lower than a preset square cross entropy loss value, the preset square cross entropy loss value is 0.8;
[0126] When it is determined that any of the square cross entropy loss values is not lower than the preset square cross entropy loss value, the gradient of each of the model parameters in the linear regression model with respect to the square cross entropy loss value is calculated using a preset chain rule of derivation;
[0127] Based on the gradient of each model parameter to the square cross entropy loss value, each model parameter of the linear regression model is adjusted in turn according to the preset stochastic gradient descent method, and the linear regression model is re-iteratively trained according to the training conditions using the standard concrete data until the standard deviation is lower than the preset standard deviation and each square cross entropy loss value is lower than the preset square cross entropy loss value, so as to obtain a trained cement dosage estimation model.
[0128] This embodiment provides a method of iterative training using a linear regression model, and minimizes the loss function by optimizing model parameters, ultimately obtaining a well-trained cement dosage estimation model.
[0129] Among them, the squared cross entropy loss function is a loss function used for classification problems, but its variants can also be used in regression problems to measure the difference between the predicted value and the actual value.
[0130] The standard deviation is a statistic used to measure the degree of dispersion of a set of values and is used to evaluate the stability of the loss value during model training.
[0131] The chain rule is a method used in calculus to calculate the derivatives of composite functions.
[0132] The gradient is the partial derivative of the loss function with respect to the model parameters, indicating the direction in which the loss function grows fastest in the parameter space.
[0133] Stochastic gradient descent is an optimization algorithm that adjusts model parameters to minimize the loss function. The model parameters are the coefficients associated with the independent variables in linear regression.
[0134] Specifically, this embodiment first sets an initial value for each model parameter in the linear regression model and sets training conditions, which include the number of training times and training time. Then, the linear regression model is trained using standard concrete data, and iterated according to the training conditions (such as the number of training times and training time). After each iteration, the loss value is calculated using the square cross entropy loss function based on the training results output after each iterative training of the linear regression model. The training results include the prediction results of the model, the parameter update history, the actual training time, the actual number of training times, and the like.
[0135] Then, calculate the standard deviation of all loss values and determine whether the standard deviation is lower than the preset standard deviation to evaluate the stability of the loss value during model training. If the standard deviation is lower than the preset standard deviation, check whether each loss value is lower than the preset loss value. If the condition is not met, calculate the gradient of each model parameter and update the parameter according to the stochastic gradient descent method. Use the updated parameters to continue iterating the model until all stop conditions are met, that is, the standard deviation is lower than the preset standard deviation and all loss values are lower than the preset loss value.
[0136] For example, suppose a linear regression model is being trained to predict cement dosage in concrete. The independent variables of the model include water-cement ratio and aggregate dosage. The number of training times can be set to 1000 and the training time can be set to 1 hour. After each iteration, the squared cross entropy loss value is calculated and the standard deviation is monitored. If the standard deviation is lower than the preset standard deviation of 0.1 during training, and all loss values are lower than the preset loss value of 0.8, the computer device will stop training. If any condition is not met, the gradient will be calculated and the model parameters will be updated, and then the iterative training will continue until all stop conditions are met, and finally a well-trained cement dosage estimation model is obtained.
[0137] This embodiment can obtain a cement dosage estimation model with high prediction accuracy by iterative training and parameter optimization using the stochastic gradient descent method.
[0138] In one embodiment, the gradient of each model parameter in the linear regression model to the squared cross entropy loss value is calculated using a preset chain rule of derivation, including:
[0139] For each model parameter in the linear regression model, calculate the gradient of a preset square cross entropy loss function with respect to each model parameter to obtain an initial gradient of each model parameter;
[0140] Calculate the gradient of the intermediate variable corresponding to each of the model parameters to the square cross entropy loss value according to a preset Sigmoid function to obtain the intermediate gradient of each of the model parameters;
[0141] The initial gradient of each model parameter is multiplied by the corresponding intermediate gradient, and the square root is calculated to obtain the gradient of each model parameter with respect to the squared cross entropy loss value.
[0142] This embodiment provides a method for optimizing parameters in a linear regression model, which involves calculating the gradient of model parameters relative to a loss function and adjusting them using a Sigmoid function. The Sigmoid function is a mathematical function used to map any real number to the interval (0,1) to achieve probability estimation of a binary classification problem.
[0143] Specifically, for each model parameter in the linear regression model, this embodiment uses the square cross entropy loss function to calculate the partial derivative of each model parameter to obtain the initial gradient, calculates the value of the model output value after passing through the Sigmoid function, and uses it to adjust the gradient. According to the output of the Sigmoid function, the intermediate gradient of the intermediate variable corresponding to each model parameter to the square cross entropy loss value is calculated, the initial gradient is multiplied by the corresponding intermediate gradient and the square root is calculated to obtain the final gradient, and the model parameters are updated according to the final gradient and the preset learning rate until the model converges or reaches the preset number of iterations.
[0144] This embodiment can more effectively optimize model parameters and improve the prediction accuracy of the model by calculating and adjusting the gradient. At the same time, the use of the Sigmoid function can improve the distribution of gradients in some cases and avoid the problem of gradient disappearance or explosion.
[0145] In one embodiment, after preprocessing the historical concrete data to obtain standard concrete data, the method further includes:
[0146] Filtering target data from the standard concrete data;
[0147] Encrypting the target data according to an elliptic curve encryption algorithm to obtain target encrypted data, calculating the information volume of the target encrypted data, and evenly dividing the target encrypted data into a plurality of data blocks according to the information volume of the target encrypted data;
[0148] Traversing each storage node of the pre-built distributed storage system, mapping each storage node to a different first hash value, wherein the first hash value of each storage node is on the same hash ring, wherein the hash ring is a continuous space from 0 to M, where M is a positive integer;
[0149] Calculate the second hash value of each data block respectively, and map the second hash value of each data block to the first storage node encountered when searching clockwise on the hash ring, to obtain the target storage node of each data block;
[0150] Each of the data blocks is stored in a corresponding target storage node respectively, and the segmentation information of each of the data blocks is recorded, and a comparison table between the segmentation information of each of the data blocks and the target data is constructed, wherein the segmentation information includes the segmentation identifier and sorting information of the data block.
[0151] In this embodiment, target data is screened out from standard concrete data, and the target data is data of high importance, such as cement dosage and concrete strength, to ensure that only the most important data is encrypted and stored, which helps to improve data security and reduce unnecessary data processing.
[0152] Then, the preset elliptic curve encryption algorithm is used to encrypt the screened target data to obtain the target encrypted data, so as to ensure the confidentiality of the data through encryption. Even if the data is intercepted during transmission, it cannot be read by unauthorized persons. The elliptic curve encryption algorithm (ECC) is an encryption algorithm based on the public key cryptography system of elliptic curve mathematics, which can be used in scenarios such as secure communication, data encryption, and digital signatures.
[0153] In addition, this embodiment can also calculate the amount of information of the target encrypted data, and divide the data into multiple data blocks evenly according to the amount of information, such as dividing 10G of target encrypted data into 10 data blocks, and the amount of information of each data block is 1G, which helps to improve the efficiency and reliability of distributed storage, and supports parallel processing and storage.
[0154] Then, each storage node of the pre-built distributed storage system is traversed, and each node is mapped to a different first hash value on the hash ring, which provides a method for evenly distributing data, helping to balance storage load and optimize data access. At the same time, a second hash value is calculated for each data block, and the hash value is mapped to the hash ring, and the first storage node encountered is searched clockwise as the target storage node of the data block, thereby ensuring that the mapping between data blocks and storage nodes is uniform and consistent, which helps to improve the efficiency of data access.
[0155] For example, suppose there is a distributed storage system that includes three storage nodes A, B, and C, and uses a consistent hashing algorithm to determine the storage location of data blocks. Node A is mapped to point 123 on the hash ring, node B is mapped to point 260, and node C is mapped to point 410. The hash value of data block D1 corresponds to point 100 on the ring, D2 corresponds to point 200, and D3 corresponds to point 400. When determining the storage node, the first node found by data block D1 clockwise is A, so D1 is stored in node A; the first node found by data block D2 clockwise is B, so D2 is stored in node B; the first node found by data block D3 clockwise is C, so D3 is stored in node C.
[0156] Finally, each data block is stored in its corresponding target storage node, and the segmentation information of each data block is recorded, including the segmentation identifier and sorting information, which helps to reconstruct the original data when needed and ensure the integrity and traceability of the data.
[0157] In addition, the computer device also builds a comparison table to associate the segmentation information of each data block with its corresponding target data. The comparison table serves as a data index to facilitate the management and retrieval of data blocks stored in the distributed system, thereby improving the efficiency of data retrieval.
[0158] This embodiment can protect important data by encrypting the target data to avoid data leakage, and improve the reliability and fault tolerance of data through distributed storage. The hash ring and data block also improve the efficiency of data access and management. In addition, the recorded segmentation information and the constructed comparison table ensure the integrity and traceability of the data.
[0159] In one embodiment, filtering out target data from the standard concrete data includes:
[0160] Determine a label of each of the standard concrete data, and use a word embedding algorithm to vectorize the label of each of the standard concrete data to obtain a first vector of each of the standard concrete data;
[0161] Determine a target label of the target data, and vectorize the target label using a word embedding algorithm to obtain a second vector of the target data;
[0162] The cosine distance between the first vector of each standard concrete data and the second vector of the target data is calculated respectively, and the standard concrete data whose cosine distance is greater than a preset cosine distance is selected as the target data, and the preset cosine distance is 0.95.
[0163] In a dataset, a label is a classification or property description of each data point, such as the strength grade in concrete data.
[0164] Word embedding is a technique that converts text or labels into numerical vectors so that semantically similar words or labels are closer in the vector space, such as Word2Vec, GloVe, or BERT.
[0165] Vectorization is the process of converting non-numerical data (such as text) into numerical vectors to facilitate mathematical calculations and machine learning model processing.
[0166] Cosine distance is a method of measuring the straight-line distance between two points in multidimensional space.
[0167] This embodiment can determine the label of each standard concrete data, and use the pre-trained word embedding model to vectorize each label of each standard concrete data to obtain the first vector of each standard concrete data, and at the same time determine the target label of the target data to be screened, and use the same word embedding model to vectorize the label of the target data to obtain a second vector. For each pair of the first vector of the standard concrete data and the second vector of the target data, their cosine distance is calculated, and according to a preset cosine distance threshold (0.95 in this example), the standard concrete data with a cosine distance greater than the threshold is screened out as the target data, so as to accurately and quickly identify concrete samples with large differences from the target data.
[0168] In one embodiment, after constructing the comparison table between the segmentation information and the target data of each data block, the method further includes:
[0169] In response to a data acquisition request for the target data, querying a target storage node corresponding to each data block of the target data according to the data acquisition request;
[0170] Respectively acquiring each data block corresponding to the target data from the target storage node of each data block to obtain a plurality of target data blocks;
[0171] Querying the target segmentation information of each target data block from the comparison table, extracting the segmentation identifier and sorting information of the target segmentation information of each target data block, and splicing the multiple target data blocks according to the segmentation identifier and sorting information of each target data block to obtain target encrypted data;
[0172] After decrypting the target encrypted data, the target data is obtained.
[0173] In this embodiment, when a user initiates a data acquisition request for target data, the data acquisition request carries messages such as the target storage node corresponding to each data block of the target data. The computer device will query the database or reference table based on the data acquisition request to determine the target storage node where each data block of the target data is located, which helps to improve the efficiency and accuracy of data retrieval.
[0174] The computer device retrieves corresponding data blocks from each queried target storage node, which are part of the target data. By collecting data blocks from distributed storage nodes, the computer device can assemble complete target data and support distributed storage and redundant backup of data.
[0175] The segmentation information of each target data block, including the segmentation identifier and sorting information, is queried from the comparison table. According to the segmentation identifier and sorting information of each data block, multiple target data blocks are spliced together in the correct order to form complete target encrypted data, thereby ensuring the integrity of the target encrypted data.
[0176] The target encrypted data is decrypted using the decryption algorithm and key corresponding to the preset elliptic curve encryption algorithm to obtain the original target data. The decrypted target data is sent to the requesting user in a secure manner to allow authorized users to access the required target data, while ensuring the security and privacy of the data throughout the process.
[0177] This embodiment can ensure the integrity of data by querying and correctly splicing segmented information; at the same time, it optimizes the data retrieval and processing process and improves the speed of responding to user requests; in addition, it supports distributed storage of data and improves the reliability and scalability of the system.
[0178] Reference Figure 2 In an embodiment of the present application, a cement dosage detection device is also provided, the device comprising:
[0179] An acquisition module 100 is used to acquire historical concrete data, wherein the historical concrete data includes a reference cement dosage, a reference water-binder ratio, a reference admixture dosage, and a reference concrete strength;
[0180] A data preprocessing module 200 is used to perform data preprocessing on the historical concrete data to obtain standard concrete data;
[0181] A determination module 300, for determining a plurality of target associated parameters related to a reference cement dosage according to the standard concrete data;
[0182] A training module 400 is used to construct a linear regression model according to the multiple target association parameters, input the standard concrete data into the linear regression model for training, and obtain a cement dosage estimation model;
[0183] The input module 500 is used to obtain concrete sample data of the concrete to be tested, and input the concrete sample data into the cement dosage estimation model to obtain the target cement dosage of the concrete to be tested.
[0184] As described above, it can be understood that the various components of the cement dosage detection device proposed in the present application can realize the functions of any one of the cement dosage detection methods described above, and the specific structure will not be repeated.
[0185] Reference Figure 3 In the embodiment of the present application, a computer device is also provided, whose internal structure can be as follows Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor designed for the computer device is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the computer device is used to store relevant data of the cement dosage detection method. The network interface of the computer device is used to communicate with an external computer device via a network connection. When the computer program is executed by the processor, a cement dosage detection method is implemented.
[0186] In one embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, a cement dosage detection method is implemented.
[0187] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0188] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0189] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A cement dosage detection method, characterized in that: include: Acquire historical concrete data, wherein the historical concrete data includes reference cement dosage, reference water-binder ratio, reference admixture dosage and reference concrete strength; Performing data preprocessing on the historical concrete data to obtain standard concrete data; Determining a plurality of target-related parameters related to a reference cement dosage according to the standard concrete data; Constructing a linear regression model according to the multiple target association parameters, inputting the standard concrete data into the linear regression model for training, and obtaining a cement dosage estimation model; Acquire concrete sample data of the concrete to be tested, input the concrete sample data into the cement dosage estimation model, and obtain the target cement dosage of the concrete to be tested; Determining a plurality of target associated parameters related to a reference cement dosage according to the standard concrete data includes: Determine a plurality of initial correlation parameters from the standard concrete data, and calculate the reference cement dosage and an average value of each initial correlation parameter, respectively, wherein the initial correlation parameter refers to a parameter in the standard concrete data that may be associated with the cement dosage; Calculating the difference between each reference cement dosage and each corresponding initial correlation parameter respectively, to obtain a plurality of first difference values of each initial correlation parameter; Calculating the difference between the reference cement dosage and the average value of each initial correlation parameter respectively to obtain a second difference value of each initial correlation parameter; Calculating the product of each first difference value of each of the initial association parameters and the corresponding second difference value to obtain a plurality of first values of each of the initial association parameters; After adding the multiple first values of each of the initial association parameters, a second value of each of the initial association parameters is obtained; Calculating the sum of squares of the plurality of first values of each of the initial association parameters and performing a square root operation to obtain a third value of each of the initial association parameters; Calculating the ratio of the second value of each of the initial correlation parameters to the corresponding third value to obtain the correlation strength between the reference cement dosage and each of the initial correlation parameters; An initial correlation parameter whose correlation strength is greater than a preset value is selected from the plurality of initial correlation parameters as a target correlation parameter.
2. The method according to claim 1, characterized in that: The historical concrete data is preprocessed to obtain standard concrete data, including: After data cleaning, data standardization and data classification are performed on the historical concrete data in sequence, standard concrete data are obtained.
3. The method according to claim 1, characterized in that A linear regression model is constructed according to the multiple target association parameters, including the following formula: Wherein, Y is the reference cement dosage, and D0, D1, D2...D N are model parameters, X1, X2…X N is the target association parameter, N is the number of target association parameters, F is the error term, and F is a constant.
4. The method according to claim 1, characterized in that: After preprocessing the historical concrete data to obtain standard concrete data, the method further includes: Filtering target data from the standard concrete data; Encrypting the target data according to an elliptic curve encryption algorithm to obtain target encrypted data, calculating the information volume of the target encrypted data, and evenly dividing the target encrypted data into a plurality of data blocks according to the information volume of the target encrypted data; Traversing each storage node of the pre-built distributed storage system, mapping each storage node to a different first hash value, wherein the first hash value of each storage node is on the same hash ring, wherein the hash ring is a continuous space from 0 to M, where M is a positive integer; Calculate the second hash value of each data block respectively, and map the second hash value of each data block to the first storage node encountered when searching clockwise on the hash ring, to obtain the target storage node of each data block; Each of the data blocks is stored in a corresponding target storage node respectively, and the segmentation information of each of the data blocks is recorded, and a comparison table between the segmentation information of each of the data blocks and the target data is constructed, wherein the segmentation information includes the segmentation identifier and sorting information of the data block.
5. The method according to claim 4, characterized in that Target data is screened out from the standard concrete data, including: Determine a label of each of the standard concrete data, and use a word embedding algorithm to vectorize the label of each of the standard concrete data to obtain a first vector of each of the standard concrete data; Determine a target label of the target data, and vectorize the target label using a word embedding algorithm to obtain a second vector of the target data; The cosine distance between the first vector of each standard concrete data and the second vector of the target data is calculated respectively, and the standard concrete data whose cosine distance is greater than a preset cosine distance is selected as the target data, and the preset cosine distance is 0.
95.
6. The method according to claim 4, characterized in that After constructing a comparison table of the segmentation information and the target data of each data block, the method further includes: In response to a data acquisition request for the target data, querying a target storage node corresponding to each data block of the target data according to the data acquisition request; Respectively acquiring each data block corresponding to the target data from the target storage node of each data block to obtain a plurality of target data blocks; Querying the target segmentation information of each target data block from the comparison table, extracting the segmentation identifier and sorting information of the target segmentation information of each target data block, and splicing the multiple target data blocks according to the segmentation identifier and sorting information of each target data block to obtain target encrypted data; After decrypting the target encrypted data, the target data is obtained.
7. A computer device, characterized in that: include: processor; Memory; Wherein, the memory stores a computer program, and the processor implements the cement dosage detection method according to any one of claims 1 to 6 when executing the computer program.