Psychological counseling robot system based on WeChat platform
By developing a psychological counseling robot system on the WeChat platform, providing psychological counseling services using large language models and psychology knowledge bases, and ensuring data security through encryption technology, solving existing application convenience and data security challenges, achieving efficient and secure psychological counseling services.
Patent Information
- Application Number
- CN202510266206.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-24
AI Technical Summary
Existing psychological counseling applications based on chatbots have challenges in convenience and data security. Users need to download additional applications or visit specific websites, and privacy protection and data security are difficult to ensure.
The psychological counseling robot system is developed based on the WeChat platform, psychological counseling services are provided through WeChat official accounts or mini programs, natural language processing is used to use large language models, psychological analysis and intervention suggestions are provided in combination with the psychological knowledge base, and data security is ensured through encryption technology.
It enables users to obtain psychological counseling services without downloading additional applications, ensures the security and privacy of user data, provides high-quality psychological counseling services through large language models and psychology knowledge bases, and continuously optimizes the quality and functions of the robot's answers through user feedback.
Smart Images

Figure CN120199428A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and specifically to a psychological counseling robot system based on the WeChat platform. Background Art
[0002] There are already some psychological counseling applications based on chatbots on the market, but most of them are independent APPs or web services. Although these applications can provide certain psychological counseling services, they are not convenient to use because users need to download additional applications or access specific websites.
[0003] In addition, there are also certain challenges in terms of privacy protection and data security for these applications.
[0004] In summary, it is necessary to propose a psychological counseling robot system based on the WeChat platform to solve the above problems. Summary of the Invention
[0005] The purpose of the present invention is to provide a psychological counseling robot system based on the WeChat platform to solve the problems raised in the above background art.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] A psychological counseling robot system based on the WeChat platform includes a front-end architecture, a back-end architecture, and an operating system:
[0008] The front-end architecture includes a WeChat port and a user interaction interface. The WeChat port is used to enable users to interact with the system through the WeChat official account or WeChat mini-program, and is also used to receive the text and voice input of users and send requests to the back-end architecture. The user interaction interface provides an interface for users to communicate with the robot, and supports text input, voice input, and psychological test functions;
[0009] The back-end architecture includes third-party software, a large language model, a data encryption unit, a psychological analysis unit, and a user feedback module. The third-party software is used to connect the WeChat port and the large language model, process user requests, and call the API of the large language model. The large language model is based on natural language processing technology and is used to understand user input and generate natural language responses. The data encryption module provides encrypted processing of user data during transmission and storage through encryption technology. The psychological analysis module combines a psychology knowledge base to perform psychological analysis on user input and provide targeted psychological intervention suggestions. The feedback optimization module collects user satisfaction with the robot's answers through a user feedback mechanism and continuously optimizes the answer quality and functions of the robot.
[0010] Preferably, the operating system further includes a WeChat port access module, which consists of a WeChat official account or a WeChat mini-program interface, a user input processing module, and a request forwarding module, and is used to send user requests to third-party software for user-system interaction, receive user input, and return the robot's response.
[0011] Preferably, the operating system further includes a third-party software module, which is used to connect the WeChat port and the large language model, process user requests, and call the API of the large language model. The third-party software module also includes:
[0012] A request receiving module, which is used to receive user requests from the WeChat port;
[0013] An API calling module, which is used to call the API of the large language model for natural language processing;
[0014] A result returning module, which is used to return the processing result of the large language model to the WeChat port.
[0015] Preferably, the operating system further includes a large language model module, which understands user input and generates natural language responses based on natural language processing technology. The large language model module also includes:
[0016] A natural language understanding module, which is used to parse the semantics of user input;
[0017] A natural language generation module, which is used to generate natural language responses;
[0018] A psychology knowledge base, which is used to provide psychological analysis and intervention suggestions.
[0019] Preferably, the operating system further includes a data encryption module, which is used to encrypt user data during transmission and storage. The data encryption module also includes:
[0020] A data transmission encryption module, which protects data transmission through SSL / TLS encryption technology;
[0021] A data storage encryption module, which protects data storage through AES encryption technology.
[0022] Preferably, the operating system further includes a psychological analysis module, which is used to combine the psychology knowledge base to conduct psychological analysis on user input and provide targeted psychological intervention suggestions. The psychological analysis module also includes:
[0023] A psychological analysis algorithm for analyzing the psychological state input by the user;
[0024] An intervention suggestion generation module for generating psychological intervention suggestions based on the analysis results.
[0025] Preferably, the operating system further includes a feedback optimization module. The feedback optimization module collects the user's satisfaction with the robot's answers through a user feedback mechanism and continuously optimizes the answer quality and functions of the robot. The feedback optimization module further includes:
[0026] A feedback collection module for collecting the user's satisfaction score with the robot's answers;
[0027] An optimization module for optimizing the answer quality and functions of the robot according to the user feedback.
[0028] Based on the above system, the present invention also proposes a psychological counseling method based on the WeChat platform, including the following steps:
[0029] S1. The user opens the WeChat official account or WeChat mini-program, enters a psychological counseling question or selects a psychological test;
[0030] S2. The WeChat port receives the user input and forwards the request to a third-party software;
[0031] S3. The third-party software receives the user request and calls the API of the large language model for natural language processing;
[0032] S4. The large language model generates a natural language reply according to the user input and returns the result to the third-party software;
[0033] S5. The third-party software returns the reply of the large language model to the WeChat port;
[0034] S6. The WeChat port returns the robot's reply to the user, and the user views the reply on the WeChat interface;
[0035] S7. The user selects to conduct a psychological test or further consultation, and the system provides corresponding psychological analysis and intervention suggestions according to the user input;
[0036] S8. The system collects the user's satisfaction score with the robot's answers and optimizes the answer quality and functions of the robot according to the feedback.
[0037] Compared with the prior art, the beneficial effects of the present invention are as follows: Users of the present invention do not need to download additional applications and can directly obtain psychological counseling services through WeChat. Encryption technology is used to ensure the security and privacy of user data. The natural language processing ability of the large language model is utilized to achieve natural conversations with users. Combining with the psychological knowledge base, in-depth psychological analysis and intervention functions are provided. Through the user feedback mechanism, the quality and functions of the robot's answers are continuously optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Fig. shows the topology diagram of the psychological counseling robot system based on the WeChat platform of the present invention;
[0039] Figure 2 Fig. shows the flowchart of the psychological counseling method based on the WeChat platform of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0041] Embodiment
[0042] Please refer to Figure 1 , the present invention provides a psychological counseling robot system based on the WeChat platform, including a front-end architecture, a back-end architecture, and an operating system:
[0043] Among them, it should be noted that the front-end architecture includes a WeChat port and a user interaction interface. The WeChat port is used to enable users to interact with the system through the WeChat official account or WeChat mini-program. The WeChat port is also used to receive the text and voice inputs of users and send requests to the back-end architecture. The user interaction interface provides an interface for users to communicate with the robot and supports text input, voice input, and psychological test functions;
[0044] Among them, it should be noted that the backend architecture includes third-party software, a large language model, a data encryption unit, a psychological analysis unit, and a user feedback module. The third-party software is used to connect the WeChat port and the large language model, process user requests, and call the API of the large language model. The large language model is based on natural language processing technology and is used to understand user input and generate natural language responses. The data encryption module uses encryption technology to provide encrypted processing of user data during transmission and storage. The psychological analysis module combines a psychology knowledge base to perform psychological analysis on user input and provide targeted psychological intervention suggestions. The feedback optimization module uses the user feedback mechanism to collect user satisfaction with the robot's answers and continuously optimize the answer quality and functions of the robot.
[0045] In this embodiment, it should also be noted that the operating system further includes a WeChat port access module, which is composed of a WeChat official account or WeChat mini-program interface, a user input processing module, and a request forwarding module. It is used to send user requests to the third-party software for user-system interaction, receive user input, and return the robot's response.
[0046] In this embodiment, it should also be noted that the operating system further includes a third-party software module, which is used to connect the WeChat port and the large language model, process user requests, and call the API of the large language model. The third-party software module further includes:
[0047] A request receiving module, which is used to receive user requests from the WeChat port;
[0048] An API calling module, which is used to call the API of the large language model for natural language processing;
[0049] A result returning module, which is used to return the processing result of the large language model to the WeChat port.
[0050] In this embodiment, it should also be noted that the operating system further includes a large language model module, which understands user input and generates natural language responses based on natural language processing technology. The large language model module further includes:
[0051] A natural language understanding module, which is used to parse the semantics of user input;
[0052] A natural language generation module, which is used to generate natural language responses;
[0053] A psychology knowledge base, which is used to provide psychological analysis and intervention suggestions.
[0054] In this embodiment, it should also be noted that the operating system further includes a data encryption module, which is used for encrypting user data during transmission and storage. The data encryption module further includes:
[0055] A data transmission encryption module, which protects data transmission through SSL / TLS encryption technology;
[0056] A data storage encryption module, which protects data storage through AES encryption technology.
[0057] In this embodiment, it should also be noted that the operating system further includes a psychological analysis module, which is used to combine a psychology knowledge base to perform psychological analysis on user input and provide targeted psychological intervention suggestions. The psychological analysis module further includes:
[0058] A psychological analysis algorithm, which is used to analyze the psychological state of user input;
[0059] An intervention suggestion generation module, which is used to generate psychological intervention suggestions based on the analysis results.
[0060] In this embodiment, it should also be noted that the operating system further includes a feedback optimization module, which collects users' satisfaction with the robot's answers through a user feedback mechanism and continuously optimizes the answer quality and functions of the robot. The feedback optimization module further includes:
[0061] A feedback collection module, which is used to collect users' satisfaction scores with the robot's answers;
[0062] An optimization module, which is used to optimize the answer quality and functions of the robot according to user feedback.
[0063] Embodiment 2
[0064] Please refer to Figure 2 , in practical applications, based on the above-mentioned psychological counseling method of the system, specifically, it includes the following steps:
[0065] S1. The user opens the WeChat official account or WeChat mini-program, enters a psychological counseling question or selects a psychological test;
[0066] S2. The WeChat port receives the user input and forwards the request to a third-party software;
[0067] S3. The third-party software receives the user request and calls the API of the large language model for natural language processing;
[0068] S4. The large language model generates a natural language reply according to the user input and returns the result to the third-party software;
[0069] S5. The third-party software returns the response of the large language model to the WeChat port;
[0070] S6. The WeChat port returns the response of the robot to the user, and the user views the response in the WeChat interface;
[0071] S7. The user selects to conduct a psychological test or further consultation, and the system provides corresponding psychological analysis and intervention suggestions according to the user input;
[0072] S8. The system collects the user's satisfaction score for the robot's answer and optimizes the answer quality and function of the robot according to the feedback.
[0073] In this embodiment, the example code for connecting the WeChat official account to the psychological counseling robot system of the present invention is as follows:
[0074]
[0075]
[0076]
[0077]
[0078] Among them, it should be noted in the example code:
[0079] Flask application initialization: Create a Web service using the Flask framework to handle requests from WeChat;
[0080] WeChat interface configuration: WECHAT_TOKEN, WECHAT_APP_ID, and WECHAT_APP_SECRET are the configuration information of the WeChat official account, used to verify and receive WeChat messages;
[0081] Large language model interface configuration: LLM_API_URL and LLM_API_KEY are the API address and key of the large language model, used to call the large language model to generate responses;
[0082] WeChat message handling route: The / wechat route is used to receive POST requests sent by WeChat, parse the messages, and call the large language model to generate responses;
[0083] Message parsing: The parse_wechat_message function is used to parse the XML-format messages sent by WeChat, and extract the message type, sender, receiver, and content;
[0084] Text message handling: The handle_text_message function calls the large language model API to generate a response to the user input content;
[0085] Constructing the reply message: The reply_wechat_message function constructs the XML format of the WeChat reply message and returns it to the WeChat user.
[0086] Starting the application: The application runs on 0.0.0.0:80 and listens for requests from WeChat.
[0087] It should also be noted that the code running process is as follows:
[0088] (1) The user sends a message through the WeChat official account.
[0089] (2) The WeChat server forwards the message to the / wechat route.
[0090] (3) The application parses the message and calls the large language model to generate a reply.
[0091] (4) The application returns the reply message to the WeChat server, which is finally sent to the user.
[0092] In summary, through the above steps, users of the present invention can obtain psychological counseling services directly through WeChat without downloading additional applications. Encryption technology is used to ensure the security and privacy of user data. The natural language processing ability of the large language model is utilized to achieve natural conversations with users. Combining with the psychological knowledge base, in-depth psychological analysis and intervention functions are provided. Through the user feedback mechanism, the quality and functions of the robot's answers are continuously optimized.
[0093] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A psychological counseling robot system based on the WeChat platform, including a front-end architecture, a back-end architecture and an operating system, characterized by: The front-end architecture includes a WeChat port and a user interaction interface. The WeChat port is used to enable users to interact with the system through WeChat public accounts or WeChat applets. The WeChat port is also used to receive text and voice input from users and send requests to the back-end architecture. The user interaction interface provides an interface for users to communicate with the robot and is used to support text input, voice input, and psychological testing functions. The backend architecture includes third-party software, a large language model, a data encryption unit, a psychological analysis unit and a user feedback module. The third-party software is used to connect the WeChat port and the large language model, process user requests and call the API of the large language model. The large language model is based on natural language processing technology and is used to understand user input and generate natural language replies. The data encryption module uses encryption technology to provide encryption processing of user data during transmission and storage. The psychological analysis module is combined with a psychology knowledge base to perform psychological analysis on user input and provide targeted psychological intervention suggestions. The feedback optimization module uses a user feedback mechanism to collect user satisfaction with the robot's answers and continuously optimize the robot's answer quality and function.
2. The WeChat platform-based psychological counseling robot system according to claim 1, characterized in that: The operating system also includes a WeChat port access module, which is composed of a WeChat public account or WeChat applet interface, a user input processing module and a request forwarding module, and is used to send user requests to third-party software for user interaction with the system, receive user input and return the robot's reply.
3. The psychological consultation robot system based on WeChat platform according to claim 2 is characterized in that: The operating system also includes a third-party software module, which is used to connect the WeChat port and the large language model, process user requests and call the API of the large language model, and the third-party software module also includes: A request receiving module, the request receiving module is used to receive a user request from a WeChat port; An API calling module, wherein the API calling module is used to call the API of a large language model to perform natural language processing; The result returning module is used to return the processing result of the large language model to the WeChat port.
4. The WeChat platform-based psychological counseling robot system according to claim 3 is characterized in that: The operating system further includes a large language model module, which understands user input and generates natural language responses based on natural language processing technology, and the large language model module further includes: A natural language understanding module, which is used to analyze the semantics of user input; A natural language generation module, wherein the natural language generation module is used to generate a natural language response; A psychology knowledge base is used to provide psychological analysis and intervention suggestions.
5. The WeChat platform-based psychological counseling robot system according to claim 4 is characterized in that: The operating system further includes a data encryption module, which is used for encrypting user data during transmission and storage. The data encryption module also includes: A data transmission encryption module, which protects data transmission through SSL / TLS encryption technology; A data storage encryption module protects data storage by using AES encryption technology.
6. The WeChat platform-based psychological consultation robot system according to claim 5, characterized in that: The operating system further includes a psychological analysis module, which is used to combine the psychology knowledge base to perform psychological analysis on user input and provide targeted psychological intervention suggestions. The psychological analysis module also includes: A psychological analysis algorithm, wherein the psychological analysis algorithm is used to analyze the psychological state of the user input; The intervention suggestion generation module is used to generate psychological intervention suggestions according to the analysis results.
7. The WeChat platform-based psychological consultation robot system according to claim 6 is characterized in that: The operation system further includes a feedback optimization module, which collects user satisfaction with the robot's answers through a user feedback mechanism and continuously optimizes the robot's answer quality and function. The feedback optimization module also includes: A feedback collection module, which is used to collect user satisfaction scores for the robot's answers; An optimization module, wherein the optimization module is used to optimize the robot's answer quality and function according to user feedback.
8. A psychological consultation method based on the WeChat platform, according to any one of claims 1-7, characterized in that: The following steps are involved: S1. The user opens the WeChat official account or WeChat mini program and enters a psychological counseling question or selects a psychological test; S2. The WeChat port receives user input and forwards the request to the third-party software; S3. The third-party software receives the user request and calls the API of the large language model to perform natural language processing; S4. The large language model generates a natural language response based on the user input and returns the result to the third-party software; S5. The third-party software returns the reply of the large language model to the WeChat port; S6. The WeChat endpoint returns the robot's reply to the user, and the user views the reply on the WeChat interface; S7. The user chooses to undergo psychological testing or further consultation, and the system provides corresponding psychological analysis and intervention suggestions based on the user input; S8. The system collects user satisfaction ratings on the robot’s answers and optimizes the robot’s answer quality and functionality based on the feedback.