Multi-scenario optimization model parameter method and mental health screening system
By building a detection model library and database, optimizing model parameters and updating the training set, the problem of poor cross-dataset testing results in existing technologies is solved, and the accuracy of the model on new datasets and the generalization ability are improved.
Patent Information
- Application Number
- CN202510976142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-16
AI Technical Summary
Existing technologies do not perform well in cross-dataset testing, and the fixed model parameters usually perform poorly when tested on new datasets that the model has not learned.
By building a detection model library and detection database, optimizing model parameters using the dataset to be detected, obtaining gain results, and combining the acquisition scene and gain results to update the training set of the detection model, including the processing of positive and negative gains.
It significantly improves the accuracy of the model on new data sets, enhances the generalization ability of the model, adapts to changes in different data sets, and improves development efficiency and model adaptability.
Smart Images

Figure CN120492937B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of physiological electrical signal detection, and specifically relates to a method for multi-scenario optimization model parameters and a mental and psychological screening system. Background Art
[0002] In the process of physiological electrical signal detection, especially the detection and processing of EEG signals, whether it is a deep model, a machine learning model, or a deep joint machine learning model, when performing a classification task with the subject as the smallest unit, it is usually based on part of the data in the existing dataset for training and verification, and tested on another part. This kind of testing difficulty of the same dataset is relatively low, and the model can usually obtain results close to the verification set on the test set based on the trained parameters. For example, patent number CN114266352B discloses a method, device, storage medium and equipment for optimizing model training results. If the first output accuracy of the model to be optimized for the dataset to be processed is less than a preset accuracy threshold, the dataset to be processed is added to the historical sample dataset, and the model to be optimized is trained based on the updated historical sample dataset; if the second output accuracy of the updated model to be optimized for the detection dataset is greater than the first output accuracy, the updated model to be optimized is used as the optimized model. However, in actual applications, this kind of testing difficulty of the same dataset is relatively low, and the model can usually obtain results close to the verification set on the test set based on the trained parameters. However, the fixed model parameters usually perform poorly when tested on new datasets that the model has not learned, and do not perform well in cross-dataset tests. Summary of the Invention
[0003] The present invention provides a method for optimizing model parameters in multiple scenarios and a mental and psychological screening system to update model parameters by focusing on high-quality data.
[0004] In order to solve the above technical problems, the present invention provides a method for optimizing model parameters in multiple scenarios, including: constructing a detection model library, including several detection models whose parameters are optimized using a training set; constructing a detection database, including data sets to be detected in different acquisition scenarios, wherein the data sets to be detected include offline data sets and online data sets; inputting the data sets to be detected into the detection model to obtain gain results of model evaluation indicators, including positive gain and negative gain; and updating the training set of the detection model by combining the acquisition scenario and the gain result, including: for positive gain, obtaining the gain result of a single data in the data set to be detected, and incorporating the single data corresponding to the positive gain into the training set of the detection model; for negative gain, replacing the training set of the detection model with the offline data set, and discarding the online data set.
[0005] Furthermore, obtaining the gain result includes: obtaining the true label of the data set to be tested; inputting the data set to be tested into the detection model to obtain the predicted label; judging whether the predicted label is stable for the test subject result; if so, pre-merging the data set to be tested into the training set, training a hypothesis model to obtain the hypothesis label, and obtaining the gain result of the detection model according to the degree of proximity between the predicted label and the hypothesis label and the true label; if not, ending this optimization.
[0006] Furthermore, the determination of whether the predicted label is stable for the subject result includes: obtaining the original subject result of the detection model according to the predicted label; adding disturbance and adjusting the degree of disturbance through a threshold; re-inputting the data set to be detected into the detection model to obtain a new subject result; determining whether the difference between the original subject result and the new subject result meets the threshold; if so, the predicted label is stable for the subject result; if not, the predicted label is unstable for the subject result.
[0007] Furthermore, the process of incorporating a single piece of data corresponding to a positive gain into the training set of the detection model includes: inputting the data in the data set to be detected into the detection model one by one to obtain the gain result corresponding to the single piece of data; incorporating the single piece of data corresponding to the positive gain into the training set of the detection model; and discarding the single piece of data corresponding to the negative gain.
[0008] Furthermore, it also includes: setting the data volume of the data set to be tested, so as to determine whether the optimization method is terminated according to the data volume; wherein the data volume of the offline data set is greater than or equal to 1; the data volume of the online data set is equal to 1, that is, the online data is collected one by one and saved in the detection database as different online data sets.
[0009] Furthermore, the acquisition scenario also includes a mixed data set; updating the training set of the detection model by combining the acquisition scenario and the gain result also includes: dividing the mixed data set into an offline data set and an online data set to update the training set of the detection model respectively; and determining the dividing line between the offline data set and the online data set based on the data volume.
[0010] Furthermore, it also includes selecting a corresponding detection model according to the task type; when the task type is a classification task, the detection model is configured as a support vector machine model; when the task type is a regression task, the detection model is configured as a linear regression model; when the task type is a clustering task, the detection model is configured as a hierarchical clustering model; when the task type is general, the detection model is configured as a deep model capable of adjusting the fully connected layer.
[0011] In the second aspect, the present invention provides a mental health screening system, comprising: a processor, which runs the described method to optimize the parameters of the training detection model using the data set to be detected; a memory, which stores the detection model library and the detection database; a human-computer interaction machine, whose operation interface is provided with parameter options to set the collection scenario of the data set to be detected; and a result acquisition module, which is used to output the screening results.
[0012] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method when executed by a processor.
[0013] In a fourth aspect, the present invention provides a computer program product, comprising a computer program, which implements the steps of the method when executed by a processor.
[0014] The beneficial effect of the present invention is that the multi-scenario optimization model parameter method and mental health screening system of the present invention can significantly improve the accuracy of the model on new data sets by focusing on high-quality data for parameter updates. At the same time, this targeted customized training also helps to improve the generalization ability of the model on other new data sets to a certain extent. As the usage time increases, the model will gradually adapt to the characteristics of the collection location, and eventually iterate out model parameters that are more suitable for the current environment, achieving better prediction results on new data, avoiding training the model from scratch, saving computing resources and time, and improving development efficiency.
[0015] Other features and advantages of the present invention will be described in the following description and, in part, will become apparent from the description or be learned through practice of the present invention. To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, preferred embodiments are described below in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a flowchart of multi-scenario optimization model parameters.
[0018] Figure 2 It is a principle block diagram of the hardware system used in matching the method of multi-scenario optimization model parameters.
[0019] Figure 3It is a flowchart for optimizing model parameters using offline datasets.
[0020] Figure 4 It is a flowchart for optimizing model parameters using online datasets. DETAILED DESCRIPTION
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0022] See Figures 1-4 At least one embodiment provides a method for optimizing model parameters in multiple scenarios, including: constructing a detection model library, including several detection models whose parameters are optimized using training sets; constructing a detection database, including data sets to be detected in different acquisition scenarios, wherein the acquisition scenarios include offline data sets and online data sets; inputting the data sets to be detected into the detection model to obtain gain results, including positive gain and negative gain; and updating the training set of the detection model by combining the acquisition scenarios and the gain results, for training the detection model to optimize the model parameters.
[0023] Optionally, the method for optimizing model parameters based on multiple scenarios can obtain corresponding computer programs and their corresponding program products or software products, as well as computer equipment and mental health screening systems with accompanying computer programs, to adapt to a variety of data collection scenarios and be able to process online and offline data at the same time. This flexibility enables users to effectively perform data verification and model optimization under different environments and conditions.
[0024] Generally speaking, a detection model is a concept in the field of machine learning, a mathematical structure used to represent the relationship between input and output. Specifically, a detection model can be understood as a black box, implicitly containing the feature extraction and task execution components. Data is input into the black box, and a series of operations are performed to produce the final task result. Note that the specific steps in this series of operations are determined by the model structure, and the specific parameters for each step are pre-determined and fixed through the training process based on the baseline data and model structure. Therefore, while a trained model is called a black box, each mathematical operation is deterministic. A black box can be understood as meaning that the operator does not know the real-world significance of each operation or the specific reasons for each parameter value. Therefore, a detection model consists of both parameters and structure, which are determined by both the baseline data and the model structure. Changing either the baseline data used for training or the pre-selected model structure will result in changes to the final model, further impacting the model's generalization to new data (or test sets). Common model structures can be broadly categorized into traditional machine learning models and deep learning models. Model parameter optimization methods can be understood as updating model parameters by continuously updating the "baseline data" used for training, without changing the model structure. Specifically, this three-dimensional data might be the height, weight, and age of a company's employees (obviously, data on these three dimensions is readily available), and the corresponding labels represent each employee's health status (the true labels are generally reliable, meaning that the assessment of each employee's health status is the doctor's final conclusion based on a complete physical examination report). Only data with true labels can be used for training, or rather, the labels give momentum to the expansion of the hypersphere's boundaries. When health status is defined as healthy or unhealthy, the subsequent discussion involves a classification model; when health status is scored on a scale of 0-100, the subsequent discussion involves a regression model. Now consider a model that replaces the doctor's work: inputting height, weight, and age and outputting the employee's health status. Based on the existing employee data and the task type, we can train the model parameters. This "baseline model" has a certain degree of generalization for subsequent new employees. In other words, we assume that the health data of new employees generally falls within the range of those of existing employees and can still be covered by the adjusted sphere. For example, the following special scenarios are examples.
[0025] Scenario 1: New employees (new data with the same collection conditions). If the baseline model is directly applied, due to the specificity of the group, the age-related data will fall at the edge of the sphere, resulting in poor generalization and inevitably inaccurate health assessments for some new employees. However, by pre-assessing the health of some new employees and adjusting the radius of the sphere based on these scattered points and labels, more data can be included, improving the model's generalization for new employees.
[0026] Scenario 2: Applying the model to employees of another company (data collected under different conditions). The baseline model is known to have the following capabilities: input the height, weight, and age of employees from the baseline company, and output the health status of employees from the baseline company. If directly applied to the data of employees from a new company, the distribution of the two sets of scattered points may differ due to differences in industry, resulting in some employees from the new company not falling within the sphere of the baseline model. Alternatively, consider pre-assessing the health status of some employees and adjusting the center of the sphere based on these scattered points to incorporate more data, thereby improving the model's generalization to employees from the new company.
[0027] Scenario 3: Baseline company employees haven't had physical examinations, so there's no existing data to train the "baseline model" (collected online from scratch). In this case, you must first obtain the data and health conditions of some employees as baseline data before you can begin the training process.
[0028] Scenario 4: New companies are increasingly interested in applying this model to assess employee health (generalization across datasets in offline scenarios). In this scenario, we can consider selecting a subset of employees within each new company, assessing their health, adjusting the baseline model's sphere, and then applying the adjusted model to the remaining employees of the newly added company. Specifically, there are two selection options: dynamic inclusion (applicable when the original model parameters do not generalize to new data, in which case a single piece of data is incorporated into the training set of the detection model) and static inclusion (in which the offline dataset is used to replace the training set of the detection model). Furthermore, if a new company presents inherent issues, we may consider refusing to include it in the model.
[0029] Scenario 5: The model is being developed jointly by multiple companies, and each company has subsequent recruitment plans (multi-center online data collection). Initially, we can select a subset of employees within each company according to specific criteria (e.g., number of employees, investment ratio), assess their health status, and use this to construct a hypersphere for the baseline model. Additional employees meeting the criteria are then labeled and incorporated into the training process, allowing for continued model adjustments and parameter updates. Meeting the criteria means that the health status and indicator values of these employees should not be significantly outliers. For example, if the majority of employees within a company are relatively healthy, data from employees with known genetic diseases should not be excessively selected for the baseline model.
[0030] In some embodiments, the method for optimizing model parameters in multiple scenarios and the hardware system used therefor, such as a mental health screening system, mainly include two functional devices, namely a data acquisition and loading device and a data processing and analysis device. Figure 2The data acquisition and loading device includes software functions such as a data acquisition module, a data loading module, a real-time forwarding module, and a data transmission module. For online signal source acquisition scenarios, the data acquisition and loading device is usually a portable device or a lower computer, containing software and hardware circuits, and can be connected and transmitted to the data processing and analysis device of the upper computer via a wireless network, Bluetooth, or wired method. Specifically, online data is collected by the data acquisition module and then transmitted to the storage unit of the data processing and analysis device through the real-time forwarding module and the data transmission module to await preprocessing or as an online data set. For offline signal acquisition scenarios, the data acquisition and loading device is usually a PC-based software system. This software system is used in conjunction with the data processing and analysis device as part of the mental health screening system. The software system loads offline data sets and transmits them to the storage unit of the data processing and analysis device for display, processing, quality analysis, and result analysis. Finally, through evaluation and feedback, it is determined whether the current parameters need to be updated before the next use, or whether the existing data cache needs to be cleared, so as to achieve the purpose of closed-loop automatic fine-tuning of model parameters based on the provided data set.
[0031] The data processing and analysis device includes functional modules such as a human-computer interaction device, a display, a preprocessing module, a data quality module, a result acquisition module, a parameter optimization module, and an evaluation and feedback module. For online signal source acquisition scenarios, the data processing and analysis device can be configured as part of a host computer. The data transmission module enables the host computer's main control chip to issue signal instructions to execute the corresponding computer program, implementing the steps of the multi-scenario model parameter optimization method. For offline signal acquisition scenarios, the data processing and analysis device can be configured as part of a slave computer, inputting and transferring the offline signal to a storage unit.
[0032] The human-computer interaction machine is provided with an operation interface, an input device and a display. The operation interface is provided with parameter selection items or parameter input items of the device, such as scenario options, model options, task type options, data volume input items of the data set, model evaluation index options, update mode options, etc.
[0033] Optional scenario options include drop-down menus for offline loading, online collection, and hybrid scenarios. For offline loading, a pop-up window appears, selecting the folder containing the offline dataset (the folder containing the detection database). Click the desired offline dataset to load as the dataset to be tested in the overall workflow. For online collection, a pop-up window appears, connecting to an online collection device. When multiple devices are collecting data simultaneously, the data collection module is connected as a relay to store the collected online data item by item in the detection database. For hybrid scenarios, the offline dataset is loaded first. After optimizing the offline dataset for the detection model, the online device or data collection module is connected to optimize the online dataset for the detection model. Generally speaking, "offline datasets" are scenarios where all subject data in the dataset used for the current task have been pre-collected and no further supplementation is planned. "Online datasets" are scenarios where data collection is performed simultaneously with model development for the current task. This type of data collection typically requires a long timeframe, such as monitoring the therapeutic effects of a drug or the aftermath of a surgery. The process from experiment design to subject recruitment to data collection can take months, and the entire dataset construction process can take years. Model development is typically performed concurrently. A common scenario for using a "mixed dataset" is to first conduct preliminary model trials based on a compiled historical dataset while also continuously collecting individual datasets. This is because some models require a certain amount of data before training, and directly using a compiled dataset is convenient at the beginning of a task. Of course, this can also lead to many problems. Often, historical datasets (especially those collected by others) are not fully adapted to the patient's specific task, so continuous collection of patient data is necessary. This involves updating the model based on other people's data.
[0034] Optionally, the model option can be used in conjunction with the task type option to select a baseline model corresponding to the detection model. For example, when the task type is classification, the detection model is configured as a support vector machine model. SVM and its variants have a simple structure and good robustness, and only involve a portion of the data as support vectors during the model parameter update process, making them more storage-friendly. When the task type is regression, the detection model is configured as a linear regression model. Linear regression is a basic regression model with simple implementation and low overfitting potential, and can produce stable and reliable results both in the early and late stages of model parameter updates. When the task type is clustering, the detection model is configured as a hierarchical clustering model. Hierarchical clustering is a flexible clustering method that allows the final number of categories to be adjusted during the clustering process, which is beneficial for the parameter update process brought about by new data. When the task type is general, the detection model is configured as a deep model capable of adjusting the fully connected layer. CNN and its variant model structures are the basic components of deep models. By adjusting the structure of the final fully connected layer, the model can be adapted to various task types. As previously mentioned, if a baseline model is known—that is, a model solidified through a "training" process based on baseline data and a preselected model structure—the baseline model can be loaded: a pop-up window will appear, selecting the location of the baseline model parameter file and clicking "Load baseline model parameters" to serve as the baseline for comparing results throughout the entire process. Alternatively, if a baseline model is unavailable or unknown, the user can import baseline data offline. Alternatively, the user can start completely from scratch (the scenario corresponding to the assertion portion of the overall process), with neither initial model parameters nor initial data. Therefore, it is necessary to first obtain some data to train the model as a baseline before proceeding with the comparison phase in the subsequent grouping process (i.e., the step of updating the detection model's training set to incorporate it). Retraining can be done directly based on data in offline or hybrid scenarios; in online scenarios, the user will be prompted to first collect baseline data and a pop-up window will appear to connect to an online device or data acquisition module.
[0035] Optionally, the data volume of a dataset is generally matched to the collection scenario, and the end of this optimization method can be determined based on the data volume of the set dataset. For example, if the data volume of the offline dataset is greater than or equal to 1, a specific value can be set; if the data volume of the online dataset is equal to 1, then the online data is collected one by one and saved as different online datasets in the detection database; the mixed dataset is divided into offline and online datasets to update the training set of the detection model; the dividing line between offline and online datasets is determined by data volume. Of course, there can be multiple datasets.
[0036] Optionally, model evaluation metrics are generally selected to match the task type. Different task types can select different model evaluation metrics based on their needs. Based on the gain results of the model evaluation metrics, different methods are used to update the training set of the detection model to optimize the model parameters. Each model evaluation metric is pre-configured with a threshold. Changes within this threshold are considered fluctuations and do not affect the final performance evaluation of the detection model. For example, the drop-down menu items for classification tasks include: accuracy (ACC), sensitivity, specificity, precision, recall, etc. For another example, the drop-down menu items for regression tasks include: mean squared error (MSE), mean absolute percentage error, relative absolute error, mean deviation error, and mean absolute error. For another example, for clustering tasks: sum of squared errors (SSE), silhouette coefficient, variance ratio criterion, cluster purity, and normalized mutual information.
[0037] Optionally, the update mode options are respectively provided with automatic update, manual update, pause update, and continue update options, which are displayed on the operation interface of the human-computer interaction machine by option selection or click triggering. Among them, the automatic update is configured to complete the above settings, and the model parameters are automatically updated along with the data according to the program process by clicking the button, and the updated model parameters are automatically saved each time the update is updated. The manual update is configured to complete the above settings, and the model parameters are updated once according to the program process by clicking the button and the results are saved. The pause update is configured to save the latest model parameters nearby and present them on the interface when clicked. The continue update is configured to check whether the above settings have been modified, and continue to update the model parameters based on the latest settings and data.
[0038] In some embodiments, the method for optimizing model parameters in multiple scenarios also includes using a preprocessing module to preprocess the data in the dataset before loading the dataset, such as noise reduction or filtering out obviously inappropriate data; or using a data quality module to perform data quality testing on the dataset to be tested, and then saving the dataset that passes the quality test and discarding the dataset that is missing data or fails the test. For example, patent CN119272057B discloses a method for evaluating the quality of a dataset using task effects, a mental and psychological screening system, which obtains a basic feature index BFQI based on the dataset; selects a target task and obtains a task feature index TFQI and a predicted label based on the task characteristics of the dataset; obtains a task indicator TQI based on the predicted label; and fuses the BFQI, TFQI, and TQI through a weighted function to obtain the task effect DSQI of the dataset as the evaluation result of the dataset quality. Of course, since the offline dataset has been collected before the model parameter optimization, preprocessing and data quality testing can be performed in advance and the qualified dataset can be stored in the detection database as the dataset to be tested. Online datasets need to be tested online. Therefore, before loading a dataset, a piece of data is collected online, and then the dataset is preprocessed and tested for data quality. The dataset that passes the test is stored in the test database as the dataset to be tested.
[0039] In some embodiments, a result acquisition module can be used to obtain gain results, including: obtaining the true label of the data set to be tested, such as manual labeling; inputting the data set to be tested into the detection model to obtain the predicted label; judging whether the predicted label is stable for the test results; if so, pre-merging the data set to be tested into the training set, training a hypothesis model to obtain the hypothesis label, and obtaining the gain result of the detection model according to the degree of proximity between the predicted label and the hypothesis label and the true label; if not, ending this optimization.
[0040] Generally speaking, the gain result = (True label value - predicted label value of the original fixed parameter model) (true label value - predicted label value of updated parameter model), where, It is the name of a function that takes the absolute value, indicating that the absolute value of the part in the brackets is taken. If the gain value is positive, the gain result is defined as positive gain, and if the gain value is negative, the gain result is defined as negative gain. The above formula shows that positive gain essentially means that the distance between the predicted value obtained by the subject on the model with updated parameters and the true label is closer than the distance between the predicted value obtained on the model with the original fixed parameters and the true label. In other words, on the model with updated parameters, the subject tends to get closer to the true label. If more than half of the subjects in the data set finally used for evaluation and feedback obtain positive gain on the model with updated parameters, the current model with updated parameters can be fixed and used as a test for subsequent data. The gain result has nothing to do with whether the subject is ultimately classified correctly. It is essentially a measure of whether the subject's predicted label value has a trend of improvement. Taking the binary classification task as an example, if the true label value of a subject is 0, the predicted label value on the original fixed parameter model is 0.3, and the predicted label value on the updated parameter model is 0.4; then the gain value = -0.1, which is a negative gain; if the true label value of a subject is 0, the predicted label value on the original fixed parameter model is 0.3, and the predicted label value on the updated parameter model is 0.2; then the gain value = 0.1, which is a positive gain; if the true label value of a subject is 1, the predicted label value on the original fixed parameter model is 0.3, and the predicted label value on the updated parameter model is 0.4; then the gain value = 0.1, which is a positive gain; if the true category label value of a subject is 1, the predicted label value on the original fixed parameter model is 0.3, and the predicted value on the updated parameter model is 0.2; then the gain value = -0.1, which is a negative gain.
[0041] Optionally, the determination of whether the predicted label is stable for the test result includes: obtaining the original test result of the test model according to the predicted label; adding disturbance and adjusting the degree of disturbance through a threshold; re-inputting the data set to be tested into the test model to obtain a new test result; determining whether the difference between the original test result and the new test result meets the threshold, if so, the predicted label is stable for the test result; if not, the predicted label is unstable for the test result. For example, but not limited to the following methods, the stability of the predicted label for the test result can be determined: The threshold value indicating the degree of disturbance. When the difference between the original test result and the new test result is greater than , indicating that the perturbed result interferes with the final output result, then the data set is unavailable; when the difference between the original test result and the new test result is less than or equal to , indicating that the perturbation result does not interfere with the final output result, and the dataset is available.
[0042] (1) Using the difference between the final result of the original subject and the final result of the new subject to change . The predicted results increase or reduce The final result of the subject will not be changed, that is, the final result of the subject will not fall between the two categories. It can be 10%, 5%, 1% or other values. Taking the binary classification task as an example, if the true label value of the first category is 0, the true label value of the second category is 1. = 10%, then the results of the subjects whose predicted label values fall within (0.4, 0.6) will change after a slight disturbance, which means that the predicted label is unstable for the subjects, so the dataset to be tested cannot be used to optimize the model parameters.
[0043] (2) Using the difference between the original test results and the new test results to change The intermediate results of the subjects increased or reduce (or any of them The final prediction result of the subject will not be changed. It can be 5%, 1% or other values. Taking the slice of data in the time domain as an example, take = 5%. If the result of each slice of the subject increases or decreases by 0.05 and does not affect the result, or the result of 5% of the slices of the subject changes completely and does not affect the result, it means that the final prediction value of the subject is stable and is not affected by slight disturbances. Or, if we take the feature value extracted from the data as an example, take = 5%. If increasing or decreasing each feature value by 0.05 for a subject does not affect the result, or if completely changing 5% of the features for a subject does not affect the result, then the final predicted value for that subject is stable and unaffected by minor perturbations. This means that the predicted label is stable across subjects, and the dataset under test can be used to optimize model parameters.
[0044] (3) Using model parameter changes , does not affect the final prediction result of the subject. It can be 5%, 1% or other values. Taking the deep model as an example, = 5%. If each parameter in the model is at its original value If the random number within the 5% interval does not affect the test results, or if the 5% parameter values in the model are completely changed and still do not affect the test results, it means that the final predicted value of the test subject is stable and is not affected by slight disturbances. Or, if we take the machine learning model as an example, = 5%. If the classification hyperplane takes a random number within the range of ±5% of the original value and does not affect the test result, or the 5% dimensional direction of the hyperplane is completely changed and still does not affect the test result. It means that the final predicted value of the test subject is stable and is not affected by slight disturbances. That is to say, the predicted label is stable for the test result, so the data set to be tested can be used to optimize the model parameters. In some embodiments, the parameter optimization module can be used to update the training set of the detection model in conjunction with the acquisition scenario and gain results, including: for positive gain, obtaining the gain result of a single data in the data set to be tested, and incorporating the single data corresponding to the positive gain into the training set of the detection model; for negative gain, using the offline data set to replace the training set of the detection model, discarding the online data set, or recording the data information through the evaluation and feedback module. Different processing can be done according to the acquisition scenario and data volume, as follows.
[0045] (1) For offline datasets, see Figure 3 . When there are multiple data volumes, first obtain the overall gain result of the offline data set. If the overall gain is positive, then use the original dynamic grouping method, that is, input the data in the data set to be tested into the detection model one by one to obtain the gain result corresponding to the single data; incorporate the single data corresponding to the positive gain into the training set of the detection model, discard the single data corresponding to the negative gain, and record the data information through the evaluation and feedback module. If the overall gain is negative, then use the new static grouping method, that is, use the offline data set to replace the training set of the detection model as the new training set. In particular, when the amount of data is only 1, obtain the gain result of the offline data set. If it is a positive gain, incorporate the data into the training set of the detection model, that is, the original dynamic grouping; if it is a negative gain, replace the training set of the detection model with the offline data set, that is, the new static grouping.
[0046] (2) For online datasets, see Figure 4 The online dataset has only one data set. First, the gain result of the online dataset is obtained. If it is a positive gain, the data is incorporated into the training set of the detection model, that is, the original dynamic grouping; if it is a negative gain, the current online data is discarded, and the data information is recorded through the evaluation and feedback module before the next online dataset is processed.
[0047] (3) For mixed datasets, process the offline dataset first and then the online dataset.
[0048] In this case, since the original model parameters have no generalization ability for new data, the training set of the detection model is updated by combining the acquisition scene and gain results to train the model. By adjusting the data in the training set while keeping the model structure unchanged, new model parameters are obtained to improve the final output results.
[0049] Optionally, the training set data used to train new parameters can be the portion of the new dataset that has been cleaned and not retained for testing, or can be the portion of the new dataset and the baseline dataset that has been cleaned and not retained for testing. In particular, for the selection of part of the data in the baseline dataset, the model parameters trained with the new dataset can be used as the baseline, and the baseline dataset can be processed in the original dynamic grouping method. In the original dynamic grouping process, the model structure does not change, but the model parameters are updated by continuously updating the "baseline data" used for training. Of course, there is a possibility that the model parameters will not be updated. This mainly depends on whether new data that meets the data quality requirements and stability requirements is added to the training process after the grouping process.
[0050] In summary, the multi-scenario model parameter optimization method in this case can meet the needs of adapting to different scenarios, is compatible with offline, online, automatic update, manual update and other situations, and has the following advantages.
[0051] (1) Compatibility and flexibility. It can process online data, offline data, and a mixture of the two simultaneously, supports automatic and manual updates, and adapts to various data collection scenarios. It supports frequent switching of scenarios during data collection, supports data collection at multiple locations and multiple centers, and adapts to complex application scenarios. For tasks that require data collection at multiple locations simultaneously, it improves the consistency and efficiency of data processing. This flexibility enables users to effectively perform data verification and model optimization under different environments and conditions.
[0052] (2) Human-computer interaction interface. Human-computer interaction is performed through a simple GUI interface. When switching scenes, data collectors do not need to deeply understand the code to adjust the logic or model parameters. They can use the buttons and drop-down boxes on the operation interface to perform operations. While unifying the standards, it also reduces the requirements for data collectors, making it easier to obtain a usable multi-center large data set. It is also easy for non-technical personnel to operate, thus reducing the need for special technical background. Users can adjust parameters without in-depth understanding of the code, which improves work efficiency and reduces training costs.
[0053] (3) Dynamic update capability. During the data collection process, the model can be frequently switched and updated in a timely manner, which solves the shortcomings of the original solution in processing offline data and can simultaneously learn the information of the entire data set. Through the data quality detection of the data set and the stability detection of the test results of the predicted labels obtained by the data set under the original model, the original dynamic grouping or new static grouping method is adopted to process the data set to be tested in combination with different collection scenarios, data volume, and gain results. Finally, the dynamic verification and optimization of the data set are completed, so that the model performance is better improved, the timeliness and adaptability of the model are guaranteed, and the model has good coping capabilities for the ever-changing data environment.
[0054] In some embodiments, a mental health screening system is provided, comprising: a processor, which runs the described method to optimize the parameters of the training detection model using the data set to be detected; a memory, which stores the detection model library and the detection database; a human-computer interaction machine, whose operation interface is provided with parameter options to set the collection scenario of the data set to be detected; and a result acquisition module, which is used to output the screening results.
[0055] In some embodiments, a computer device is further provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0056] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. In a specific implementation, if the memory and processor are implemented independently, the memory and processor may be connected to each other via a bus and communicate with each other. The bus may be an Industrial Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industrial Standard Architecture (EISA) bus. The bus may be categorized as an address bus, a data bus, a control bus, etc. If the memory and processor are integrated on a single chip, the memory and processor may communicate with each other via an internal interface.
[0057] In some embodiments, a computer-readable storage medium is provided, storing a computer program that, when executed by a processor, implements the steps of the method. The storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0058] In some embodiments, a computer program product is also provided, including a computer program, which implements the steps of the method when executed by a processor. The computer program may include program code, which includes computer operating instructions and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be implemented in the form of a software product or sold or used as an independent product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present invention.
[0059] Test example 1.
[0060] Based on different data collection scenarios, different data collection devices, and different patients, we obtained offline datasets A and B to train the solidified model. We then added 74 healthy subjects and 44 patient subjects to form the offline dataset C, and obtained its test results and data inclusion results.
[0061] Before the C dataset was included, the validation results and test results of the training set through slicing and subjects (as a whole) are shown in Tables 1 and 2. It can be seen that the current solidified model parameters have a good classification effect on the test set that also comes from the A dataset and the B dataset, but the test effect on the new C dataset that the model has not learned is very poor, that is, the effect is not good in cross-dataset testing. After the C dataset was included, the validation results and test results of the training set through slicing and subjects (as a whole) are shown in Tables 3 and 4. It can be seen that the multi-scenario model parameter optimization method in this case significantly improves the accuracy of the model on the C dataset by focusing on high-quality data to update the parameters of the detection model, and is particularly suitable for cross-datasets.
[0062] Table 1 Verification results of the pre-enrollment training set
[0063]
[0064] Table 2 Results of the test set before enrollment
[0065]
[0066] Table 3 Verification results of the training set after enrollment
[0067]
[0068] Table 4 Test results of the test set after enrollment
[0069] .
[0070] Test example 2.
[0071] The baseline model (i.e., the detection model whose parameters are derived from the baseline data) was trained using the offline baseline datasets (datasets D and E). The classification performance of the updated model before and after the inclusion of datasets A and B was then tested. Clearly, as shown in Tables 5, 6, and 7, the updated model significantly improves classification performance on the new dataset B, with minimal impact on the other datasets. Therefore, when generalizing the baseline model to the new dataset, this update is retained, i.e., the original dynamic inclusion.
[0072] Table 5 Classification effect of baseline model on baseline data before update
[0073]
[0074] Table 6 Classification effect of baseline model on new dataset before update
[0075]
[0076] Table 7 Classification effect of updated baseline model on new dataset
[0077] .
[0078] Test example 3.
[0079] The baseline model (i.e., the detection model whose parameters are derived from the baseline data) was trained using the offline baseline datasets (Datasets A, B, D, and E). The classification performance of the updated model before and after the addition of Dataset C was then tested. Clearly, as can be seen from Tables 8, 9, and 10, the updated model's classification performance declined across all datasets. For generalization purposes, it is not recommended to retain this update; instead, Dataset C should be discarded. However, for compatibility in new dataset scenarios, Dataset C can be used instead of the baseline dataset.
[0080] Table 8 Classification effect of baseline model on baseline data before update
[0081]
[0082] Table 9 Classification effect of baseline model on new dataset before update
[0083]
[0084] Table 10 Classification effect of the updated model on the new dataset
[0085] .
[0086] With the above-mentioned ideal embodiment of the present invention as inspiration, through the above description, relevant personnel can make various changes and modifications without departing from the scope of the technical idea of the present invention. That is, the technical scope of the present invention is not limited to the contents of the specification.
Claims
1. A method for optimizing model parameters in multiple scenarios, characterized in that: include: Build a detection model library, including several detection models whose parameters are optimized using training sets; Constructing a detection database, including data sets to be detected in different acquisition scenarios, wherein the data sets to be detected include offline data sets and online data sets; Input the data set to be tested into the test model to obtain the gain results of the model evaluation indicators, including positive gain and negative gain; and The training set of the detection model is updated by jointly collecting scenes and gain results, including: For offline datasets, first obtain the overall gain result of the offline dataset. When there are multiple data sets, if the overall gain is positive, input the data in the dataset to be tested into the detection model one by one to obtain the gain result corresponding to the single data. The single data corresponding to the positive gain is incorporated into the training set of the detection model, and the single data corresponding to the negative gain is discarded. If the overall gain is negative, the offline dataset is used to replace the training set of the detection model as the new training set. When there is only one data set, if it is a positive gain, the data is incorporated into the training set of the detection model. If it is a negative gain, the offline dataset is used to replace the training set of the detection model. For the online dataset, the data volume of the online dataset is set to only 1. First, the gain result of the online dataset is obtained. If it is a positive gain, the data is incorporated into the training set of the detection model. If it is a negative gain, the current online data is discarded; then the next online dataset is processed.
2. The method according to claim 1, characterized in that The gain result obtained includes: Get the true label of the dataset to be tested; Input the dataset to be tested into the detection model to obtain the predicted label; Determine whether the predicted labels are stable for the test results; If so, the dataset to be tested is pre-merged into the training set, and the hypothesis model is trained to obtain the hypothesis label. The gain result of the detection model is obtained according to the degree of proximity between the predicted label, the hypothesis label and the true label. If not, the optimization ends.
3. The method according to claim 2, characterized in that Determining whether the predicted label is stable for the test result includes: Obtain the original test results of the detection model based on the predicted labels; Add disturbances and adjust the degree of disturbance through thresholds; Re-input the dataset to be tested into the test model to obtain the results of the new test subjects; Determine whether the difference between the original test result and the new test result meets the threshold. If so, the predicted label is stable for the test result; if not, the predicted label is unstable for the test result.
4. The method according to claim 1, wherein Also includes: Set the data volume of the dataset to be tested to determine whether the optimization method is complete based on the data volume; in The amount of data in the offline data set is greater than or equal to 1; The data volume of the online data set is equal to 1, that is, online data is collected one by one and saved in the detection database as different online data sets.
5. The method according to claim 4, characterized in that The data set to be detected also includes a mixed data set; The training set for the joint acquisition scenario and gain result update detection model also includes: The mixed dataset is divided into an offline dataset and an online dataset to update the training set of the detection model respectively; The dividing line between offline and online datasets is determined by the amount of data.
6. The method according to claim 1, characterized in that It also includes selecting the corresponding detection model according to the task type; When the task type is a classification task, the detection model is configured as a support vector machine model; When the task type is a regression task, the detection model is configured as a linear regression model; When the task type is a clustering task, the detection model is configured as a hierarchical clustering model; When the task type is general, the detection model is configured as a deep model capable of adjusting a fully connected layer.
7. A mental health screening device, characterized in that: include: A processor, configured to execute the method according to any one of claims 1 to 6, so as to optimize the parameters of the detection model using the data set to be detected; A memory storing the detection model library and the detection database; A human-computer interaction machine, whose operation interface is provided with parameter options for setting the collection scenario of the data set to be detected; The result acquisition module is used to output the screening results.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Methods, apparatus, storage media and devices for optimizing model training results
CN114266352B
Method for evaluating data set quality using task effects, mental health screening system
CN119272057B
Material process parameter online reverse design method and system
CN118036465A
Method for evaluating data set quality by using task effect and psychological screening system
CN119272057A