Campus spoofing prevention and control management method, device, system and equipment and storage medium
By using preset inference paths and few-sample thinking chain technology to decompose questions, the problem of lack of professionalism and logical reasoning in the field of preventing campus bullying in the existing technology is solved, and the situation without relying on external knowledge base is realized. Provide professional Q&A services and psychological counseling, which improves the credibility and practicality of the model.
Patent Information
- Application Number
- CN202411022564.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-15
AI Technical Summary
Existing large models perform poorly in the field of preventing campus bullying, lack professionalism and logical reasoning capabilities, and relying on external knowledge bases leads to low deployment difficulty and practicality.
Using preset inference paths to decompose questions, generate sub-questions through the few-sample thinking chain technology, answer gradually and count the answers, and use self-consistent scoring to determine the final answers, so as to provide professional Q&A services and psychology without relying on external knowledge bases. Tutoring.
It improves the logical processing and inference capabilities of the model, provides more logical and organized answers, and enhances its practicality and credibility in the actual environment.
Smart Images

Figure CN118964561A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of large model technology, and in particular to a campus bullying prevention and control management method, device, system, equipment and storage medium. Background Art
[0002] As a global social problem, school bullying is attracting widespread attention from experts and all walks of life around the world. School bullying prevention is a relatively professional field. It is difficult for ordinary large models to give professional and targeted answers. In addition, general school bullying prevention and control expert systems need to rely on external knowledge bases and retrieval enhancement generation technology.
[0003] Among the related technologies such as expert systems and question-answering robots, question-answering technologies based on large models can be simply divided into two categories. The first is pre-trained large model technology, which performs well in answering general questions, but due to the lack of a more professional knowledge base, it is difficult to ensure the accuracy of the answers in some professional fields, so its performance in areas such as preventing school bullying is average. The other is intelligent dialogue technology based on local knowledge bases, which mostly rely on retrieval enhancement generation. The effect in a single round of question and answer is relatively good, but it is unable to combine actual scenarios for logical reasoning and analysis to provide the most appropriate answers for students and teachers. Moreover, it must rely on local knowledge bases, which requires a lot of time to collect and manage knowledge base content, which increases the difficulty of deployment and practicality. Therefore, it is urgent to develop a school bullying prevention and control management method that can provide professional question-answering services and psychological counseling without relying on external knowledge bases, as well as provide effective advice to teachers and learning managers. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related technologies, the present application provides a school bullying prevention and control management method, device, system, equipment and storage medium, which can provide professional question-and-answer services and psychological counseling without relying on an external knowledge base, improve the model's logical processing and inference capabilities, and can better understand complex problems and provide answers, thereby improving the credibility of the model. By giving more logical results, it provides a certain degree of explainability, allowing users to know how the answer is obtained, thereby enhancing its practicality in actual life and production environments.
[0005] The first aspect of the present application provides a campus bullying prevention and control management method, comprising:
[0006] Get answers to questions about school bullying;
[0007] The campus bullying prevention and control model uses different preset reasoning paths to decompose the questions about campus bullying, and generates several sub-questions for each of the preset reasoning paths;
[0008] In each of the preset reasoning paths, the sub-questions are used in turn to ask questions to the campus bullying prevention and control model;
[0009] Generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each of the preset reasoning paths are obtained;
[0010] The thinking answers of each of the preset reasoning paths are counted, the thinking answers of each of the preset reasoning paths are scored, and the thinking answer with the highest score is determined as the final answer.
[0011] Preferably, the steps before obtaining questions about school bullying include:
[0012] Based on examples of questions about school bullying, the initial large model uses the few-sample thinking chain technology for learning to obtain a school bullying prevention and control model.
[0013] Preferably, the step of learning the initial large model using a small sample thinking chain technology based on the example of questions about school bullying includes:
[0014] Get the sample questions about school bullying described above;
[0015] The initial large model decomposes the example of question about school bullying to generate several sub-question examples;
[0016] Using the sub-question examples in sequence, ask questions to the initial large model;
[0017] The answer to the current sub-question example is generated based on the answer to the previous sub-question example, until all sub-question examples are completed and a thinking answer example is obtained.
[0018] Preferably, the step of generating the current sub-question based on the answer to the previous sub-question until all sub-questions are completed and the thinking answers of each of the preset reasoning paths are obtained includes:
[0019] For a preset reasoning path, the campus bullying prevention and control model solves the first sub-question and generates an answer corresponding to the first sub-question;
[0020] Starting from the second sub-question, questions are asked to the campus bullying prevention and control model based on the answer to the previous sub-question and the current sub-question to generate the answer to the current sub-question until all sub-questions are completed and the thinking answer to the preset reasoning path is obtained.
[0021] Preferably, the thinking answer contains keywords, and the steps of counting the thinking answers of each of the preset reasoning paths, scoring the thinking answers of each of the preset reasoning paths, and determining the thinking answer with the highest score as the final answer include:
[0022] Counting the frequency of occurrence of keywords in the thinking answers of each of the preset reasoning paths; wherein the keywords correspond to the processing suggestions;
[0023] Scoring the thinking answers of each of the preset reasoning paths based on the frequency of the keywords;
[0024] The thinking answer corresponding to the keyword with the highest score is determined as the final answer; wherein the final answer includes the processing suggestion corresponding to the keyword with the highest score.
[0025] Preferably, the preset reasoning path is generated by the school bullying prevention and control model based on the questions about school bullying.
[0026] The second aspect of the present application provides a school bullying prevention and control management device, comprising:
[0027] The acquisition module is used to obtain questions about school bullying;
[0028] A decomposition module, used in the campus bullying prevention and control model to decompose the questions about campus bullying using different preset reasoning paths, and generate a number of sub-questions for each of the preset reasoning paths;
[0029] A questioning module, used to sequentially use the sub-questions in each of the preset reasoning paths to ask questions to the campus bullying prevention and control model;
[0030] An answer module is used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained;
[0031] The scoring module is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
[0032] A third aspect of the present application provides a school bullying prevention and control management system, including a client and a server connected in communication; the client includes:
[0033] An input module, used for users to input questions about school bullying;
[0034] The server includes:
[0035] An acquisition module, used to acquire the questions regarding school bullying;
[0036] A decomposition module, used in the campus bullying prevention and control model to decompose the questions about campus bullying using different preset reasoning paths, and generate a number of sub-questions for each of the preset reasoning paths;
[0037] A questioning module, used to sequentially use the sub-questions in each of the preset reasoning paths to ask questions to the campus bullying prevention and control model;
[0038] An answer module is used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained;
[0039] The scoring module is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
[0040] A fourth aspect of the present application provides an electronic device, including:
[0041] Processor; and
[0042] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0043] A fifth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0044] The technical solution provided by the present application may include the following beneficial effects: by obtaining questions about school bullying, the school bullying prevention and control model uses different preset reasoning paths to decompose the questions about school bullying, and generates several sub-questions for each preset reasoning path. In each preset reasoning path, the sub-questions are used in turn to ask questions to the school bullying prevention and control model, and the answer to the current sub-question is generated based on the answer to the previous sub-question until all sub-questions are completed. The thinking answers of each preset reasoning path are obtained, the thinking answers of each preset reasoning path are counted, and the thinking answers of each preset reasoning path are scored, and the thinking answer with the highest score is determined as the final answer. It can provide professional question-and-answer services and psychological counseling without relying on an external knowledge base, improve the model's logical processing and inference capabilities, better understand complex problems and provide answers, improve the credibility of the model, and provide a certain degree of explainability by giving more logical results, so that users can know how the answers are obtained, thereby enhancing its practicality in actual life environments.
[0045] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail the exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0047] Figure 1 It is a flow chart of a campus bullying prevention and control management method shown in an embodiment of the present application;
[0048] Figure 2 It is another flow chart of the campus bullying prevention and control management method shown in the embodiment of the present application;
[0049] Figure 3 is a schematic diagram of a few-sample thinking chain method shown in an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of the thinking process of the campus bullying prevention and control model shown in the embodiment of the present application;
[0051] Figure 5 It is a structural schematic diagram of a campus bullying prevention and control management device shown in an embodiment of the present application;
[0052] Figure 6 It is a structural diagram of a campus bullying prevention and control management system shown in an embodiment of the present application;
[0053] Figure 7 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0055] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0056] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0057] Among the related technologies such as expert systems and question-answering robots, question-answering technologies based on large models can be simply divided into two categories. The first is pre-trained large model technology, which performs well in answering general questions, but due to the lack of a more professional knowledge base, it is difficult to ensure the accuracy of the answers in certain professional fields, so its performance in areas such as preventing school bullying is average. The other is intelligent dialogue technology based on local knowledge bases, which mostly rely on retrieval enhancement generation. The effect in a single round of question and answer is relatively good, but it is unable to combine actual scenarios for logical reasoning and analysis to provide the most appropriate answers for students and teachers. Moreover, it must rely on local knowledge bases, which requires a lot of time to collect and manage knowledge base content, which increases the difficulty and practicality of deployment. Therefore, there is an urgent need to develop a school bullying prevention and control management method that can provide professional question-answering services and psychological counseling without relying on external knowledge bases, as well as provide effective advice to teachers and learning managers.
[0058] In response to the above problems, the embodiments of the present application provide a school bullying prevention and control management method, which can provide professional question-and-answer services and psychological counseling without relying on an external knowledge base, improve the model's logical processing and inference capabilities, better understand complex problems and provide answers, improve the credibility of the model, and provide a certain degree of explainability by giving more logical results, allowing users to know how the answer is obtained, thereby enhancing its practicality in actual life and production environments.
[0059] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0060] Figure 1 It is a flow chart of a campus bullying prevention and control management method shown in an embodiment of the present application.
[0061] See also Figure 1 , the method comprising:
[0062] Step 101, obtaining questions regarding school bullying;
[0063] Campus bullying is an aggressive behavior that occurs inside and outside the campus, with students as the main participants. The high-incidence areas of campus bullying are usually relatively hidden places such as toilets and dormitories, and bullies usually threaten victims not to inform their parents and teachers. Therefore, most bullying behaviors are difficult to be discovered through human patrols, which makes the handling of bullying incidents and psychological counseling measures for victims have problems such as delayed response, low efficiency and insufficient professionalism. At the same time, although educational institutions, governments, and companies have introduced AI (Artificial Intelligence) and speech recognition and other technologies to identify and warn campus bullying behaviors, bullying behaviors are difficult to eradicate, largely because students do not understand the relevant knowledge and importance in this regard, or lack certain psychological counseling. Anti-campus bullying is a relatively professional field, and ordinary large models are difficult to make professional and targeted answers, and general campus bullying prevention and control expert systems need to rely on external knowledge bases and retrieval enhancement generation technologies. Therefore, the embodiment of the present application provides a campus bullying prevention and control management method, and users can raise questions about campus bullying on the interactive interface to obtain questions about campus bullying, wherein users can be teachers, parents, students, etc.
[0064] Step 102, the campus bullying prevention and control model uses different preset reasoning paths to decompose questions about campus bullying, and generates a number of sub-questions for each preset reasoning path;
[0065] Chain-of-thought (CoT) is an improved prompting strategy used to improve the performance of LLM (Large Language Model) in complex reasoning tasks, such as arithmetic reasoning, common sense reasoning, and symbolic reasoning. By applying the chain-of-thought technology to LLM and guiding it with different prompting projects, the large model's answering ability and logical reasoning ability in the question-and-answer session in the field of anti-school bullying can be enhanced, such as making the most reasonable answer by receiving relevant scenarios or answering questions that require logical reasoning. Self-consistency can select the most consistent answer from the results generated by multiple different reasoning paths, which helps to improve the performance of CoT prompts in tasks involving arithmetic and common sense reasoning.
[0066] The large model integrated in the embodiment of the present application includes a local model and an online model, wherein the local model may be ChatGLM2-6B, and the online model may be OpenAI-api and Qwen-api (Tongyi Qianwen), Llama-7B, and the user may switch different types of models as a school bullying prevention and control model. The above model types are only used as examples, and the embodiments of the present application do not limit this.
[0067] In one example, the campus bullying prevention and control model of the embodiment of the present application can use different preset reasoning paths in the process of processing questions about campus bullying. In a preset reasoning path, the campus bullying prevention and control model decomposes questions about campus bullying, and after decomposition, several sub-questions can be generated. In one example, if the user enters the original question: How can parents judge whether their children are bullied in school? The original question can be decomposed into two sub-questions: What are the characteristics of campus bullying, and the possible impact on children after campus bullying has the following characteristics.
[0068] Step 103, in each preset reasoning path, use sub-questions to ask questions to the campus bullying prevention and control model in sequence;
[0069] In each preset reasoning path, sub-questions are used to ask questions to the campus bullying prevention and control model in turn. The campus bullying prevention and control model thinks step by step according to the sub-questions, which enhances its logical reasoning ability.
[0070] Step 104, generating an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained;
[0071] LtM (Least to Most prompting) refers to a strategy of dividing a problem into several problems after it is raised, and then solving these small problems one by one. First, the problem to be solved is broken down into a series of sub-problems. There are logical connections and progressive relationships between the sub-problems. Secondly, these sub-problems are solved one by one. When solving the next sub-problem, the solution to the previous sub-problem will be input as a prompt. There are logical connections and progressive relationships between the sub-problems.
[0072] The campus bullying prevention and control model of the embodiment of the present application adopts LtM technology. In each preset reasoning path, the campus bullying prevention and control model answers the previous sub-question. After obtaining the answer to the previous sub-question, the answer to the current sub-question can be generated based on the answer to the previous sub-question until all sub-questions are completed, thereby obtaining the thinking answers to each preset reasoning path.
[0073] Step 105 , counting the thinking answers of each preset reasoning path, scoring the thinking answers of each preset reasoning path, and determining the thinking answer with the highest score as the final answer.
[0074] After obtaining the thinking answers of each preset reasoning path, the thinking answers of each preset reasoning path can be counted and scored, and the thinking answer with the highest score is determined as the final answer to the question about school bullying, and returned to the user on the interactive interface.
[0075] The embodiment of the present application discloses a campus bullying prevention and control management method. By obtaining questions about campus bullying, the campus bullying prevention and control model uses different preset reasoning paths to decompose the questions about campus bullying, and generates several sub-questions for each preset reasoning path. In each preset reasoning path, the sub-questions are used in turn to ask questions to the campus bullying prevention and control model, and the answer to the current sub-question is generated based on the answer to the previous sub-question until all sub-questions are completed. The thinking answers of each preset reasoning path are obtained, the thinking answers of each preset reasoning path are counted, and the thinking answers of each preset reasoning path are scored. The thinking answer with the highest score is determined as the final answer. Professional question-and-answer services and psychological counseling can be provided without relying on an external knowledge base, the model's logical processing and inference capabilities are improved, and complex problems can be better understood and answered, which improves the credibility of the model. By giving more logical results, a certain degree of explainability is provided, so that users can know how the answers are obtained, thereby enhancing its practicality in actual life environments.
[0076] Figure 2 It is another flow chart of a campus bullying prevention and control management method shown in an embodiment of the present application.
[0077] See also Figure 2 , the method comprising:
[0078] Step 201, obtaining questions regarding school bullying;
[0079] Users can ask questions about school bullying on the interactive interface, and thus obtain questions about school bullying. Users can be teachers, parents, students, etc. In one example, to determine whether Zhang San's behavior is school bullying, the question "Zhang San often speaks ill of Li Si in class. Does this behavior constitute school bullying?" can be obtained.
[0080] In an optional embodiment of the present application, before step 201, the following steps are included:
[0081] Step S1, based on the example of questions about school bullying, the initial large model uses the few-sample thinking chain technology to learn and obtain the school bullying prevention and control model.
[0082] The campus bullying prevention and control model can use Zero-shot-CoT (zero-sample thinking chain) technology and Few-shot-CoT (few-shot thinking chain) technology to enable the campus bullying prevention and control model to reason step by step in the thinking process. When only using the zero-shot thinking chain technology, the large model needs less time to process the prompt words, and the feedback to the user is faster and more efficient, but at the same time the quality of the generated answers will be relatively low. After using the few-shot thinking chain technology, the large model will learn the thinking process and logic of solving problems based on pre-written examples or examples manually written by the user, thereby improving the logical reasoning ability of the large model and generating higher quality answers. Users can decide which technology to use for reasoning.
[0083] In an embodiment of the present application, the user can choose to use the few-sample thinking chain technology to learn the initial large model. The user can choose to use pre-written question examples on campus bullying directly, or manually write question examples on campus bullying and input the question examples on campus bullying into the initial large model. The initial large model learns the thinking process and logic for solving the problem, thereby improving the logical reasoning ability of the large model, and the quality of the generated answers will be higher.
[0084] In an optional embodiment of the present application, step S1 includes:
[0085] Sub-step S11, obtaining examples of questions regarding school bullying;
[0086] like Figure 3 As shown in the figure, it is a schematic diagram of the few-sample thinking chain method. Taking Xiao Ming's behavior as an example, we first obtain the question example "Xiao Ming repeatedly deliberately drew on his classmate Xiao Fang's school uniform. Is it a campus bullying behavior?" After entering the question example, we enter the key prompt sentence "Please reason step by step and draw a conclusion" to prompt the initial large model to think step by step.
[0087] Sub-step S12, the initial large model decomposes the example of questions about school bullying to generate several sub-question examples;
[0088] The initial large model can decompose the question example according to the prompt. In one example, the question example can be decomposed into the first sub-question example "Qualify Xiao Ming's behavior" and the second sub-question example "Determine whether the behavior meets one of the definitions of school bullying."
[0089] Sub-step S13, using sub-question examples in sequence to ask questions to the initial large model;
[0090] The initial large model is asked questions using the first sub-question example "Qualify Xiao Ming's behavior" and the second sub-question example "Determine whether this behavior meets one of the definitions of school bullying behavior" in turn.
[0091] Sub-step S14, generating an answer to the current sub-question example based on the answer to the previous sub-question example, until all sub-question examples have completed the questioning and obtained a thinking answer example.
[0092] The initial large model first answers the first sub-question example "Qualify Xiao Ming's behavior", and the answer to the first sub-question example is "Repeatedly soiling the clothes of specific students", and then generates the answer to the second sub-question example "Determine whether the behavior meets one of the definitions of school bullying" based on the answer to the first sub-question example, thereby obtaining the thinking answer example "Xiao Ming's behavior constitutes school bullying."
[0093] Step 202: The campus bullying prevention and control model uses different preset reasoning paths to decompose questions about campus bullying, and generates a number of sub-questions for each preset reasoning path;
[0094] In one example, the campus bullying prevention and control model of the embodiment of the present application can adopt different preset reasoning paths in the process of processing questions about campus bullying. In a preset reasoning path, the campus bullying prevention and control model decomposes questions about campus bullying, and after the decomposition, several sub-questions can be generated. Taking whether Zhang San's behavior belongs to campus bullying as an example, the campus bullying prevention and control model can refer to the reasoning process of "whether Xiao Ming's behavior belongs to campus bullying", and decompose the question "Zhang San often says bad things about Li Si in class. Does this behavior belong to campus bullying?" to generate the first sub-question "Qualify Zhang San's behavior" and the second sub-question "Judge whether the behavior meets one of the definitions of campus bullying behavior." After obtaining the question, the key prompt sentence "Please reason step by step and draw a conclusion" will also be entered to prompt the campus bullying prevention and control model to think step by step according to the key prompt sentence.
[0095] Step 203, in each preset reasoning path, use sub-questions in turn to ask questions to the campus bullying prevention and control model;
[0096] In each preset reasoning path, sub-questions are used to ask questions to the campus bullying prevention and control model in turn. The campus bullying prevention and control model thinks step by step according to the sub-questions, which enhances its logical reasoning ability.
[0097] Step 204: for a preset reasoning path, the campus bullying prevention and control model solves the first sub-question and generates an answer corresponding to the first sub-question;
[0098] In the preset reasoning path of step 202, the campus bullying prevention and control model first answers the first sub-question "Qualification of Zhang San's behavior" and generates the answer corresponding to the first sub-question "Repeatedly ridiculing specific students".
[0099] Step 205, starting from the second sub-question, based on the answer corresponding to the previous sub-question and the current sub-question, questions are asked to the campus bullying prevention and control model to generate the answer corresponding to the current sub-question, until all sub-questions are completed and the thinking answer of the preset reasoning path is obtained.
[0100] Starting from the second sub-question, the answer to the previous sub-question is added as a hint to the current sub-question to ask the campus bullying prevention and control model, thereby generating the answer to the current sub-question, until all sub-questions are completed, and the answer to the last sub-question is used as the thinking answer of the preset reasoning path. In one example, the campus bullying prevention and control model answers the second sub-question based on the answer to the first sub-question "repeatedly ridiculing a specific student" and the second sub-question "determine whether the behavior meets one of the definitions of campus bullying behavior", and obtains the thinking answer "Zhang San's behavior belongs to campus bullying".
[0101] Step 206, counting the thinking answers of each preset reasoning path, scoring the thinking answers of each preset reasoning path, and determining the thinking answer with the highest score as the final answer.
[0102] After obtaining the thinking answers of each preset reasoning path, the thinking answers of each preset reasoning path can be counted and scored, and the thinking answer with the highest score is determined as the final answer to the question about school bullying, and returned to the user on the interactive interface. When calling prompt engineering technologies such as thinking chains to answer questions, the reasoning ability of the school bullying prevention and control model may generate different reasoning paths according to different questions, thereby obtaining different answers. Finally, the answer is optimized by using self-consistent voting technology to provide users with the answer that is most likely to be correct or closest to the user's question.
[0103] In an optional embodiment of the present application, the answer to the question contains keywords, and step 206 includes:
[0104] Sub-step S21, counting the frequency of occurrence of keywords in the thinking answers of each preset reasoning path; wherein the keywords correspond to the processing suggestions;
[0105] When the campus bullying prevention and control model gives a thinking answer, it can be output in the following format: 1. Keyword / key phrase 1, handling suggestion 1; 2. Keyword / key phrase 2, handling suggestion 2... Among them, the keywords and handling suggestions are generated by the campus bullying prevention and control model, and the keywords correspond to the handling suggestions. The frequency of each keyword in the thinking answer can be counted.
[0106] Sub-step S22, scoring the thinking answers of each preset reasoning path based on the frequency of the keywords;
[0107] The thinking answers of each preset reasoning path are scored according to the frequency of keywords. The higher the frequency, the higher the score.
[0108] Sub-step S23, determining the thinking answer corresponding to the keyword with the highest score as the final answer; wherein the final answer includes the processing suggestion corresponding to the keyword with the highest score.
[0109] The answer to the thought corresponding to the keyword with the highest score is determined as the final answer, and the final answer is output. The final answer includes the processing suggestions corresponding to the keyword with the highest score, which can provide users with efficient and reliable consulting services in the field of campus bullying prevention.
[0110] The reasoning process of the campus bullying prevention and control model can greatly improve the ability to perform logical reasoning and analysis based on relevant scenarios, thereby providing the most appropriate answers for teachers, parents and students, such as providing psychological counseling for bullied students or providing treatment suggestions for school administrators. It performs better in tasks that require logical analysis and integration, such as answering an overview of a campus anti-bullying incident or making more substantive suggestions through an actual campus bullying incident. By using the campus bullying prevention and control model to prevent and control campus bullying behavior, schools can improve management efficiency and service levels, while providing a platform for teachers, parents and students to seek help and support, which helps to create a harmonious and stable campus environment.
[0111] In an optional embodiment of the present application, a preset reasoning path is generated through a campus bullying prevention and control model based on questions regarding campus bullying.
[0112] After using the LtM prompt technology, the campus bullying prevention model can find the thinking chain to solve the problem by itself. The entire prompt process will be divided into two stages. The first stage is to decompose the question from top to bottom (Decompose Question into subquestion), and the second stage is to solve the problem sequentially from bottom to top (Sequentially Solve Subquestion). The whole process of answering questions sequentially can actually be regarded as the CoT (Chain-of-Thought, large model thinking chain) process, but LtM will require campus bullying prevention to generate a separate solution link for each different question, so that it can solve complex reasoning problems more accurately.
[0113] In an embodiment of the present application, the preset reasoning path is generated by the campus bullying prevention and control model based on questions about campus bullying. Different questions will result in different reasoning paths.
[0114] like Figure 4 The figure below is a schematic diagram of the thinking process of the school bullying prevention and control model, which includes:
[0115] Step 401, the user inputs the original question: How can parents determine whether their children are being bullied online?
[0116] Step 402, split the original question to determine whether there are sub-questions, if so, execute step 403, if not, execute step 406;
[0117] Step 403, splitting out the first sub-question: What are the characteristics of school bullying prevention?
[0118] Step 404, answer the first sub-question, and generate the answer to the first sub-question: characteristics of campus bullying prevention;
[0119] Step 405, splitting out the second sub-question: school bullying has the following characteristics and may have the following impact on children;
[0120] Step 406, answer the second sub-question and obtain the final answer;
[0121] Step 407, perform self-consistency scoring.
[0122] The campus bullying prevention and control model may have different reasoning processes and select the answer with the most generation times for output.
[0123] The embodiment of the present application discloses a campus bullying prevention and control management method. By obtaining questions about campus bullying, the campus bullying prevention and control model uses different preset reasoning paths to decompose the questions about campus bullying, and generates a number of sub-questions for each preset reasoning path. In each preset reasoning path, the sub-questions are used in turn to ask questions to the campus bullying prevention and control model. For a preset reasoning path, the campus bullying prevention and control model answers the first sub-question and generates an answer corresponding to the first sub-question. Starting from the second sub-question, the campus bullying prevention and control model is asked questions based on the answer corresponding to the previous sub-question and the current sub-question, and the answer corresponding to the current sub-question is generated. until all sub-questions are answered, and the thinking answers of the preset reasoning path are obtained, the thinking answers of each preset reasoning path are counted, and the thinking answers of each preset reasoning path are scored, and the thinking answer with the highest score is determined as the final answer. It can provide professional question-and-answer services and psychological counseling without relying on external knowledge bases, improve the model's logical processing and inference capabilities, better understand complex problems and provide answers, improve the credibility of the model, and provide a certain degree of explainability by giving more logical results, so that users can know how the answers are obtained, thereby enhancing its practicality in actual life and production environments.
[0124] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a campus bullying prevention and control management device, system, electronic device and corresponding embodiments.
[0125] Figure 5 It is a structural schematic diagram of a campus bullying prevention and control management device shown in an embodiment of the present application.
[0126] See also Figure 5 The campus bullying prevention and control management device 500 includes:
[0127] An acquisition module 501 is used to acquire questions about school bullying;
[0128] Decomposition module 502, used for the campus bullying prevention and control model to decompose questions about campus bullying using different preset reasoning paths to generate a number of sub-questions for each preset reasoning path;
[0129] A questioning module 503 is used to sequentially use sub-questions in each preset reasoning path to ask questions to the campus bullying prevention and control model;
[0130] Answer module 504, used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained;
[0131] The scoring module 505 is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
[0132] In an optional embodiment of the present application, the device further includes:
[0133] The learning module is used to learn based on examples of questions about school bullying. The initial large model adopts the few-sample thinking chain technology to obtain a school bullying prevention and control model.
[0134] In an optional embodiment of the present application, the learning module includes:
[0135] The question sample submodule is used to obtain examples of questions about school bullying;
[0136] The decomposition submodule is used for the initial large model to decompose the question examples about school bullying and generate several sub-question examples;
[0137] A questioning submodule, used to sequentially use sub-question examples to ask questions to the initial large model;
[0138] The answer example submodule is used to generate the answer to the current sub-question example based on the answer to the previous sub-question example, until all sub-question examples have completed the questioning and obtained the thinking answer example.
[0139] In an optional embodiment of the present application, the answer module 504 includes:
[0140] The first answer submodule is used for the campus bullying prevention and control model to answer the first sub-question for a preset reasoning path and generate an answer corresponding to the first sub-question;
[0141] The second answer submodule is used to ask questions to the campus bullying prevention and control model starting from the second sub-question, based on the answer to the previous sub-question and the current sub-question, and generate the answer to the current sub-question until all sub-questions are completed and the thinking answer of the preset reasoning path is obtained.
[0142] In an optional embodiment of the present application, the answer to the question contains keywords, and the scoring module 505 includes:
[0143] A statistical submodule is used to count the frequency of keywords in the thinking answers of each preset reasoning path; wherein the keywords correspond to the processing suggestions;
[0144] The scoring submodule is used to score the thinking answers of each preset reasoning path based on the frequency of keywords;
[0145] The output submodule is used to determine the thinking answer corresponding to the keyword with the highest score as the final answer; wherein the final answer includes the processing suggestion corresponding to the keyword with the highest score.
[0146] The embodiment of the present application discloses a school bullying prevention and control management device, which can provide professional question-and-answer services and psychological counseling without relying on an external knowledge base, improves the model's logical processing and inference capabilities, can better understand complex problems and provide answers, improves the credibility of the model, and provides a certain degree of explainability by giving more logical results, allowing users to know how the answers are obtained, thereby enhancing its practicality in actual life and production environments.
[0147] Figure 6 It is a structural schematic diagram of a school bullying prevention and control management system shown in an embodiment of the present application.
[0148] See also Figure 6 The system includes a client 600 and a campus bullying prevention and control management device 500 in communication connection; the client 601 includes:
[0149] Input module 601, used for users to input questions about school bullying;
[0150] The campus bullying prevention and control management device 500 includes:
[0151] An acquisition module 501 is used to acquire questions about school bullying;
[0152] Decomposition module 502, used for the campus bullying prevention and control model to decompose questions about campus bullying using different preset reasoning paths to generate a number of sub-questions for each preset reasoning path;
[0153] A questioning module 503 is used to sequentially use sub-questions in each preset reasoning path to ask questions to the campus bullying prevention and control model;
[0154] Answer module 504, used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained;
[0155] The scoring module 505 is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
[0156] The embodiment of the present application discloses a school bullying prevention and control management system, which can provide professional question-and-answer services and psychological counseling without relying on an external knowledge base, improves the model's logical processing and inference capabilities, can better understand complex problems and provide answers, improves the credibility of the model, and provides a certain degree of explainability by giving more logical results, allowing users to know how the answers are obtained, thereby enhancing its practicality in actual life and production environments.
[0157] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0158] Figure 7 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0159] See also Figure 7 , the electronic device 700 includes a memory 710 and a processor 720 .
[0160] The processor 720 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0161] The memory 710 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. Among them, ROM may store static data or instructions required by the processor 720 or other modules of the computer. The permanent storage may be a readable and writable storage device. The permanent storage may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 710 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 710 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0162] The memory 710 stores executable codes, and when the executable codes are processed by the processor 720 , the processor 720 can execute part or all of the methods described above.
[0163] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0164] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0165] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A campus bullying prevention and control management method, characterized in that: The method comprises: Get answers to questions about school bullying; The campus bullying prevention and control model uses different preset reasoning paths to decompose the questions about campus bullying, and generates several sub-questions for each of the preset reasoning paths; In each of the preset reasoning paths, the sub-questions are used in turn to ask questions to the campus bullying prevention and control model; Generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each of the preset reasoning paths are obtained; The thinking answers of each of the preset reasoning paths are counted, the thinking answers of each of the preset reasoning paths are scored, and the thinking answer with the highest score is determined as the final answer.
2. The campus bullying prevention and control management method according to claim 1, characterized in that: The steps before getting questions about school bullying include: Based on examples of questions about school bullying, the initial large model uses the few-sample thinking chain technology for learning to obtain a school bullying prevention and control model.
3. The campus bullying prevention and control management method according to claim 2, characterized in that: Based on the example of questions about school bullying, the steps of learning the initial large model using the few-sample thinking chain technology include: Get the sample questions about school bullying described above; The initial large model decomposes the example of question about school bullying to generate several sub-question examples; Using the sub-question examples in sequence, ask questions to the initial large model; The answer to the current sub-question example is generated based on the answer to the previous sub-question example, until all sub-question examples are completed and a thinking answer example is obtained.
4. The campus bullying prevention and control management method according to claim 1, characterized in that: The step of generating the current sub-question based on the answer to the previous sub-question until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained includes: For a preset reasoning path, the campus bullying prevention and control model solves the first sub-question and generates an answer corresponding to the first sub-question; Starting from the second sub-question, questions are asked to the campus bullying prevention and control model based on the answer to the previous sub-question and the current sub-question to generate the answer to the current sub-question until all sub-questions are completed and the thinking answer to the preset reasoning path is obtained.
5. The campus bullying prevention and control management method according to claim 1, characterized in that: The thinking answer has a keyword, the steps of counting the thinking answers of each preset reasoning path, scoring the thinking answers of each preset reasoning path, and determining the thinking answer with the highest score as the final answer include: Counting the frequency of occurrence of keywords in the thinking answers of each of the preset reasoning paths; wherein the keywords correspond to the processing suggestions; Scoring the thinking answers of each of the preset reasoning paths based on the frequency of the keywords; The thinking answer corresponding to the keyword with the highest score is determined as the final answer; wherein the final answer includes the processing suggestion corresponding to the keyword with the highest score.
6. The campus bullying prevention and control management method according to claim 1, characterized in that: The preset reasoning path is generated by the campus bullying prevention and control model based on the questions about campus bullying.
7. A campus bullying prevention and control management device, characterized in that: The device comprises: The acquisition module is used to obtain questions about school bullying; A decomposition module, used in the campus bullying prevention and control model to decompose the questions about campus bullying using different preset reasoning paths, and generate a number of sub-questions for each of the preset reasoning paths; A questioning module, used to sequentially use the sub-questions in each of the preset reasoning paths to ask questions to the campus bullying prevention and control model; An answer module is used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained; The scoring module is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
8. A campus bullying prevention and control management system, characterized in that: A client and a server are included in the communication connection; the client includes: An input module, used for users to input questions about school bullying; The server includes: An acquisition module, used to acquire the questions regarding school bullying; A decomposition module, used in the campus bullying prevention and control model to decompose the questions about campus bullying using different preset reasoning paths, and generate a number of sub-questions for each of the preset reasoning paths; A questioning module, used to sequentially use the sub-questions in each of the preset reasoning paths to ask questions to the campus bullying prevention and control model; An answer module is used to generate an answer to the current sub-question based on the answer to the previous sub-question, until all sub-questions are completed and the thinking answers of each preset reasoning path are obtained; The scoring module is used to count the thinking answers of each preset reasoning path, score the thinking answers of each preset reasoning path, and determine the thinking answer with the highest score as the final answer.
9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent question and answer system
CN106649258A
Answer acquisition method based on knowledge graph
CN114896377A
Method for improving questions and answers of context learning knowledge base based on thinking chain and visualization
CN117076653A
Problem reasoning method and device, electronic equipment and storage medium
CN117764177A
Intelligent question and answer method and device based on fusion type progressive reasoning network
CN118114768A
Cited By
Method for generating answer to question, electronic device and computer program product
CN119808962A
Method, electronic device, and computer program product for generating answers to questions
CN119808962B
Post-training method and device of question and answer large model, electronic equipment and storage medium
CN119808964A
Post-training method, device, electronic device and storage medium for question-and-answer large model
CN119808964B
Post-training method and apparatus for question-answering large model, and electronic device and storage medium
WO2026188649A1
