Campus psychological health detection method, intelligent electronic equipment and storage medium
By acquiring and analyzing the audio and text features of students' voice data, and combining a large-scale mental health testing model with DPO optimization, the accuracy and privacy issues of campus mental health testing have been resolved, achieving more intelligent and accurate testing results.
Patent Information
- Application Number
- CN202511046286.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-11
AI Technical Summary
Existing campus mental health testing technologies suffer from problems such as reduced accuracy, insufficient semantic understanding, inadequate privacy protection, and limited sample sources, leading to delayed intervention and inaccurate identification.
Voice data is acquired through a voice acquisition module, audio features are extracted and converted into text data, and then analyzed in conjunction with a large-scale mental health detection model. Diverse samples and DPO optimization techniques are used to improve detection accuracy.
It improved the accuracy of campus mental health testing, achieved more intelligent and precise testing, enhanced privacy protection, and optimized model performance through sample diversity.
Smart Images

Figure CN120932884A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a method for detecting campus mental health, an intelligent electronic device, and a storage medium. Background Technology
[0002] Campus mental health issues seriously endanger students' physical and mental well-being, but existing mental health testing technologies have significant shortcomings, leading to problems such as delayed intervention, inaccurate identification, and insufficient privacy protection. There is an urgent need for more intelligent and accurate solutions.
[0003] Traditional campus mental health systems rely on victims or bystanders manually triggering alarms (such as pressing an emergency button or sending a text message), which has the following drawbacks: 1. Typically, there is no closed-loop optimization process for the detection model, which will gradually reduce the detection accuracy and make it unsuitable for local or school-specific scenarios; 2. Most methods simply perform keyword matching on text data, lacking semantic understanding and the use of multimodal data. Alternatively, some detection methods only proceed to the next step of speech emotion recognition after keywords have been detected.
[0004] 3. It is necessary to set up a mental health prevention template in advance, and then use real data to calculate the similarity with the template. If the wording is changed, such as using synonyms, the detection effect will be worse. 4. There is no clear method for generating training or optimization samples, or the sample source is singular.
[0005] Therefore, there is an urgent need for a technical solution for campus mental health testing that can address the above-mentioned problems. Summary of the Invention
[0006] To address the shortcomings of the existing technology, this application provides a campus mental health testing method, an intelligent electronic device, and a storage medium, which can obtain key features of voice data through semantic analysis and use diverse samples for model training, thereby greatly improving the accuracy of campus mental health testing.
[0007] The technical effect to be achieved in this application is accomplished through the following solution: According to the first aspect of this application, a method for testing campus mental health is provided, comprising: Voice data is acquired through a voice acquisition module and then sent to an audio feature extraction module; the voice data includes voice messages left by students through smart terminals. The audio feature extraction module extracts audio features based on the speech data; wherein, the audio features include speech rate features, tone and emotion features, volume features, and pitch features. The speech data is converted into text data using ASR technology, and the text data is concatenated with the audio features. After data processing and conversion, the target features are obtained. The target features are input into a large-scale mental health detection model to obtain the output results of the model. The output results include: a conclusion on whether mental health exists, the basis for the conclusion, and processing suggestions.
[0008] Preferably, the method further includes the following step: optimizing the large-scale mental health testing model using the DPO method, wherein the objective function of the DPO optimization is as follows: , Among them, L DPO (π θ ;π ref E(x,y) is the objective function for DPO optimization; w, y l ) is the expectation operator; π θ (y w |x) represents the response y generated by the current optimization strategy model under input x. w The conditional probability of π; θ (y l |x) represents the response y generated by the current optimization strategy model under input x. l The conditional probability of π; ref (y w |x) represents the response y generated by the current reference policy model under input x. w The conditional probability of π; ref (y l |x) represents the response y generated by the current reference policy model under input x. l The conditional probability of π; θ y is the current optimization policy model to be optimized; πref is the pre-trained reference policy model; x is the input data; y is the input data. w It is the preferred response, in the preference pair (y) w ,y l The result marked as superior in ) ; y l It is a suboptimal response, in the preference pair (y) w ,y l The generated results are marked as poor in the model; β is the temperature coefficient, representing the degree to which the control model deviates from the reference model; D is the training data distribution, consisting of triples (x, y). w ,y l )constitute; It is the Sigmoid function.
[0009] Preferably, the sample format required for DPO optimization is {query, chosen_response, rejected_response}.
[0010] Preferably, the log probability difference in the objective function is expressed by the following formula: , Where, π θ (y|x) is the conditional probability that the current optimization strategy model generates the response y under the input x; π ref (y|x) is the conditional probability that the current reference policy model generates the response y given input x; P θ (y t |x,y <t ) represents the probability that the current optimization model generates the t-th token; P ref (y t |x,y <t ) represents the probability that the current reference model generates the t-th token; k represents the k-th step of a response; S k This represents the set of tokens for the k-th step across all response positions; y t This represents the t-th generated token, where t is a positive integer; y <t This represents the sequence of tokens generated up to t-1. α k This represents the weight parameter, which is the reward value for chosen samples and the penalty value for rejected samples.
[0011] Preferably, during the cold start phase, data synthesized using a high-performance large model (such as a sample synthesis large model) is used as samples and then manually reviewed to optimize the mental health detection large model.
[0012] Preferably, the manual review includes: The reviewers conducted a correctness check on the samples synthesized from the high-performance large model; Samples that pass the test are saved to the sample library.
[0013] Preferably, the mental health testing model is optimized when the rejection rate of the response given by the large mental health testing model is greater than a first threshold or when the set optimization period is reached.
[0014] Preferably, when the set optimization period is reached, the large-scale mental health testing model is optimized using accumulated historical data.
[0015] According to a second aspect of this application, an intelligent electronic device is provided, the intelligent electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described campus mental health detection method.
[0016] According to a third aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the above-described campus mental health testing method.
[0017] According to one embodiment of this application, the beneficial effects of using this campus mental health testing method are as follows: This method obtains audio features and text data from student feedback voice data, concatenates them into target features, and analyzes these target features using a large-scale mental health detection model to obtain output results. This method features diverse samples. Key features of the voice data are obtained through semantic analysis, and judgments are made based on these key features combined with the large-scale mental health detection model. Furthermore, the large-scale mental health detection model is continuously optimized using an improved DPO method based on positive and negative samples, thereby improving the accuracy of mental health detection. Attached Figure Description
[0018] To more clearly illustrate the embodiments of this application or the existing technical solutions, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a campus mental health testing method according to one embodiment of this application; Figure 2 This is a schematic diagram of a campus mental health testing process in one embodiment of this application; Figure 3 This is a schematic block diagram of a smart electronic device according to an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] like Figure 1 As shown, a campus mental health testing method in one embodiment of this application includes the following steps: Step 1 (S1): Acquire voice data through the voice acquisition module and send the voice data to the audio feature extraction module; the voice data includes voice messages made by students through smart terminals; For example, the smart terminal can be applied in various environments or scenarios, such as schools, parks, amusement parks, etc., without limitation. All scenarios that can be applied to smart terminals that are well known to those skilled in the art are within the protection scope of this application.
[0022] In this step, various methods can be used to collect voice data, such as intelligent voice assistants (e.g., hardware devices capable of voice interaction, including existing hardware devices capable of voice interaction and similar hardware devices that will appear in the future, all of which are within the scope of protection of this application), large telephones, voice tasks / applications specifically designed on language learning apps, voice questionnaires, voice diaries, daily recordings, interactions with chatbots, voice collection from library or smart classroom systems, etc. Data collected by terminals or devices capable of voice interaction or voice recording are all within the scope of protection of this application; this is merely an example.
[0023] Step 2 (S2): The audio feature extraction module extracts audio features based on the speech data; wherein, the audio features include speech rate features, tone and emotion features, volume features, and pitch features, etc.; the multiple audio features mentioned here are only examples, and other similar audio features known to those skilled in the art can also be applied here, and are also within the scope of protection of this patent, and are not limited thereto.
[0024] In this step, for example, after converting the speech data into a digital signal, background noise (such as fan noise, coughing) and silent segments when not speaking are removed from the recording to make the main sound clearer. The computer calculates several key indicators, such as speech rate characteristics: counting how many words or syllables are spoken per second; volume characteristics: measuring the average "loudness" of the sound; pitch characteristics: identifying whether the "tone" of the sound is high-pitched or low-pitched. An emotion recognition model is also used to analyze the rhythm or intensity changes of the voice to identify the speaker's expected emotional characteristics.
[0025] Step 3 (S3): Convert the speech data into text data using ASR technology, splice the text data with the audio features, and obtain target features through data processing and conversion. In this step, converting the speech data into text data using ASR technology can be specifically, for example: Convert the analog sound signal into a digital signal that it can process; cut the continuous sound stream into very small time segments (usually at the millisecond level); Analyze each small sound segment; compare these segments with the "sound model library", which contains the most basic sound units in human language (called "phonemes", such as initials and finals in Chinese); the system determines which phoneme the current segment is most likely to be the sound of; Combine the identified series of phonemes in sequence; use the "language model library" to understand these phoneme sequences, which contains the composition of words, grammar rules, and common word collocations; The system finds the most likely matching words and sentences according to the phoneme sequence and language rules. For example, the phoneme sequence "ni-hao" will be combined into the word "你好" (Hello).
[0026] The system organizes the recognized and combined words and sentences into a coherent and human-readable text (such as Chinese characters, English words, etc.) in the order of speech. This text is the result of ASR conversion.
[0027] The above conversion of the speech data into text data using ASR technology is only an example, and this application is not limited to this way of implementation. Variations of this example and related specific ASR technologies that may emerge in the future can all be applied here, and no restrictions are imposed.
[0028] Splice the text data with the audio features, and obtain target features through data processing and conversion. Specifically, splice the text data and audio features recognized from the same speech data. For example: [Audio feature] slow speech rate, low mood, and [Text content] The classmates always isolate me. Spliced into target features.
[0029] Step 4 (S4): Input the target features into the mental health detection large model to obtain the output result of the mental health detection large model; the output result includes: the conclusion of whether there is mental health, the basis for drawing the conclusion, and treatment suggestions.
[0030] In an embodiment of this application, in order to improve the detection accuracy, the following steps are further included: Optimize the mental health detection large model using the DPO method, and the objective function of DPO optimization is as follows: , Among them, L DPO (π θ ;π ref E(x,y) is the objective function for DPO optimization; w, y l ) is the expectation operator; π θ (y w |x) represents the response y generated by the current optimization strategy model under input x. w The conditional probability of π; θ (y l |x) represents the response y generated by the current optimization strategy model under input x. l The conditional probability of π; ref (y w |x) represents the response y generated by the current reference policy model under input x. w The conditional probability of π; ref (y l |x) represents the response y generated by the current reference policy model under input x. l The conditional probability of π; θ y is the current optimization policy model to be optimized; πref is the pre-trained reference policy model; x is the input data; y is the input data. w It is the preferred response, in the preference pair (y) w ,y l The result marked as superior in ) ; y l It is a suboptimal response, in the preference pair (y) w ,y l The generated results are marked as poor in the model; β is the temperature coefficient, representing the degree to which the control model deviates from the reference model; D is the training data distribution, consisting of triples (x, y). w ,y l )constitute; It is the Sigmoid function, i.e., σ(z) = 1 / (1+e^(z-1)). −z ).
[0031] The sample format required for DPO optimization is {query, chosen_response, rejected_response}.
[0032] For example, the optimization process is carried out in multiple steps based on the DPO's original response, such as three steps: whether there is a conclusion about mental health, the basis for the conclusion, and the treatment recommendations.
[0033] Typically, since chosen and rejected samples are not entirely correct or entirely incorrect (in reality, evaluation samples for complex scenarios are rarely always completely correct or completely incorrect), different weights α are assigned to each step. k For chosen samples, this weight is the reward value, and for rejected samples, it is the penalty value.
[0034] Preferably, the log probability difference in the objective function is represented by the following formula. It should be noted that this log probability difference is a step-by-step refinement of the log probability difference in the existing DPO objective function, which enables more fine-grained model optimization and thus improves the model's detection capability: , Where, π θ (y|x) is the conditional probability that the current optimization strategy model generates the response y under the input x; π ref (y|x) is the conditional probability that the current reference policy model generates the response y given input x; P θ (y t |x,y <t ) represents the probability that the current optimization model generates the t-th token; P ref (y t |x,y <t ) represents the probability that the current reference model generates the t-th token; k represents the k-th step of a response; S k This represents the set of tokens for the k-th step across all response positions; y t This represents the t-th generated token, where t is a positive integer; y <t This represents the sequence of tokens generated up to t-1. α k This represents the weight parameter, which is the reward value for chosen samples and the penalty value for rejected samples.
[0035] For example, the sample format can be as follows: {"query": I am ridiculed, bullied, and isolated by my classmates every day. They not only openly mock my appearance and grades, but also spread rumors about me, which makes me feel very painful and helpless.} “chosen”:{ {“response_1”: “Mental health exists”, “reward_value”:1} {“response_2”: “First, the student described continuous public ridicule and insults; second, the spread of rumors and group isolation also indicate that the event was systematic and targeted. These are all important characteristics of mental health.”, reward_value”: 0.9}
[0036] {“response_3”: “It is recommended that the school immediately intervene in the investigation, provide psychological counseling, and organize anti-mental health awareness campaigns within classes or throughout the school. At the same time, necessary education and punishment should be given to students who spread rumors and engaged in group ostracism, in order to protect the mental and physical health of the affected students,”, “reward_value”: 0.9}
[0037] } “rejected”:{ {“response_1”: “Mental health does not exist”, “penalty_value”: 0.9} {“response_2”: “There is ridicule and exclusion, but there is no conclusive evidence that this is a systematically planned mental health issue; it may just be emotional venting or a misunderstanding”, “penalty_value”: 0.8} {“response_3”: “It is recommended that students remain calm, wait for the situation to subside, and then observe the situation before taking any drastic measures immediately”, “penalty_value”: 0.7} } } During the cold start phase, the samples used to optimize this large-scale mental health testing model were synthesized using a high-performance large-scale model (such as a sample synthesis large-scale model) and underwent relevant manual review. The correctness of the synthesized samples was verified through manual review, and only the samples that passed the manual review were retained.
[0038] For example, the cold start phase uses samples synthesized using a high-performance large model; while the non-cold start phase can use real sample data alone or a mixture of real samples and synthesized samples. The specific ratio can be determined according to the actual situation and is not limited here.
[0039] In actual use, relevant personnel will judge whether to adopt the output of the large model and score each step. Adopted samples will be used as chosen samples, and rejected samples will be used as rejected samples, which will be assigned to the ak weights according to the scores. Then the samples will be saved to the sample database.
[0040] The optimal time to optimize the large-scale mental health testing model is when the rejection rate of the response given by the large-scale mental health testing model exceeds the first threshold or when the set optimization period has been reached.
[0041] Once the set optimization period is reached, the large-scale mental health testing model is optimized using accumulated historical data.
[0042] In one embodiment of this application, an intelligent electronic device is disclosed, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned campus mental health detection method.
[0043] In one embodiment of this application, a computer-readable storage medium is disclosed, which stores one or more programs that can be executed by one or more processors to implement the above-described campus mental health testing method.
[0044] According to one embodiment of this application, the beneficial effects of using this campus mental health testing method are as follows: This method obtains audio features and text data from student feedback voice data, concatenates them into target features, and analyzes these target features using a large-scale mental health detection model to obtain output results. This method features diverse samples. Key features of the voice data are obtained through semantic analysis, and judgments are made based on these key features combined with the large-scale mental health detection model. Furthermore, the large-scale mental health detection model is continuously optimized using an improved DPO method based on positive and negative samples, thereby improving the accuracy of mental health detection.
[0045] It should be noted that the methods of one or more embodiments of this application can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the process. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this application, and the multiple devices will interact with each other to complete the method described.
[0046] It should be noted that the above description describes specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0047] Based on the same inventive concept, and corresponding to the methods of any of the above embodiments, this application also discloses an intelligent electronic device; Specifically, Figure 3 This diagram illustrates the hardware structure of an intelligent electronic device for a campus mental health testing method provided in this embodiment. The device may include a processor 410, a memory 420, an input / output interface 430, a communication interface 440, and a bus 450. The processor 410, memory 420, input / output interface 430, and communication interface 440 are interconnected internally via the bus 450.
[0048] The processor 410 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0049] The memory 420 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 420 can store the operating system and other applications. When the technical solutions provided in the embodiments of this application are implemented by software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.
[0050] Input / output interface 430 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0051] The communication interface 440 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (e.g., USB, Ethernet cable, etc.) or wireless means (e.g., mobile network, WIFI, Bluetooth, etc.).
[0052] Bus 450 includes a pathway for transmitting information between various components of the device, such as processor 410, memory 420, input / output interface 430, and communication interface 440.
[0053] It should be noted that although the above-described device only shows the processor 410, memory 420, input / output interface 430, communication interface 440, and bus 450, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this application, and not necessarily all the components shown in the figures.
[0054] The intelligent electronic devices described above are used to implement the corresponding campus mental health detection methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0055] Based on the same inventive concept, corresponding to any of the above embodiments, one or more embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the campus mental health testing method as described in any of the above embodiments.
[0056] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0057] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the campus mental health testing method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0058] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0059] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring one or more embodiments of this application, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this application will be implemented (i.e., these details should be fully within the understanding of those skilled in the art). While specific details (e.g., circuits) are set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that one or more embodiments of this application may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0060] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0061] One or more embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this application should be included within the protection scope of this application.
Claims
1. A method for testing campus mental health, characterized in that, include: Voice data is acquired through a voice acquisition module and then sent to an audio feature extraction module; the voice data includes voice messages left by students through smart terminals. The audio feature extraction module extracts audio features based on the speech data; wherein, the audio features include speech rate features, tone and emotion features, volume features, and pitch features. The speech data is converted into text data using ASR technology, and the text data is concatenated with the audio features. After data processing and conversion, the target features are obtained. The target features are input into a large-scale mental health detection model to obtain the output results of the model. The output results include: a conclusion on whether mental health exists, the basis for the conclusion, and processing suggestions.
2. The campus mental health testing method according to claim 1, characterized in that, The process also includes the following steps: optimizing the large-scale mental health testing model using the DPO method, wherein the objective function for DPO optimization is shown below: , Among them, L DPO (π θ ;π ref E(x,y) is the objective function for DPO optimization; w, y l ) is the expectation operator; π θ (y w |x) represents the response y generated by the current optimization strategy model under input x. w The conditional probability of π; θ (y l |x) represents the response y generated by the current optimization strategy model under input x. l The conditional probability of π; ref (y w |x) represents the response y generated by the current reference policy model under input x. w The conditional probability of π; ref (y l |x) represents the response y generated by the current reference policy model under input x. l The conditional probability of π; θ y is the current optimization policy model to be optimized; πref is the pre-trained reference policy model; x is the input data; y is the input data. w It is the preferred response, in the preference pair (y) w ,y l The result marked as superior in ) ; y l It is a suboptimal response, in the preference pair (y) w ,y l The generated results are marked as poor in the model; β is the temperature coefficient, representing the degree to which the control model deviates from the reference model; D is the training data distribution, consisting of triples (x, y). w ,y l )constitute; It is the Sigmoid function.
3. The campus mental health testing method according to claim 2, characterized in that, The sample format required for DPO optimization is {query, chosen_response, rejected_response}.
4. The campus mental health testing method according to claim 3, characterized in that, The log-probability difference in the objective function is expressed by the following formula: , Where, π θ (y|x) is the conditional probability that the current optimization strategy model generates the response y under the input x; π ref (y|x) is the conditional probability that the current reference policy model generates the response y given input x; P θ (y t |x,y <t ) represents the probability that the current optimization model generates the t-th token; P ref (y t |x,y <t ) represents the probability that the current reference model generates the t-th token; k represents the k-th step of a response; S k This represents the set of tokens for the k-th step across all response positions; y t This represents the t-th generated token, where t is a positive integer; y <t This represents the sequence of tokens generated up to t-1. α k This represents the weight parameter, which is the reward value for chosen samples and the penalty value for rejected samples.
5. The campus mental health testing method according to claim 1 or 4, characterized in that, During the cold start phase, data synthesized using a high-performance large model was used as samples and then manually reviewed to optimize the mental health detection model.
6. The campus mental health testing method according to claim 5, characterized in that, The manual review includes: The reviewers conducted a correctness check on the samples synthesized from the high-performance large model; Samples that pass the test are saved to the sample library.
7. The campus mental health testing method according to claim 6, characterized in that, If the rejection rate of the response from the large-scale mental health testing model exceeds the first threshold, or if the set optimization period is reached, the large-scale mental health testing model will be optimized.
8. The campus mental health testing method according to claim 7, characterized in that, Once the set optimization period is reached, the large-scale mental health testing model is optimized using accumulated historical data.
9. An intelligent electronic device, the intelligent electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs that can be executed by one or more processors to implement the method as described in any one of claims 1 to 8.