A neural network-based modelica mechanism model privacy computing method and system

By replacing the empirical formulas in the Modelica mechanistic model with overfitting training of neural networks, the problem of model privacy leakage is solved, and the safe output of simulation results and the satisfaction of user needs are achieved.

CN116166958BActive Publication Date: 2025-10-24武汉鼎元同立科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211412325.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-10-24
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

In the Modelica mechanism model, empirical formulas are at risk of leakage during the modeling process in the Internet era, especially when the MoHub modeling and simulation cloud platform provides services to C-end users, making it difficult to protect the core privacy of the model.

Method used

By employing a privacy-preserving computation method based on neural networks, this approach utilizes legality assessment, interval sampling, thinning, and overfitting training to replace empirical formulas in the Modelica mechanistic model, generating an overfitted neural network model to output simulation results and thus achieving privacy protection.

Benefits of technology

While meeting users' simulation needs, it avoids the leakage of empirical formulas, protects the privacy of Modelica's mechanistic model, and achieves model security and normal user operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116166958B_ABST
    Figure CN116166958B_ABST
Patent Text Reader

Abstract

The application provides a kind of Modelica mechanism model privacy computing method and system based on neural network, it is related to software engineering technical field, including: judging whether the sampling interval input by user is legal, if legal, then interval sampling is carried out for sampling interval, each sampling value is obtained, and total sample is obtained by inputting empirical formula, the training sample and overfitting sample are obtained by sparsifying total sample;Neural network is fitted and trained based on training sample, to obtain trained neural network;The trained neural network is fitted and trained based on overfitting sample, to obtain overfitting neural network model;Modify Modelica mechanism model compiler, replace empirical formula with overfitting neural network model, calculate and output simulation result for user.The application obtains overfitting neural network model for the sampling interval input by user under specific working condition of user, meets the simulation demand of user, and avoids the leakage of empirical formula.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of software engineering, in particular to a Modelica mechanism model privacy calculation method and system based on a neural network. BACKGROUND

[0002] In a Modelica mechanism model, due to the limitations of the times, there are a large number of empirical formulas in modeling, such as the modeling related to the nuclear energy secondary circuit. These empirical formulas are valuable wealth of a company, which are summarized through a large number of tests by a company at a large cost of resources.

[0003] In the modeling process, these formulas need to be written into the model, which makes these formulas have a risk of leakage. Especially in the Internet era, modeling and simulation cloud platforms such as MoHub need to provide modeling services for C-end users. In this process, the empirical formulas have a risk of leakage.

[0004] Based on the neural network technology, the application proposes a fitting method for the empirical formula according to the working condition required by the user to simulate, as a substitute for the empirical formula under this working condition, which can cope with the changing user needs and protect the core privacy of the mechanism model. SUMMARY

[0005] In view of the above problems, the application provides a Modelica mechanism model privacy calculation method and system based on a neural network, which realizes classification and detection of the text with spatial information in the picture, and further does not need manual screening of the detected text, thereby reducing the screening cost.

[0006] To achieve the above purpose, the application provides a Modelica mechanism model privacy calculation method based on a neural network, which comprises the following steps:

[0007] It is judged whether the sampling interval input by the user is legal. If it is legal, interval sampling is performed for the sampling interval to obtain each sampling value;

[0008] Each sampling value is input into an empirical formula to obtain total samples. The total samples are thinned, and part of them is extracted as training samples, and the remaining part is used as overfitting samples;

[0009] The neural network is fitted and trained based on the training samples to obtain a trained neural network;

[0010] The trained neural network is fitted and trained again based on the overfitting samples to obtain an overfitting neural network model;

[0011] The Modelica mechanism model compiler is modified, the empirical formula is replaced by the over-fitted neural network model, and simulation results are calculated and output for the user according to the over-fitted neural network.

[0012] As a further improvement of the application, the method further comprises:

[0013] The method further comprises:

[0014] Conversely, the sampling interval is not legal, and the calculation is directly ended.

[0015] As a further improvement of the application, the equal-interval sampling is adopted when the sampling interval is sampled.

[0016] As a further improvement of the application, when the total sample is thinned, 1 / 3 of the points are extracted as training samples, and the remaining 2 / 3 of the points are used as over-fitting samples.

[0017] As a further improvement of the application, the neural network is fitted and trained based on the training sample to obtain a trained neural network.

[0018] The method further comprises:

[0019] The fitting algorithm is fitted and trained based on the training sample.

[0020] If the fitting algorithm does not converge, the next neural network is selected as the fitting algorithm for repeated fitting training until the fitting algorithm converges, and the trained neural network is obtained.

[0021] The application further provides a Modelica mechanism model privacy calculation system based on a neural network, which comprises a legality judgment module, a sample preparation module, a fitting training module, an over-fitting training module and a formula replacement module.

[0022] The legality judgment module is configured to:

[0023] Judge whether the sampling interval input by the user is legal, and if so, sample the sampling interval at intervals to obtain each sampling value.

[0024] The sample preparation module is configured to:

[0025] Input each sampling value into an empirical formula to obtain total samples, thin the total samples, and extract part of the total samples as training samples and the remaining part as over-fitting samples.

[0026] The fitting training module is configured to:

[0027] fit the neural network based on the training sample, and obtain a trained neural network;

[0028] The over-fitting training module is configured to:

[0029] fit the trained neural network again based on the over-fitting sample, and obtain an over-fitted neural network model;

[0030] The formula replacement module is configured to:

[0031] modify a Modelica mechanism model compiler, replace the empirical formula with the over-fitted neural network model, and calculate and output simulation results for the user according to the over-fitted neural network.

[0032] As a further improvement of the present application, the method further comprises:

[0033] The method further comprises: presetting a legal sampling interval, and determining that the user input sampling interval is legal if the user input sampling interval is less than or equal to the legal sampling interval.

[0034] Conversely, the method further comprises: determining that the user input sampling interval is illegal, and directly ending the calculation.

[0035] As a further improvement of the present application, the method further comprises: performing equal-interval sampling when the sampling interval is sampled.

[0036] As a further improvement of the present application, the method further comprises: performing thinning processing on the total sample, and extracting 1 / 3 of the points as training samples and the remaining 2 / 3 of the points as over-fitting samples.

[0037] As a further improvement of the present application, the method further comprises:

[0038] The method further comprises: presetting an AI algorithm library, and selecting a neural network as a fitting algorithm from the AI algorithm library.

[0039] The method further comprises: fitting the fitting algorithm based on the training sample.

[0040] The method further comprises: selecting a next neural network as the fitting algorithm and repeating the fitting training until the fitting algorithm converges, and obtaining the trained neural network, if the fitting algorithm does not converge.

[0041] Compared with the prior art, the present application has the following advantages:

[0042] The application is based on the black box characteristics and overfitting defects of the neural network, samples and fits the experience formula for the sampling interval input by the user under the specific working condition of the user, obtains an overfitting neural network model, and calculates the simulation result for the user through the overfitting neural network model, so as to meet the simulation requirement of the user and avoid the leakage of the experience formula, and protect the privacy of the Modelica mechanism model.

[0043] The application predefines an AI algorithm library, can complete the training of the neural network model in real time for different working conditions input by the user, and can complete the simulation calculation for the input interval of the user, so as to guarantee the normal use of the user and realize the privacy protection of the Modelica mechanism model.

[0044] The application judges the legitimacy of the sampling interval input by the user, prevents the fitted neural network model from being too close to the original experience formula, and avoids the leakage of the experience formula. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 A flow chart of a Modelica mechanism model privacy calculation method based on a neural network is disclosed for an embodiment of the application.

[0046] Figure 2 A schematic diagram of a Modelica mechanism model privacy calculation system based on a neural network is disclosed for an embodiment of the application.

[0047] Figure 3 A curve of a substituted experience formula trained based on a deep feedforward graph neural network is disclosed for an embodiment of the application.

[0048] Figure 4 A structure schematic diagram of a deep feedforward graph neural network model is disclosed for an embodiment of the application. DETAILED DESCRIPTION

[0049] To make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. The steps S1, S2, … in the embodiments do not limit the unique execution steps of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.

[0050] The application will be described in further detail below with reference to the drawings:

[0051] As shown in the drawings, Figure 1 A Modelica mechanism model privacy calculation method based on a neural network is provided.

[0052] S1. Determine whether the sampling interval input by the user is legal. If legal, perform interval sampling on the sampling interval to obtain each sampling value.

[0053] The determination of whether the sampling interval entered by the user is legal includes:

[0054] Preset legal sampling interval. If the sampling interval entered by the user is less than or equal to the legal sampling interval, it is legal;

[0055] Otherwise, it is illegal and the calculation ends directly;

[0056] Further,

[0057] When performing interval sampling for the sampling interval, equal interval sampling is adopted.

[0058] S2. Input each sampling value into the empirical formula to obtain the total sample, perform thinning processing on the total sample, extract part as training sample, and use the remaining part as overfitting sample;

[0059] in,

[0060] When thinning the total samples, 1 / 3 of the points are extracted as training samples, and the remaining 2 / 3 of the points are used as overfitting samples.

[0061] S3, performing fitting training on the neural network based on the training samples to obtain a trained neural network;

[0062] in,

[0063] Preset AI algorithm library and select a neural network as the fitting algorithm in the AI ​​algorithm library;

[0064] Perform fitting training on the fitting algorithm based on the training samples;

[0065] If the fitting algorithm does not converge, the next neural network is selected as the fitting algorithm and the fitting training is repeated until the fitting algorithm converges to obtain the trained neural network.

[0066] S4, re-fitting the trained neural network based on the overfitting samples to obtain an overfitting neural network model;

[0067] in,

[0068] The trained neural network is further trained using overfitting samples to ensure overfitting of the neural network. The overfitting neural network works well in a limited sampling interval (here the sampling interval input by the user), but is prone to failure when it exceeds the limited sampling interval, thus avoiding the leakage of the empirical formula.

[0069] S5, modifying the Modelica mechanism model compiler, replacing the empirical formula with the over-fitted neural network model, and calculating and outputting the simulation results for the user according to the over-fitted neural network.

[0070] wherein,

[0071] Based on the black box characteristics of the neural network, the over-fitted neural network model is an approximate expression of the empirical formula in the limited sampling interval.

[0072] As Figure 2 shown, the application also provides a neural network-based Modelica mechanism model privacy computing system, comprising: a legality judgment module, a sample preparation module, a fitting training module, an over-fitting training module and a formula replacement module.

[0073] The legality judgment module is used to:

[0074] Judge whether the sampling interval input by the user is legal, if it is legal, then interval sampling is performed on the sampling interval to obtain each sampling value;

[0075] Wherein, judging whether the sampling interval input by the user is legal comprises:

[0076] A preset legal sampling interval, if the user input sampling interval is less than or equal to the legal sampling interval, it is legal;

[0077] Otherwise, it is not legal, and the calculation is directly ended.

[0078] Further,

[0079] When interval sampling is performed on the sampling interval, equal interval sampling is used.

[0080] The sample preparation module is used to:

[0081] Input each sampling value into the empirical formula to obtain total samples, and perform thinning processing on the total samples, extract part as training samples, and the remaining part as over-fitting samples;

[0082] Wherein,

[0083] When the total sample is thinned, 1 / 3 of the points are extracted as training samples, and the remaining 2 / 3 of the points are extracted as over-fitting samples.

[0084] The fitting training module is used to:

[0085] Based on the training sample, the neural network is fitted and trained to obtain the trained neural network;

[0086] Wherein,

[0087] A preset AI algorithm library, select a neural network as the fitting algorithm in the AI algorithm library;

[0088] fitting training on the training samples to the fitting algorithm;

[0089] if the fitting algorithm does not converge, selecting the next neural network as the fitting algorithm and repeating the fitting training until the fitting algorithm converges, obtaining the trained neural network.

[0090] over-fitting training module, configured to:

[0091] further fitting training on the trained neural network based on the over-fitting samples, obtaining an over-fitted neural network model;

[0092] wherein,

[0093] further training on the trained neural network using the over-fitting samples to ensure over-fitting of the neural network; the over-fitted neural network works well within the limited sampling interval (here, the sampling interval input by the user), but is prone to failure when exceeding the limited sampling interval, avoiding leakage of the empirical formula.

[0094] formula replacement module, configured to:

[0095] modify the Modelica mechanism model compiler to replace the empirical formula with the over-fitted neural network model, and calculate and output simulation results for the user according to the over-fitted neural network.

[0096] wherein,

[0097] based on the black box characteristics of the neural network, the over-fitted neural network model is an approximate expression of the empirical formula within the limited sampling interval.

[0098] Embodiment:

[0099] a) Taking the empirical formula y = -1.81 + 6.41ln(x) as an example, we select an input and output interval, such as the interval [0-100] of X, and sample at an interval of 0.001, obtaining 100,000 groups of data. Randomly divide the input and output into 100 groups, respectively recorded as [X1, Y1] … [X 50 , Y 50 ] … [X 100 , Y 100 ]. These 100 groups of data are the sample data for training.

[0100] b) Due to the special nature of neural networks: as long as the number of nodes in the input layer and the sample data are appropriate, and with appropriate intermediate layers, a network data that fits the sample data can be trained. Our work becomes a problem of adjusting the number of nodes and input layers of the neural network according to the selected model in the AI algorithm library and the number of samples.

[0101] c) We have the following common neural networks in our AI algorithm library

[0102] 1) Deep Feed-forward (DFF)

[0103] 2) Artificial Neural Network (ANN)

[0104] 3) Radial Basis Function Neural Network (RBF NN)

[0105] 4) Deep Belief Network (DBN)

[0106] 5) Generative Adversarial Network (GAN)

[0107] 6) Deep Neural Network (DNN)

[0108] 7) Fully Convolutional Network (FCN)

[0109] 8) Convolutional Neural Network (CNN)

[0110] 9) Recurrent Neural Network (RNN)

[0111] 10) Long Short-Term Memory Network (LSTM)

[0112] 11) Autoencoder (AE)

[0113] d) Assuming we choose the Deep Feed-forward (DFF) network, as shown in Figure 4 ; we adjust the input node number of the Deep Feed-forward (DFF) network to half the sample number, such as 50, and at this time, we use 100 samples to train the network, which will cause overfitting of the network. As shown in Figure 3 , the curve is the result of training, that is, using the Deep Feed-forward (DFF) network to train can obtain the result;

[0114] e) If the selected DFF network cannot be trained to obtain the result by adjusting the node number and hidden layer, replace another network and repeat the above process.

[0115] f) The entire algorithm is implemented using PyTorch, and since the obtained neural network is binary data, it is not displayed in the present application; modify the Modelica mechanism model compiler to replace the empirical formula with the fitted neural network model, and use the fitted neural network to calculate and output the simulation results for the user.

[0116] Advantages of the present application:

[0117] The application samples and fits the experience formula based on the black box characteristics and overfitting shortcomings of the neural network for the sampling interval input by the user under the specific working condition of the user, obtains an overfitting neural network model, and calculates the simulation result for the user through the overfitting neural network model, which can meet the simulation demand of the user and avoid the leakage of the experience formula, and protect the privacy of the Modelica mechanism model.

[0118] The application predefines an AI algorithm library, can complete the training of the neural network model and the simulation calculation for the input interval of the user in real time, guarantees the normal use of the user, and realizes the privacy protection of the Modelica mechanism model.

[0119] The application judges the legality of the sampling interval input by the user, prevents the fitted neural network model from being too close to the original experience formula, and avoids the leakage of the experience formula.

[0120] The application combines the characteristics of the modelica modeling simulation, proposes a privacy calculation method using the black box characteristics and overfitting shortcomings of the neural network, completes the calculation and protection in real time, fits different models in real time for different working conditions input by the user, guarantees the normal use of the user and the safety of the model, and has important significance for the platform nature system modeling simulation cloud platform.

[0121] The above is only the preferred embodiment of the application and is not used to limit the application, and the application can have various changes and variations for the person skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the application shall be included in the protection scope of the application.

Claims

1. A neural network-based Modelica mechanism model privacy computing method, characterized in that, The method comprises the following steps: determining whether the sampling interval input by the user is legal, and if so, performing interval sampling on the sampling interval to obtain sampling values; inputting the sampling values into an empirical formula to obtain total samples, performing thinning processing on the total samples, extracting part of the samples as training samples, and taking the remaining samples as overfitting samples; performing fitting training on a neural network based on the training samples to obtain a trained neural network; performing fitting training again on the trained neural network based on the overfitting samples to obtain an overfitting neural network model; modifying a Modelica mechanism model compiler, replacing the empirical formula with the overfitting neural network model, and calculating and outputting simulation results for the user according to the overfitting neural network.

2. The Modelica mechanistic model privacy computation method of claim 1, wherein: The determination of whether the sampling interval input by the user is legal comprises: presetting a legal sampling interval, and if the sampling interval input by the user is less than or equal to the legal sampling interval, the sampling interval is legal; otherwise, the sampling interval is illegal, and the calculation is directly ended.

3. The Modelica mechanistic model privacy computation method of claim 1, wherein: When performing interval sampling on the sampling interval, equal interval sampling is adopted.

4. The Modelica mechanistic model privacy computation method of claim 1, wherein: When performing thinning processing on the total samples, 1 / 3 of the points are extracted as training samples, and the remaining 2 / 3 of the points are taken as overfitting samples.

5. The Modelica mechanistic model privacy computation method of claim 1, wherein: The fitting training on the neural network based on the training samples to obtain the trained neural network comprises: presetting an AI algorithm library, selecting a neural network as a fitting algorithm from the AI algorithm library; performing fitting training on the fitting algorithm based on the training samples; if the fitting algorithm does not converge, selecting the next neural network as the fitting algorithm to repeat the fitting training until the fitting algorithm converges, and obtaining the trained neural network.

6. A neural network-based Modelica mechanistic model privacy computing system, characterized in that, The method comprises: a legality determination module, a sample preparation module, a fitting training module, an overfitting training module, and a formula replacement module; The legality determination module is configured to: determine whether the sampling interval input by the user is legal, and if so, perform interval sampling on the sampling interval to obtain sampling values; The sample preparation module is configured to: input the sampling values into an empirical formula to obtain total samples, perform thinning processing on the total samples, extract part of the samples as training samples, and take the remaining samples as overfitting samples; The fitting training module is configured to: perform fitting training on a neural network based on the training samples to obtain a trained neural network; The overfitting training module is configured to: perform fitting training again on the trained neural network based on the overfitting samples to obtain an overfitting neural network model; The formula replacement module is configured to: modify a Modelica mechanism model compiler, replace the empirical formula with the overfitting neural network model, and calculate and output simulation results for the user according to the overfitting neural network.

7. The Modelica mechanistic model privacy computing system of claim 6, wherein: The determination of whether the sampling interval input by the user is legal comprises: presetting a legal sampling interval, and if the sampling interval input by the user is less than or equal to the legal sampling interval, the sampling interval is legal; otherwise, the sampling interval is illegal, and the calculation is directly ended.

8. The Modelica mechanistic model privacy computing system of claim 6, wherein: When performing interval sampling on the sampling interval, equal interval sampling is adopted.

9. The Modelica mechanistic model privacy computing system of claim 6, wherein: When performing thinning processing on the total samples, 1 / 3 of the points are extracted as training samples, and the remaining 2 / 3 of the points are taken as overfitting samples.

10. The Modelica mechanistic model privacy computing system of claim 6, wherein: The fitting training is performed on the neural network based on the training sample, and a trained neural network is obtained; the fitting training comprises: a preset AI algorithm library, a neural network is selected as a fitting algorithm from the AI algorithm library; the fitting training is performed on the fitting algorithm based on the training sample; if the fitting algorithm does not converge, the next neural network is selected as the fitting algorithm to repeat the fitting training until the fitting algorithm converges, and the trained neural network is obtained.

Citation Information

Patent Citations

  • Method for automatically extracting rail sections based on mobile measurement system

    CN110986878A

  • Business model training method, device and system and electronic equipment

    CN111415015A