A cloud-based tina R329 incremental learning and automatic model deployment method

Through the cloud-based Tina R329 incremental learning and automatic model deployment method, the problems of time-consuming traditional batch learning and low efficiency of manual deployment are solved, efficient, flexible and stable model updates for embedded devices are achieved, and the intelligence level of IoT devices is improved.

CN120106245BActive Publication Date: 2025-10-10GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510256954.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-10-10
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

Traditional batch learning methods are time-consuming and resource-intensive, and cannot adapt to data changes in real time. Embedded model deployment relies on manual intervention, resulting in low efficiency and error-proneness, making it difficult to meet rapidly changing real-time needs and high flexibility requirements.

Method used

Adopting the cloud-based Tina R329 incremental learning and automatic model deployment method, through data rebalancing, incremental learning and automatic model update, combined with the collaborative work of cloud and local devices, efficient model optimization and real-time adaptation are achieved.

Benefits of technology

It improves the intelligence level of embedded devices in the Internet of Things environment, reduces computing and storage resource consumption, ensures high performance and high reliability of devices, supports fast real-time response and stable deployment, and is suitable for smart homes, industrial automation and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106245B_ABST
    Figure CN120106245B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on cloud Tina R329 incremental learning and automatic model deployment method, it is related to cloud computing, machine learning and embedded system field, including data acquisition and standardization, data rebalancing, model pre-training, incremental learning, model quantification and model deployment etc. Technical steps, finally realize the model after optimization is automatically pushed to local equipment by wireless communication, and the deployment of the latest model is completed in real time in local equipment, without manual intervention.The present application makes full use of the powerful computing resources of cloud platform, efficiently analyzes and processes the environmental data collected in real time by the embedded device, enabling the device to quickly respond and adapt to environmental changes, significantly improving the intelligence and automation level of the system. This method is particularly suitable for application scenarios that require frequent model updates and rely on real-time feedback, such as smart hardware, IoT devices and edge computing, and has broad application prospects and commercial value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of cloud computing, machine learning, embedded systems and computer vision algorithm technology, and in particular to a cloud-based Tina R329 incremental learning and automatic model deployment method. Background Art

[0002] Traditional batch learning methods require retraining the model on the entire dataset, processing a massive amount of data for each training run. This not only makes the training process extremely time-consuming but also consumes significant computing resources, increasing computational overhead. Because each model update relies on full training, it cannot adapt to new data changes in real time. This is especially difficult to achieve timely updates and rapid responses in dynamic environments where data is constantly changing. Therefore, batch learning cannot meet rapidly changing real-time requirements or the high demands for flexibility in large-scale data and complex scenarios.

[0003] Traditional embedded model deployment typically relies on manual intervention to complete model training, validation, and deployment. This entire process is tedious and error-prone, and the inefficiency of manual operations directly impacts deployment speed and quality. Due to the complexity of manual updates and deployment, rapid model iteration and real-time deployment are often unreliable. Furthermore, manual intervention can easily lead to version control chaos. Running multiple versions in parallel can cause model incompatibility, conflicts, or performance degradation, impacting system stability and accuracy. Especially in scenarios with frequent updates or significant demand fluctuations, untimely and erroneous manual deployment can lead to severe performance degradation and even jeopardize system operation. Summary of the Invention

[0004] The purpose of the present invention is to provide a cloud-based Tina R329 incremental learning and automatic model deployment method, aiming to improve the intelligence level and adaptability of embedded devices in the Internet of Things (IoT) environment through efficient data processing and model optimization technologies. By combining incremental learning and automatic model update mechanisms, this method enables devices to continuously optimize the model without reprocessing the entire data. At the same time, through the collaborative work of the cloud and local devices, it ensures that the devices can efficiently and flexibly adapt to changes in the environment and needs.

[0005] To achieve the above objectives, the present invention provides a cloud-based Tina R329 incremental learning and automatic model deployment method, comprising the following steps:

[0006] S1, Data Collection and Standardization: Upload the ambient environment test data obtained by Tina R329 from the sensor group to the cloud;

[0007] S2, data rebalancing: rebalance the data obtained in S1, add minority class samples, and improve the proportion of minority class samples;

[0008] S3, Model pre-training: Whenever new data is uploaded, the cloud system determines whether re-training is needed based on the model version;

[0009] S4, incremental learning: fine-tune and optimize the data from S2 to avoid training from scratch and quickly adjust the model to adapt to new data features;

[0010] S5, Model quantization: Convert model parameters into a lower precision form to meet the operating requirements of embedded hardware;

[0011] S6. Model deployment: The optimized model is automatically pushed to the local device via wireless communication, and the local device deploys the latest model in real time.

[0012] Preferably, S1 specifically includes the following steps:

[0013] S11, the acquisition sensor group reads data;

[0014] S12. Configure the Wi-Fi module of Tina R238 and connect it to the network;

[0015] S13, formatting the collected data into JSON format;

[0016] S14. Use the MQTT protocol to upload the data in JSON format to the cloud server through the specified topic;

[0017] S15, standardization, standardize the data according to formula (1):

[0018]

[0019] (1) In the formula, x′ is the value to be standardized, μ is the mean of the feature, and σ is the standard deviation.

[0020] Preferably, S2 specifically includes the following steps:

[0021] S21. For the training data, use the synthetic minority oversampling technique SMOTE to identify the samples belonging to the minority class from the training data set and determine the sample categories that need to be oversampled;

[0022] S22. For each minority sample, calculate the Euclidean distance between the minority sample and other samples, and select its K nearest neighbor samples;

[0023] S23. For each minority class sample x i , randomly select a neighbor x from its K nearest neighbors j, and use formula (2) to generate new samples:

[0024] x new =x i +λ·(x j -x i ) (2);

[0025] (2) In the formula, λ is a random number with a value range of [0, 1], which is used to control the new sample’s i and x j The degree of interpolation between the two, the larger the value of λ, the greater the distance between the generated new samples x i The further;

[0026] S24, repeatedly generating new samples until the expected number of synthetic samples is reached;

[0027] S25. Combine the newly synthesized sample data with the original data set to construct a new balanced data set.

[0028] Preferably, S3 specifically includes the following steps:

[0029] S31. Check whether the current model version meets the business requirements. If so, retraining will not be triggered.

[0030] S32. If the answer to step S31 is no, the current model version does not meet the business requirements. The cloud server starts model pre-training. The training uses the full data set, 80% as the training set and 20% as the test set, and generates a prediction model through standard machine learning methods.

[0031] Preferably, S4 specifically includes the following steps:

[0032] S41, model loading, loading the latest version of the model currently trained on the cloud;

[0033] S42, incremental update, using incremental gradient descent, each time taking a small batch of data from the new data to update the model weights until all the data are processed. In incremental gradient descent, the formula (3) for each parameter update is:

[0034]

[0035] (3) where θ represents the model weight, η is the learning rate used to control the step size of each update, and J(θ; x (i) ,y (i) ) is the loss function, is the gradient of the loss function with respect to the model parameters;

[0036] S43, convergence detection, judging whether the model has reached the expected convergence state;

[0037] S44, model evaluation, after each update, generates the predicted recall and precision of the prediction model as well as the F1 score.

[0038] Preferably, S5 specifically includes the following steps:

[0039] S51. Model conversion: Use TensorFlow Lite Converter to convert the original TensorFlow model to a TensorFlow Lite model.

[0040] S52, model quantization, use TensorFlow Lit to quantize the floating-point model into an 8-bit integer model. The quantization formula is shown in (4):

[0041] r = S × (qz) (4);

[0042] (4) where r is the real value, q is the B-bit integer quantization representation, and S is the scaling factor, which is defined as:

[0043]

[0044] S determines the mapping ratio of floating point to integer, z is the zero point, which represents the offset referenced in the quantization process to map the floating point range;

[0045] S53. Test the accuracy and performance of the model using TensorFlow Lite Interpreter to ensure that the conversion did not introduce errors.

[0046] S54. Save the model and name it model_v_x.tflite;

[0047] S55. Generate the model version number, save it as version.json, and record the version number, release date, and accuracy of the current model;

[0048] S56, file integrity, generates the national secret SM3 hash check code of the model file model_v_x.tflite and saves it in the version.json file.

[0049] Preferably, S6 specifically includes the following steps:

[0050] S61 and Tina R329 started the SSH remote connection, configured the SSH service, modified the / etc / ssh / sshd_config file, set PermitRootLogin and PasswordAuthentication to yes, and then restarted the SSH service using systemctl restartssh.

[0051] S62. Transfer the model from the cloud to Tina R329. Use SCP to transfer the local model_v_x.tflite model file to the / root / models / directory of Tina R329.

[0052] S63. On Tina R329, the version numbers and accuracy in the version.json file of the current version and the new version are compared. The integrity of the transferred file is verified by checking the consistency of the SM3 hash check codes of the local and cloud models. If they are consistent, the model is updated. If they are inconsistent, the model is not updated.

[0053] S64. Perform real-time reasoning and analysis on the data collected by the sensor group locally, quickly process the input data from the sensor group, process the data through the model, and the generated binary classification results will drive the system to make corresponding decisions and actions.

[0054] Therefore, the present invention adopts the above-mentioned cloud-based Tina R329 incremental learning and automatic model deployment method, which has the following beneficial effects:

[0055] (1) Compared with traditional data processing methods, the SMOTE algorithm of the present invention is an improved algorithm based on the random oversampling algorithm. It can analyze minority samples and add new samples to the data set by artificially synthesizing them based on the minority samples. By increasing the data set of minority samples, the minority samples and majority samples reach a certain ratio, achieving a sample rebalancing effect.

[0056] (2) The present invention provides intelligent self-adaptation capabilities for embedded devices by combining incremental learning with automatic model update technology. It can achieve real-time optimization in changing environments, completely independent of human intervention. Through efficient incremental updates and model quantization, it effectively reduces computing and storage resource consumption, ensuring that the device always has high performance and high reliability, while significantly reducing operating costs.

[0057] (3) The system provided by the present invention supports fully automated model deployment, has fast real-time response capabilities, and achieves a stable and efficient workflow through a flexible and secure cloud-device collaboration mechanism; its excellent scalability and compatibility enable the system to be widely used in smart homes, industrial automation, precision agriculture and other fields; when completing complex training tasks in the cloud, the system fully utilizes the advantages of low-power hardware, enabling embedded devices to maintain high performance and stability for a long time, thereby ensuring continuous functionality.

[0058] (4) In addition, the present application adopts the national secret SM3 algorithm to check the transmission file. By calculating the SM3 hash value of the file and comparing it with the received hash value, it can effectively verify whether the file has been tampered with during transmission, ensuring its integrity; this checking mechanism not only prevents the file from being tampered with or damaged during transmission, but also ensures the consistency and correctness of the data each time the model is updated and deployed, thereby further improving the security and reliability of the system.

[0059] The technical solutions of the present application will be further described in detail below through the accompanying drawings and examples. BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 is a step diagram of an embodiment of a Tina R329 incremental learning and automatic model deployment method based on the cloud of the present application;

[0061] Figure 2 is an implementation flowchart for the fire alarm binary classification task of an embodiment of a Tina R329 incremental learning and automatic model deployment method based on the cloud of the present application.

[0062] REFERENCE NUMERALS

[0063] 1, environmental data acquisition subsystem; 2, environmental data receiving and transmission subsystem; 21, environmental data receiving module; 22, environmental data transmission module; 3, cloud database; 4, model generation and verification subsystem; 41, data preprocessing module; 42, model generation module; 43, data integrity verification module; 5, model deployment subsystem; 6, local inference subsystem; 61, data loading module; 62, data preprocessing module; 63, data calculation and analysis module; 7, comparison subsystem; 8, abnormal index data processing subsystem; 9, fire alarm display subsystem. DETAILED DESCRIPTION

[0064] The technical solutions of the present application will be further described in detail below through the accompanying drawings and examples.

[0065] Unless otherwise defined, the technical terms or scientific terms used in the present application shall be understood as the usual meaning understood by persons having ordinary skills in the art to which the present application belongs.

[0066] The present invention uses an incremental learning method based on real-time data to enable the model to continuously optimize performance, reduce computing overhead, and improve the system's flexibility and continuous adaptability. Automatic model updates are achieved with the help of a cloud computing platform, and model optimization and push can be completed without human intervention, effectively reducing the computing pressure on local devices. The cloud analyzes and processes the uploaded data, and optimizes and pushes the model to the device end, enabling the smart terminal to respond to environmental changes in real time and maintain efficient operation. Therefore, the "device-cloud" collaborative model is particularly suitable for embedded scenarios such as smart homes that require long-term stable operation. Through real-time data interaction and dynamic adjustment, the system can continuously optimize performance, thereby significantly improving efficiency, enhancing autonomy, and achieving a higher level of flexibility and intelligence.

[0067] Tina R329 collects data from its sensor array in real time and uploads it to a cloud server. After data preprocessing in the cloud (including standardization and sample rebalancing), it trains a binary classification model based on incremental learning methods, gradually improving its predictive capabilities. The trained model undergoes format conversion and performance tuning to adapt to the embedded hardware environment and ensure efficient operation. The optimized model is automatically pushed to the Tina R329 local device via wireless communication, enabling continuous updates and iterations to maintain optimal performance. The combination of cloud computing and incremental learning significantly enhances the system's intelligence, enabling it to respond and adapt to environmental changes in real time, fully meeting the long-term and efficient operation requirements of smart devices in complex scenarios.

[0068] A cloud-based Tina R329 incremental learning and automatic model deployment method includes the following steps:

[0069] S1. Data Collection and Standardization: Upload the ambient environment test data obtained by Tina R329 from the sensor group to the cloud. The specific steps include:

[0070] S11, the acquisition sensor group reads data;

[0071] S12. Configure the Wi-Fi module of Tina R238 and connect it to the network;

[0072] S13, formatting the collected data into JSON format;

[0073] S14. Use the MQTT protocol to upload the data in JSON format to the cloud server through the specified topic;

[0074] S15, standardization, standardize the data according to formula (1):

[0075]

[0076] (1) In the formula, x′ is the value to be standardized, μ is the mean of the feature, and σ is the standard deviation.

[0077] S2, data rebalancing: rebalance the data obtained in S1, add minority class samples, and improve the proportion of minority class samples. Specifically, the following steps are included:

[0078] S21. For the training data, use the synthetic minority oversampling technique SMOTE (Synthetic Minority Oversampling Technique) to identify samples belonging to the minority class from the training data set and determine the sample categories that need to be oversampled;

[0079] S22. For each minority sample, calculate the Euclidean distance between the minority sample and other samples, and select its K nearest neighbor samples;

[0080] S23. For each minority class sample x i , randomly select a neighbor x from its K nearest neighbors j , and use formula (2) to generate new samples:

[0081] x new =x i +λ·(x j -x i ) (2);

[0082] (2) In the formula, λ is a random number with a value range of [0, 1], which is used to control the new sample’s i and x j The degree of interpolation between the two, the larger the value of λ, the greater the distance between the generated new samples x i The further;

[0083] S24, repeatedly generating new samples until the expected number of synthetic samples is reached;

[0084] S25. Combine the newly synthesized sample data with the original data set to construct a new balanced data set.

[0085] S3. Model pre-training: Whenever new data is uploaded, the cloud system will determine whether re-training is needed based on the model version. The specific steps include:

[0086] S31. Check whether the current model version meets the business requirements. If so, retraining will not be triggered.

[0087] S32. If the answer to step S31 is no, the current model version does not meet the business requirements. The cloud server starts model pre-training. The training uses the full data set, 80% as the training set and 20% as the test set, and generates a prediction model through standard machine learning methods.

[0088] S4, incremental learning: Fine-tune and optimize the data from S2 to avoid training from scratch and quickly adjust the model to adapt to new data features. Specifically, it includes the following steps:

[0089] S41, model loading, loading the latest version of the model currently trained on the cloud;

[0090] S42, incremental update, using incremental gradient descent, each time taking a small batch of data from the new data to update the model weights until all the data are processed. In incremental gradient descent, the formula (3) for each parameter update is:

[0091]

[0092] (3) where θ represents the model weight, η is the learning rate used to control the step size of each update, and J(θ; x (i) ,y (i) ) is the loss function, is the gradient of the loss function with respect to the model parameters;

[0093] S43, convergence detection, judging whether the model has reached the expected convergence state;

[0094] S44, model evaluation, after each update, generates the predicted recall and precision of the prediction model as well as the F1 score.

[0095] S5. Model quantization: Convert model parameters to a lower-precision form to meet the operating requirements of embedded hardware. This includes the following steps:

[0096] S51. Model conversion: Use TensorFlow Lite Converter to convert the original TensorFlow model to a TensorFlow Lite model (.tflite format).

[0097] S52, model quantization, use TensorFlow Lit to quantize the floating-point model into an 8-bit integer model. The quantization formula is shown in (4):

[0098] r = S × (qz) (4);

[0099] (4) Where r is a real value (usually a floating point number, such as float32), q is a quantized B-bit integer (such as unit8, unit32, etc.), and S is a scaling factor (floating), which is defined as:

[0100]

[0101] S determines the mapping ratio of floating point to integer, and z is the zero point (integer), which represents the offset referenced in the quantization process to map the floating point range.

[0102] S53. Test the accuracy and performance of the model using TensorFlow Lite Interpreter to ensure that the conversion did not introduce errors.

[0103] S54. Save the model and name it model_v_x.tflite;

[0104] S55. Generate the model version number, save it as version.json, and record the version number, release date, and accuracy of the current model (e.g., version: 1.2., release_date: 2024-12-12, accuracy: 82.5%).

[0105] S56, file integrity, generates the national secret SM3 hash check code of the model file model_v_x.tflite and saves it in the version.json file.

[0106] S6. Model deployment: The optimized model is automatically pushed to the local device via wireless communication. The local device deploys the latest model in real time without manual intervention. The specific steps include:

[0107] S61 and Tina R329 started the SSH remote connection, configured the SSH service, modified the / etc / ssh / sshd_config file, set PermitRootLogin and PasswordAuthentication to yes, and then restarted the SSH service using systemctlrestart ssh.

[0108] S62. Transfer the model from the cloud to Tina R329. Use SCP to transfer the local model_v_x.tflite model file to the / root / models / directory of Tina R329.

[0109] S63. On Tina R329, the version numbers and accuracy in the version.json file of the current version and the new version are compared. The integrity of the transferred file is verified by checking the consistency of the SM3 hash check codes of the local and cloud models. If they are consistent, the model is updated. If they are inconsistent, the model is not updated.

[0110] S64. Perform real-time reasoning and analysis on the data collected by the sensor group locally, quickly process the input data from the sensor group, and after processing the data through the model, the generated binary classification results will drive the system to make corresponding decisions and actions, thereby achieving intelligent response and automated control.

[0111] Example

[0112] like Figure 1 As shown, the technical solution of the present invention includes six steps: data preprocessing, data rebalancing, model training, incremental learning, model quantization and model deployment

[0113] S1. Data preprocessing (data collection and annotation): The network traffic test data set is standardized and uploaded to the database. This data includes a large amount of audit data generated by the computer network.

[0114] S2. Data rebalancing: rebalancing the data obtained after data preprocessing to increase minority class samples and improve the proportion of minority class samples;

[0115] S3, Model training: The cloud system determines whether retraining is needed based on the model version;

[0116] S4, incremental learning: fine-tune and optimize the data in step S2 to avoid training from scratch and quickly adjust the model to adapt to new data features;

[0117] S5, Model quantization: Convert model parameters into a lower precision form to meet the operating requirements of embedded hardware;

[0118] S6. Model deployment: The optimized model will be automatically pushed to the local device via wireless communication, and the device can deploy the latest model in real time;

[0119] like Figure 2 As shown, the model process of the present invention is divided into the following steps:

[0120] 1. Environmental data acquisition subsystem (1)

[0121] It is composed of a group of external sensors used to collect environmental data in real time, such as temperature, humidity, gas concentration, etc. These sensors will pass the acquired information to the subsequent receiving and transmission modules.

[0122] 2. Environmental data receiving and transmission subsystem (2)

[0123] Environmental data receiving module (21): responsible for obtaining raw data from the environmental data acquisition subsystem (1) and performing preliminary formatting or packaging processing;

[0124] Environmental data transmission module (22): uploads the received environmental data to the cloud database (3) via the wireless network, and transmits the instructions or models issued by the cloud back to the local computer when necessary.

[0125] 3. Cloud Database (3)

[0126] Used to store and manage environment data, model versions, and related business configurations; when new data is uploaded locally or the model needs to be updated, it is managed and called in a unified manner by this database.

[0127] 4. Model Generation and Verification Subsystem (4)

[0128] The data prediction processing module (41) performs basic operations such as missing value processing, noise filtering, and feature extraction on the incoming data to ensure the quality of the data used in subsequent training;

[0129] Model generation module (42): performs model training or incremental learning based on preprocessed data, and updates or generates new classification models;

[0130] Data integrity verification module (43): This module conducts consistency and integrity checks on the data used in the model training process and the final generated model. Only after this step is passed can the model be officially released for deployment.

[0131] 5. Model deployment subsystem (5)

[0132] Once the new model in the cloud is verified, it will be distributed to the Tina R329 device locally via a secure transmission protocol (such as SCP) to replace or incrementally update the existing inference model.

[0133] 6. Local Reasoning Subsystem (6)

[0134] Data loading module (61):

[0135] Responsible for receiving and reading raw environmental data collected by sensors, or loading the input information required by the model from the cloud and local storage, and preparing data for subsequent processing and reasoning.

[0136] Data preprocessing module (62):

[0137] The loaded data is preprocessed by cleaning, denoising, normalizing, and extracting features to ensure that the data format and content meet the requirements of model inference. Feature reorganization or encoding conversion can also be performed based on the input requirements of different models.

[0138] Data calculation and analysis module (63):

[0139] After preprocessing, real-time reasoning or regular analysis of the data is performed in conjunction with the deployed model to obtain classification results, anomaly detection information, etc. Based on the reasoning results, corresponding business logic or alarm mechanisms are triggered, ultimately improving the system's ability to quickly respond to environmental changes.

[0140] 7. Comparison subsystem (7)

[0141] Compare the latest inference results with historical data or thresholds. If the difference is within a reasonable range, continue observation; otherwise, further confirm or handle the abnormal situation.

[0142] 8. Abnormal indicator data processing subsystem (8)

[0143] Data analysis and feature screening are performed on abnormal indicators that appear during the reasoning process (such as sudden temperature increases, excessive gas concentrations, etc.) to determine whether they are short-term fluctuations or have abnormal trends, and processing suggestions are output.

[0144] 9. Fire alarm display subsystem (9)

[0145] When the system identifies a serious anomaly or disaster, it sends an alarm signal to this subsystem. This subsystem is responsible for visually displaying the alarm information and sending notifications (such as sound and light alarms and information reporting) to help relevant personnel take timely response measures.

[0146] The present invention collects environmental data from local sensors and uploads it to a cloud database to implement data integrity verification and incremental model training. It then uses the model deployment subsystem to distribute the updated model locally. Combining data calculation and analysis, reasoning, abnormal indicator processing, and alarm display functions, it forms a complete cloud-local linkage intelligent detection and response process.

[0147] Therefore, the present invention adopts the above-mentioned cloud-based Tina R329 incremental learning and automatic model deployment method, which not only ensures the high accuracy of Tina R329 in real-time reasoning, but also meets the ever-changing business needs through automated model iterative deployment.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A cloud-based Tina R329 incremental learning and automatic model deployment method, characterized in that: The following steps are involved: S1, Data Collection and Standardization: Upload the ambient environment test data obtained by Tina R329 from the sensor group to the cloud; S2, data rebalancing: rebalance the data obtained in S1, add minority class samples, and improve the proportion of minority class samples; S3, Model pre-training: Whenever new data is uploaded, the cloud system determines whether re-training is needed based on the model version; S4, incremental learning: fine-tune and optimize the data from S2 to avoid training from scratch and quickly adjust the model to adapt to new data features; S5, Model Quantization: Convert model parameters into a lower precision form to meet the operating requirements of embedded hardware; S6, Model deployment: The optimized model is automatically pushed to the local device via wireless communication, and the local device deploys the latest model in real time; S4 specifically includes the following steps: S41, model loading, loading the latest version of the model currently trained on the cloud; S42, incremental update, using incremental gradient descent, each time taking a small batch of data from the new data to update the model weights until all the data is processed. In incremental gradient descent, the formula (1) for each parameter update is: (1); (1) In the formula, θ represents the model weight, is the learning rate used to control the step size of each update, is the loss function, is the gradient of the loss function with respect to the model parameters; S43, convergence detection, judging whether the model has reached the expected convergence state; S44, model evaluation, after each update, generates the prediction recall and precision as well as the F1 score of the prediction model; S5 specifically includes the following steps: S51. Model conversion: Use TensorFlow Lite Converter to convert the original TensorFlow model to a TensorFlow Lite model. S52. Model quantization: Use TensorFlow Lit to quantize the floating-point model into an 8-bit integer model. The quantization formula is shown in (2): (2); (2) In the formula, is the true value, q is a B-bit integer quantized representation, is the scaling factor, which is defined as: ; Determines the mapping ratio of floating point to integer, z is the zero point, which represents the offset referenced in the quantization process to map the floating point range; S53. Test the accuracy and performance of the model using TensorFlow Lite Interpreter to ensure that the conversion did not introduce errors. S54. Save the model and name it model_v_x.tflite; S55. Generate the model version number, save it as version.json, and record the version number, release date, and accuracy of the current model; S56, file integrity, generates the national secret SM3 hash check code of the model file model_v_x.tflite and saves it in the version.json file.

2. The cloud-based Tina R329 incremental learning and automatic model deployment method according to claim 1, characterized in that: S1 specifically includes the following steps: S11, the acquisition sensor group reads data; S12. Configure the Wi-Fi module of Tina R238 and connect it to the network; S13, formatting the collected data into JSON format; S14. Use the MQTT protocol to upload the data in JSON format to the cloud server through the specified topic; S15. Standardization: standardize the data according to formula (3): (3); (3) In the formula, is the value to be standardized, μ is the mean of the feature, is the standard deviation.

3. The cloud-based Tina R329 incremental learning and automatic model deployment method according to claim 2, characterized in that: S2 specifically includes the following steps: S21. For the training data, use the synthetic minority oversampling technique SMOTE to identify the samples belonging to the minority class from the training data set and determine the sample categories that need to be oversampled; S22. For each minority sample, calculate the Euclidean distance between the minority sample and other samples, and select its K nearest neighbor samples; S23. For each minority class sample , randomly select a neighbor from its K nearest neighbors , and use formula (4) to generate new samples: (4); (4) In the formula, λ is a random number with a value range of [0, 1], which is used to control the new sample and The degree of interpolation between the two, the larger the value of λ, the greater the distance between the generated new samples. The further; S24, repeatedly generating new samples until the expected number of synthetic samples is reached; S25. Combine the newly synthesized sample data with the original data set to construct a new balanced data set.

4. The cloud-based Tina R329 incremental learning and automatic model deployment method according to claim 3, characterized in that: S3 specifically includes the following steps: S31. Check whether the current model version meets the business requirements. If so, retraining will not be triggered. S32. If the answer to step S31 is no, the current model version does not meet the business requirements. The cloud server starts model pre-training. The training uses the full data set, 80% as the training set and 20% as the test set, and generates a prediction model through standard machine learning methods.

5. The cloud-based Tina R329 incremental learning and automatic model deployment method according to claim 4, characterized in that: S6 specifically includes the following steps: S61 and Tina R329 started the SSH remote connection, configured the SSH service, modified the / etc / ssh / sshd_config file, set PermitRootLogin and PasswordAuthentication to yes, and then restarted the SSH service using systemctl restart ssh. S62. Transfer the model from the cloud to Tina R329. Use SCP to transfer the local model_v_x.tflite model file to the / root / models / directory of Tina R329. S63. Compare the version numbers and accuracy in the version.json file of the current and new versions on Tina R329. Verify the integrity of the transferred file by checking the consistency of the SM3 hash checksums of the local and cloud models. If they are consistent, update the model. If not, do not update the model. S64. Perform real-time reasoning and analysis on the data collected by the sensor group locally, quickly process the input data from the sensor group, process the data through the model, and the generated binary classification results will drive the system to make corresponding decisions and actions.

Citation Information

Patent Citations

  • Cloud resource prediction method based on machine learning

    CN116489039A

  • Deep learning-based qualification image classification method and system

    CN117788957A