Consultation transaction processing method and device, equipment, storage medium and program product

By analyzing psychological counseling needs using a large language model and combining it with a resource management module and IoT control, candidate appointment schemes are generated. This solves the problems of low efficiency and poor interactive experience in existing mental health appointment services, and realizes efficient and automated psychological counseling services.

CN121034673APending Publication Date: 2025-11-28BEIJING LIXIN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511060695.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

The existing mental health appointment service has low processing efficiency, poor interactive experience, lack of planning ability in the user interface, disconnect between the scheduling logic of psychologists and independent spaces, asynchronous resource status, and lack of a unified intelligent scheduling center, resulting in poor real-time performance and coordination.

Method used

The system uses a large language model to perform structured parsing of psychological counseling needs texts, generates structured task instructions, combines the resource management module to query the time intersection of candidate counselors and independent space resources, generates candidate solutions according to preset strategy rules, and uses the Internet of Things integration and control module to achieve automated appointment and environment configuration.

Benefits of technology

It improves the efficiency of mental health appointment services, provides alternative options for users to choose from, enhances the user interaction experience, realizes unified resource management and automated service processes, and ensures service continuity and privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034673A_ABST
    Figure CN121034673A_ABST
Patent Text Reader

Abstract

The invention provides a consultation transaction processing method and device, equipment, a storage medium and a program product. In some embodiments of the invention, a psychological counseling demand text is obtained; inputting the psychological counseling demand text into a large language model for structured analysis to obtain a structured task instruction; querying a time intersection result of the candidate consultant and the candidate independent space resource satisfying the professional field and the service mode from a resource management module; wherein the resource management module is used for storing and managing state information of consultants and independent space resources; according to the time intersection result and a preset strategy rule, generating at least one candidate scheme for a user to select a target scheme from the at least one candidate scheme; according to the target scheme, executing consultation transaction processing operation; according to the method, the psychological health reservation service scheme is automatically generated, the processing efficiency is improved, the candidate schemes are provided for the user to select, and the user interaction experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, and in particular, to a counseling transaction processing method and device, equipment, storage medium and program product. BACKGROUND

[0002] With the acceleration of social rhythm and the increasing prominence of mental health problems, the demand for psychological counseling services is showing a rapid growth trend. The traditional face-to-face psychological counseling mode has many limitations in service coverage, time flexibility and user privacy protection, and it is difficult to meet the growing user demand. Therefore, how to improve the accessibility and service quality of mental health services with the help of technical means has become an important development direction in the current mental health field. In this context, psychological service systems combining artificial intelligence (AI) technology and special physical space (such as independent counseling cabins) have gradually emerged, aiming to improve service efficiency, optimize resource allocation, and improve user experience through technology empowerment.

[0003] Now, mental health appointment services mainly rely on systematic appointment management platforms and standardized physical space management mechanisms. The appointment system usually recommends psychologists based on form filling or fixed rules, and users can choose information such as counseling time and counselor type to complete the appointment process. At the same time, the use of independent space is usually arranged through another independent room management system, and some systems even rely on manual registration. In recent years, some systems have tried to introduce large language models to improve the interactive experience, achieving a certain degree of natural language understanding and dialogue interaction to enhance user friendliness. However, these technical solutions still have many shortcomings in actual application.

[0004] Currently, the processing efficiency of mental health appointment services is low, and the interactive experience is poor. SUMMARY

[0005] The present disclosure provides a counseling transaction processing method, device, equipment, storage medium and program product to at least solve the problem of low processing efficiency and poor interactive experience of existing mental health appointment services.

[0006] The technical solution of the present disclosure is as follows:

[0007] The present disclosure provides a counseling transaction processing method, device, equipment, storage medium and program product to at least solve the problem of low processing efficiency and poor interactive experience of existing mental health appointment services.

[0008] Obtaining a psychological counseling demand text;

[0009] Inputting the psychological counseling demand text into a large language model for structured analysis to obtain a structured task instruction; wherein the structured task instruction includes intent, emotion label, time range, professional field and service mode;

[0010] querying, from a resource management module, a time intersection result of candidate consultants and candidate independent space resources satisfying the professional field and the service mode, wherein the resource management module is configured to store and manage state information of the consultants and the independent space resources;

[0011] generating at least one candidate scheme according to the time intersection result and a preset strategy rule, so that a user selects a target scheme from the at least one candidate scheme; wherein the target scheme comprises a target consultant, a target appointment time and a target independent space resource;

[0012] performing a consultation transaction processing operation according to the target scheme.

[0013] Optionally, the querying, from the resource management module, of the time intersection result of the candidate consultants and the candidate independent space resources satisfying the professional field and the service mode comprises:

[0014] querying, from the resource management module, candidate consultants conforming to the time range according to the time range;

[0015] querying, from the resource management module, candidate independent space resources conforming to the time range according to the time range;

[0016] determining a time intersection result of a first appointment time corresponding to the candidate consultant and a second appointment time corresponding to the candidate independent space resource according to the first appointment time and the second appointment time.

[0017] Optionally, the preset strategy rule is to preferentially recommend a consultant with a high score or a consultant with a high matching degree with the user.

[0018] Optionally, the performing, according to the target scheme, of the consultation transaction processing operation comprises:

[0019] performing a transactional locking operation according to the target scheme, and sending a state change instruction to the resource management module, so that the resource management module changes state information of the target consultant and the target independent space resource to an occupied state according to the state change instruction;

[0020] sending a pre-authorization instruction to an Internet of Things integration and control module, so that the Internet of Things integration and control module generates a one-time digital access credential valid within the target appointment time according to the pre-authorization instruction, and the user can enter a target independent space corresponding to the target independent space resource and execute an environment configuration instruction of the target independent space through the digital access credential.

[0021] Optionally, the method further comprises:

[0022] After the IoT integration and control module detects that the user has left the independent space, it executes an environment reset and access control permission invalidation command; and

[0023] A status update command is sent to the resource management module so that the resource management module can change the status of the target independent space from occupied to usable.

[0024] Optionally, the environment configuration instructions for executing the target independent space include at least one of the following:

[0025] Execute the lighting configuration corresponding to the target scheme;

[0026] Play the background music corresponding to the target solution.

[0027] This disclosure also provides a consultation transaction processing apparatus, including:

[0028] The acquisition module is used to acquire texts containing psychological counseling requests.

[0029] The parsing module is used to input the psychological counseling needs text into a large language model for structured parsing to obtain structured task instructions; wherein, the structured task instructions include: intent, emotion label, time range, professional field and service mode.

[0030] The query module is used to retrieve the time intersection results of candidate consultants and candidate independent space resources that meet the professional field and the service mode from the resource management module; wherein, the resource management module is used to store and manage the status information of consultants and independent space resources;

[0031] The generation module is used to generate at least one candidate solution based on the time intersection result and preset strategy rules, so that the user can select a target solution from the at least one candidate solution; wherein, the target solution includes: target consultant, target appointment time and target independent space resources;

[0032] The execution module is used to perform consultation transaction processing operations according to the target plan.

[0033] This disclosure also provides an electronic device, including:

[0034] processor;

[0035] Memory used to store processor-executable instructions;

[0036] The processor is configured to execute instructions to implement the steps in the above method.

[0037] The embodiment of the disclosure further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize each step in the method.

[0038] The embodiment of the disclosure further provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to realize each step in the method.

[0039] The embodiment of the disclosure provides at least the following beneficial effects:

[0040] In some embodiments of the disclosure, a psychological counseling demand text is obtained; the psychological counseling demand text is input into a large language model for structured analysis to obtain a structured task instruction, and an intent, an emotion label, a time range, a professional field and a service mode included in the structured task instruction are accurately extracted; a time intersection result of a candidate counselor and a candidate independent space resource meeting the professional field and the service mode is queried from a resource management module; the resource management module is used for storing and managing state information of the counselor and the independent space resource; at least one candidate scheme is generated according to the time intersection result and a preset strategy rule, so that a user selects a target scheme from the at least one candidate scheme; the target scheme includes a target counselor, a target appointment time and a target independent space resource; and a counseling transaction processing operation is performed according to the target scheme. The disclosure automatically generates a psychological health reservation service scheme, improves processing efficiency, provides a candidate scheme for user selection, and improves user interaction experience.

[0041] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings incorporated in the specification and forming a part thereof illustrate embodiments consistent with the present disclosure and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0043] Figure 1 A flowchart of a counseling transaction processing method is provided for an exemplary embodiment of the disclosure;

[0044] Figure 2 A structural schematic diagram of an intelligent psychological counseling reservation system is provided for an exemplary embodiment of the disclosure;

[0045] Figure 3 A structural schematic diagram of a counseling transaction processing device is provided for an exemplary embodiment of the disclosure;

[0046] Figure 4 A structural schematic diagram of an electronic device is provided for an exemplary embodiment of the disclosure. Detailed Implementation

[0047] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0048] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0049] It should be noted that the user information involved in this disclosure includes, but is not limited to, user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0050] Existing technologies generally suffer from the following shortcomings: First, the user interface lacks true "planning capabilities," failing to understand complex, conversational booking intentions, resulting in poor user experience and low efficiency. Second, the scheduling logic of psychologists (human resources) and independent spaces (physical resources) is fragmented, leading to asynchronous resource status and potential double bookings or resource waste. Third, while introducing large-scale language models improves interactivity, their high computational cost and response latency are unacceptable in high-frequency booking scenarios. Finally, the system lacks personalization and flexibility, failing to meet the diverse and dynamically changing needs of users. The root cause of these problems lies in the fragmented and isolated architecture of existing systems, lacking a unified intelligent scheduling hub, and failing to optimize AI applications for the characteristics of booking scenarios. This results in poor performance in real-time performance, collaboration, and cost control, necessitating a natively integrated and intelligent new architecture to achieve a true breakthrough.

[0051] To solve the above technical problems, in some embodiments of the present disclosure, a psychological counseling demand text is obtained; the psychological counseling demand text is input into a large language model for structured analysis to obtain structured task instructions, and accurately extract the intent, emotion label, time range, professional field and service mode included in the structured task instructions; a time intersection result of candidate counselors and candidate independent space resources that meet the professional field and service mode is queried from a resource management module; the resource management module is used to store and manage state information of counselors and independent space resources; at least one candidate scheme is generated according to the time intersection result and a preset strategy rule, so that a user can select a target scheme from the at least one candidate scheme; the target scheme includes a target counselor, a target appointment time and a target independent space resource; and a counseling transaction processing operation is performed according to the target scheme. The present disclosure automatically generates a scheme of mental health reservation service, improves processing efficiency, provides candidate schemes for user selection, and improves user interactive experience.

[0052] The technical solutions provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0053] Figure 1 A flowchart of a counseling transaction processing method provided by an exemplary embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the method includes: Figure 1

[0054] S101: Obtain a psychological counseling demand text;

[0055] S102: Input the psychological counseling demand text into a large language model for structured analysis to obtain structured task instructions; the structured task instructions include intent, emotion label, time range, professional field and service mode;

[0056] S103: Query a time intersection result of candidate counselors and candidate independent space resources that meet the professional field and service mode from a resource management module; the resource management module is used to store and manage state information of counselors and independent space resources;

[0057] S104: Generate at least one candidate scheme according to the time intersection result and a preset strategy rule, so that a user can select a target scheme from the at least one candidate scheme; the target scheme includes a target counselor, a target appointment time and a target independent space resource;

[0058] S105: Perform a counseling transaction processing operation according to the target scheme.

[0059] In this embodiment, the execution subject of the above method can be a terminal device or a server.

[0060] ​The terminal device includes, but is not limited to, a mobile station (MS), a mobile terminal, a mobile telephone, a handset, a portable equipment, and the like. The terminal device can communicate with one or more core networks through a radio access network (RAN). For example, the terminal device can be a mobile phone (also referred to as a "cellular" phone), a computer with wireless communication function, and the like. The terminal device can also be a computer with wireless transceiver function, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical treatment, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, and the like. An operating system installed on the terminal device includes, but is not limited to, an IOS, an Android, a windows, a linux, a Mac OS, and the like. In different networks, the terminal device can be referred to by different names, such as a user equipment, a mobile station, a subscriber unit, a station, a cellular phone, a personal digital assistant, a wireless modem, a wireless communication device, a handheld device, a laptop computer, a cordless phone, a wireless local loop station, a television, and the like. For the convenience of description, the terminal device is referred to as a terminal device in the embodiment.

[0061] In the embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, and the like. The server mainly includes a processor, a hard disk, a memory, a system bus, and the like, and has a general computer architecture type.

[0062] Figure 2 A structure schematic diagram of an intelligent psychological counseling reservation system 20 provided by an exemplary embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the system 20 includes a terminal device 10, a server 20, and a database 30. Figure 2As shown, the intelligent psychological counseling appointment system 20 includes: a large language model driven interaction and intent recognition module (LLM-Powered Interaction and Intent Recognition Module), a multi-modal service resource management module (Multi-Modal Service Resource Management Module), a scheduling, planning, and contingency processing module (Scheduling, Planning, and Contingency Processing Module), and an Internet of Things integration and control module (IoT Integration and Control Module).

[0063] Among them, the interaction and intent recognition module, as the input interface of the system, is responsible for processing the user's natural language request. This module calls a large language model (LLM) as its core natural language understanding engine. To ensure the accuracy, reliability and low delay of processing, the module optimizes the application of LLM using the technical framework of function calling (Function Calling) or tool use (Tool Use). Specifically, the core functions of the system such as appointment, query, modification, etc. are predefined as a set of APIs or tool sets, and the main task of LLM is to parse and convert the user's natural language input into structured call instructions for these predefined functions (for example, book_appointment(counselor_id, time_range, resource_type)), rather than open-ended generative dialogue. In addition, LLMs that have been fine-tuned on specific corpora in the field of psychological counseling appointments can be used to further improve the understanding of domain-specific vocabulary and ambiguous expressions.

[0064] The resource management module (Multi-Modal Service Resource Management Module), as a unified resource library, is responsible for data modeling and state management of all resources that can be scheduled by the system. The resource management module is used to store and manage the state information of counselors and independent space resources. This module defines all service resources (i.e. independent space resources) as schedulable objects with standardized data structures, and maintains their states. The types of independent space resources include at least: physical resource objects, whose attributes record the unique identifier, location, hardware device configuration and time availability matrix of the independent space; virtual resource objects, whose attributes record the type of online counseling service (e.g. video conference, telephone), access parameters and their time availability matrix. This module provides standardized data access interfaces (APIs) for resource queries and state updates.

[0065] Scheduling, Planning, and Contingency Processing Module, is the core logic processing unit of the system, responsible for executing specific appointment scheduling algorithms and exception handling processes. Among them, after receiving the structured request processed by the previous module, the module performs the following operations:

[0066] Constraint matching operation: call the interface of the resource management module to query the intersection of the consultant's schedule and the available time in the selected type of resource (physical or virtual) schedule under the user's given constraint conditions.

[0067] Scheduling strategy application: according to the preset business rules in the system (for example, the minimum safety interval between two consultations, the priority of certain users, etc.), filter and sort the result set of the constraint matching operation to generate the final candidate scheme list. Emergency handling mechanism: this module contains an emergency handling subroutine that subscribes to the state change events of the resource management module. When a key resource (such as a certain consultant) becomes unavailable, it automatically triggers the running of the program, retrieves all existing appointments affected by the event, and calculates and generates alternative appointment schemes for affected users according to the preset reorganization rules.

[0068] Internet of Things (IoT) Integration and Control Module, serves as a communication gateway between the system and the physical hardware devices in the independent space. The module receives instructions from the scheduling planning module and converts them into control commands that comply with specific Internet of Things protocols (such as MQTT, CoAP, or HTTP) and sends them to the hardware controllers in the target independent space. Control commands at least include:

[0069] Access authorization instruction: when the appointment takes effect, issue a one-time, time-limited user access credential to the smart door lock of the designated space.

[0070] Environment configuration instruction: according to the appointment attributes or user preferences, issue scene setting commands (such as light brightness value, color temperature value, background sound file index) to the environment controller.

[0071] State reset instruction: after the end of the appointment time or the system receives a signal that the user has left early, send session end and device reset commands to the door lock and environment controller.

[0072] In some embodiments of the present disclosure, a psychological counseling demand text is obtained. In one implementable manner, a user initiates a natural language request through a client. The psychological counseling demand text is, for example, "I have been feeling very anxious recently and want to find a consultant who specializes in cognitive behavioral therapy for a face-to-face interview on Friday afternoon this week."

[0073] In some embodiments of the present disclosure, the psychological counseling demand text is input into a large language model for structured parsing to obtain structured task instructions; wherein the structured task instructions include: intent, emotion label, time range, professional field and service mode. Wherein the interaction and intent recognition module calls the large language model to parse the request into structured task instructions. For example, intent (Intent): make an appointment for a visit; emotion label (Emotion Tag): anxiety; time range (Time Range): this Friday afternoon; professional field (Specialty): cognitive behavioral therapy (CBT); treatment mode (Modality): face-to-face treatment (or: physical treatment, refers to offline treatment without remote treatment).

[0074] In some embodiments of the present disclosure, the time intersection result of the candidate counselor and the candidate independent space resource meeting the professional field and the service mode is queried from the resource management module. One implementable way is to query the candidate counselor meeting the time range from the resource management module according to the time range; query the candidate independent space resource meeting the time range from the resource management module according to the time range; and determine the time intersection result of the first appointment time corresponding to the candidate counselor and the second appointment time corresponding to the candidate independent space resource. Wherein the structured task instructions are sent to the scheduling planning and emergency handling module, the scheduling planning and emergency handling module initiates a composite query to the resource management module, requesting to obtain the time intersection result of the counselor and the independent space resource meeting the two conditions of being good at CBT and being available offline within the specified time range. For example, the specified time range: July 30, 9:00 AM to July 30, 5:00 PM. Professional field: good at CBT, refers to the counselor who is good at cognitive behavioral therapy (CBT). Service mode: available offline, means that the resource (counselor and independent space) must be able to provide services at the physical site. The scheduling planning and emergency handling module initiates a composite query to the resource management module, requiring to find out the counselor and independent space resource that is good at CBT and available offline within the specified time range, and the time table of these resources can intersect. The resource management module processes the request, first filters out all the counselors and independent space resources meeting the two conditions of being good at CBT and being available offline. Example data is as follows:

[0075] Counselor A: good at CBT, available offline, available time on July 30 is from 10:00 AM to 1:00 PM.

[0076] Counselor B: good at CBT, available offline, available time on July 30 is from 2:00 PM to 4:00 PM.

[0077] Independent space X: suitable for CBT counseling, available offline, available time on July 30 is from 9:00 am to 12:00 pm.

[0078] Independent space Y: suitable for CBT counseling, available offline, available time on July 30 is from 1:00 pm to 5:00 pm.

[0079] Next, the resource management module will find the intersection of the available time between the counselor and the independent space. For counselor A and independent space X, their available time has intersection, between 10:00 am to 12:00 pm. For counselor B and independent space Y, their available time has intersection, between 2:00 pm to 4:00 pm.

[0080] In some embodiments of the present disclosure, at least one candidate solution is generated according to the time intersection result and the preset strategy rule, for the user to select a target solution from the at least one candidate solution; wherein the target solution includes: a target counselor, a target appointment time and a target independent space resource. Wherein, the preset strategy rule is to preferentially recommend a counselor with high score or a counselor with high matching degree with the user. Wherein, the scheduling planning and emergency handling module applies the internal preset strategy rule to the returned time intersection result to generate at least one candidate solution; and presents to the user in natural language form through the interactive and intent recognition module, so that the user selects and confirms one of the target solutions. For example, two candidate solutions are generated: on July 30, from 10:00 am to 12:00 pm, counselor A can be arranged to use independent space X; on July 30, from 2:00 pm to 4:00 pm, counselor B can be arranged to use independent space Y. The user selects one of the target solutions.

[0081] In some embodiments of the present disclosure, according to the target scheme, a consulting transaction processing operation is performed. One implementable way is that according to the target scheme, a transactional locking operation is performed, a state change instruction is sent to a resource management module, so that the resource management module changes the state information of the target consultant and the target independent space resource to an occupied state according to the state change instruction; a pre-authorization instruction is sent to an Internet of Things integration and control module, so that the Internet of Things integration and control module generates a one-time digital access credential valid within the target reservation time according to the pre-authorization instruction, and the user can enter the target independent space corresponding to the target independent space resource through the digital access credential and execute an environment configuration instruction of the target independent space. The execution of the environment configuration instruction of the target independent space includes but is not limited to at least one of the following: executing a light configuration corresponding to the target scheme; playing a background sound corresponding to the target scheme. Wherein, after the user confirms, the dispatch planning and emergency processing module immediately executes the transactional locking operation. The dispatch planning and emergency processing module simultaneously sends an instruction to the resource management module to update the time slice state of the selected consultant and independent space to occupied; and sends a pre-authorization instruction to the Internet of Things integration and control module to generate a one-time digital access credential valid within the reservation time period for the user in the independent space. Service execution and environmental automation. When the reservation time arrives, the user arrives at the designated independent space. The user uses the one-time digital access credential to enter the space through the smart door lock controlled by the Internet of Things integration and control module. After entering successfully, the Internet of Things integration and control module automatically executes the environment configuration instruction (such as adjusting the light, playing the background sound) according to the preset to create a suitable consulting environment.

[0082] In some embodiments of the present disclosure, after the Internet of Things integration and control module detects that the user leaves the independent space, an environment reset and access permission invalidation instruction is executed; and a state update instruction is sent to the resource management module, so that the resource management module changes the state of the target independent space from the occupied state to the available state. Wherein, after the consultation ends and the user leaves the space, the Internet of Things integration and control module detects the state change and automatically executes the environment reset and access permission invalidation instruction, and notifies the resource management module that the independent space has been changed to the available state again.

[0083] The embodiments of the present disclosure define and implement a complete and closed-loop automated method, taking the user's natural language intention as the starting point, through a series of interrelated modular processes, and finally ending with the delivery of a physically controlled service in an automatically authorized environment. This seamless integration of the four links of "language understanding, resource planning, service delivery, and hardware control" in the end-to-end automation process is a complete system-level innovation that existing technologies do not have. By means of function call, the LLM is transformed from an uncertain chat tool to a reliable "task resolver", providing accurate and structured input for the entire automation process, solving the problem of inaccurate starting point in existing technologies. The ability to uniformly manage multi-modal resources provides flexibility for the process; its automated emergency handling mechanism provides reliability and resilience when facing uncertainty, solving the problem of rigid process and easy interruption in existing technologies. Through the deep integration of the Internet of Things, the instructions of the software process are extended to direct and automatic control of the physical world, truly breaking down the barriers between "online information" and "offline experience", solving the problem of process unable to land in a closed loop in existing technologies.

[0084] The following discloses a consultation transaction processing method in combination with a specific scenario.

[0085] Scenario details: User: a college student. User's actual problem: the student wants to get professional psychological counseling due to academic pressure. The demand is specific and complex: the counselor should be good at academic pressure; the time should be in the afternoon of Wednesday this week; the mode should be offline; the counseling environment should be a private single room. Challenges faced by existing technologies: using traditional methods, the user needs to independently query the counselor introduction, check the counselor schedule, and then independently query the available conditions of the counseling room. The process is cumbersome and the information is not smooth, and it is easy to have scheduling conflicts such as "booking a person but no available room" or "having a room but the expert's time does not match".

[0086] The specific processing steps are as follows: Step A: User request input and accurate parsing; the user inputs a natural language request on the system client interface: "Due to academic pressure, I would like to make an appointment for offline counseling with a counselor who specializes in this field on Wednesday afternoon this week. The location requirement is a single independent space." The interaction and intent recognition module receives the text. It is not an open chat, but a call to a large language model optimized by a function calling framework. The LLM is instructed to parse the text and fill in the parameters required by the predefined find_appointment function. The parsing result is a structured JSON object that accurately converts the user's multi-dimensional requirements into machine-readable structured task instructions. The problem solved: This step uses the powerful understanding of LLM to accurately convert the user's complex and personalized request into a system executable task at one time, avoiding the tediousness and information omission of traditional multi-form filling. Step B: Automatic coordination and scheme confirmation; the scheduling planning and emergency handling module in the system background receives the above structured task instructions and automatically executes them. The scheduling planning and emergency handling module initiates a composite query, requesting the intersection of "Consultant A's available time" and "Single independent space B's available time". Suppose the system calculates that Consultant Li (specializing in academic pressure) and independent space "Quiet House-101" are available at the same time on Wednesday afternoon 15:00-16:00. The system presents this unique, verified, and immediately executable complete solution ("Li- Wednesday 15:00- Quiet House-101") to the user. The user only needs to take one step - "click to confirm". The problem solved: This step changes the multi-party coordination (people and space) that originally required manual operation into an atomic, automated operation, fundamentally eliminating scheduling conflicts and greatly improving appointment efficiency and success rate. Step C: Automatic response to emergencies; the day before the appointment, Consultant Li cancels his entire schedule on Wednesday afternoon due to an emergency. The administrator updates Li's status in the background. The system's emergency handling mechanism is automatically triggered by this status change event. The system identifies that the user's appointment is affected and automatically re-executes the scheduling process of Step B based on the user's original requirements (excluding Li). The system finds a new optimal solution (e.g., Zhang- Wednesday 16:00- Quiet House-102) and proactively sends a notification to the user with a one-click confirmation option. The problem solved: This step demonstrates the system's "resilience" in the face of service resource mutations. It ensures service continuity through automated resource reorganization, avoiding sudden user experience degradation or service interruption due to information delays. Step D: Seamless integration of service execution and physical environment; after confirming the new appointment time, the user arrives at "Quiet House-102" on Wednesday afternoon. The user's appointment confirmation instruction triggers the scheduling planning and emergency handling module to send a pre-authorization instruction to the Internet of Things integration and control module.

[0087] The user uses the campus card to verify identity at the access control. The IoT integration and control module checks the information and instructs the door lock to open. At the same time, the module instructs the room's environmental controller to automatically adjust the lighting, temperature and humidity, background sound, etc. to the preset "consultation mode". After the consultation is over, the system automatically revokes the access control permission and resets the room state. Problem solved: This step seamlessly converts the reservation credentials in the digital world into access permissions and environmental experiences in the physical world, bridging the "last mile" of service delivery, achieving full closed-loop automation of the process, and enhancing privacy and security.

[0088] In this embodiment, we assume an "intelligent psychological counseling reservation system" deployed on a university server cluster. The system is physically composed of the following services that work together: User Interaction Gateway: A web service for clients (such as WeChat mini programs, APPs) that internally deploys an "interaction and intent recognition module driven by large language models". Dispatch Planning Service: The core business logic server of the system, hosting the "dispatch planning and emergency handling module". Resource Service: A separate microservice hosting the "multi-modal service resource management module", with a PostgreSQL database backend containing data tables such as counselors, spaces, schedules, etc. IoT Gateway: An MQTT Broker and corresponding services hosting the "IoT integration and control module", responsible for communicating with the intelligent controllers of all independent counseling spaces on campus.

[0089] Scenario description. User: Student Xiaoming. Background: Xiaoming feels a lot of academic pressure and anxiety as the final exam approaches. Initial behavior: Xiaoming opens the school's mental health service app and enters the intelligent reservation interface.

[0090] The detailed implementation steps are as follows.

[0091] Step 1: User interaction and structured analysis of tasks.

[0092] 1. Xiaoming inputs a natural language text in the chat box of the app: "The final exam is so stressful, I want to talk to a teacher, preferably on Wednesday afternoon, and hope to be in a quiet room."

[0093] 2. The app client sends this text to the / api / v1 / request interface of the user interaction gateway via HTTPS POST request.

[0094] 3. The user interaction gateway receives the request and activates the "interaction and intent recognition module driven by large language models". The module performs the following operations:

[0095] Construct a Prompt containing user text and a predefined function set, call a large language model that is deployed and fine-tuned locally (e.g., a smaller parameter open-source LLM).

[0096] The predefined function set is similar to: find_appointment(time_range, counselor_attributes, space_attributes, user_context_tags).

[0097] The LLM is reasoned over, and instead of directly generating a dialogue, it outputs a structured JSON object that is intended to call the above function:

[0098] {

[0099] "function_to_call":"find_appointment",

[0100] "arguments":{

[0101] "time_range":{

[0102] "start":"2025-07-16 13:00:00",

[0103] "end":"2025-07-16 18:00:00"

[0104] },

[0105] "counselor_attributes":{

[0106] "specialty_tags":["academic_pressure"]

[0107] },

[0108] "space_attributes":{

[0109] "type":"physical",

[0110] "tags":["quiet","single_person"]

[0111] },

[0112] "user_context_tags":["exam_anxiety"]

[0113] }

[0114] }

[0115] By now, the user's ambiguous, emotional input has been successfully converted into precise, executable machine task instructions.

[0116] Step 2: Multi-resource collaborative query and strategic plan generation.

[0117] 1. The user interaction gateway forwards the above JSON instructions to the dispatch planning service.

[0118] 2. After the core processing unit of the dispatch planning service receives the instructions, it initiates two API queries to the resource service in parallel:

[0119] GET / resources / counselors?specialty=academic_pressure&available_between=...;

[0120] GET

[0121] / resources / spaces?type=physical&tags=quiet,single_person&available_between=...。

[0122] 3. The resource service queries the database respectively and returns two lists of available time slices.

[0123] 4. The dispatch planning service performs a time intersection operation on these two lists to obtain a set of time slots that satisfy both the availability of people and spaces.

[0124] 5. The service's strategy engine is triggered, which applies a rule: "For requests with the exam_anxiety label, prefer the counselor with the highest rating."

[0125] 6. Finally, the service generates a ranked list of complete information plans, such as:

[0126] Plan A: {id: "plan_A", counselor: "Li Teacher", space: "Quiet Palace-101", time: "15:00-16:00"};

[0127] Plan B: {id: "plan_B", counselor: "Zhang Teacher", space: "Listening Room-203", time: "16:30-17:30"}.

[0128] Step 3: Plan confirmation and transactional resource locking.

[0129] 1. The list of options is returned to the user interaction gateway, which formats it into a friendly natural language paragraph and presents it to Xiaoming: "Two options found for you, with priority recommendation of Li Teacher, who has rich experience in academic stress relief..."

[0130] 2. Xiaoming clicks on "Option A" on the applet. The client initiates a POST / api / v1 / confirm request with content {"plan_id":"plan_A"}.

[0131] 3. After receiving the confirmation request, the scheduling service initiates a distributed transaction: sends instructions to the resource service to update the status of Li Teacher and "Quiet House-101" in the 15:00-16:00 time slice in the database to BOOKED. Publishes an instruction to the MQTT topic iot / control / provision of the IoT gateway: {"user_id":"xiaoming_student_id","space_id":"101","action":"grant_access","valid_from":"14:55","valid_to":"16:05"}.

[0132] Step four: Service execution and software-hardware integration.

[0133] 1. On Wednesday afternoon at 14:55, Xiaoming arrives at the entrance of "Quiet House-101".

[0134] 2. He sticks his campus card on the access control card reader. The access controller (an embedded device that subscribes to the MQTT topic) verifies its ID and whether the current time is within the authorized range.

[0135] 3. After verification, the door lock is automatically opened. At the same time, the controller sends a status message {"space_id":"101","status":"session_started"} to the IoT gateway.

[0136] 4. According to the preset, the controller automatically adjusts the indoor lighting to soft warm color and plays soft background music.

[0137] 5. At 16:00, the consultation ends and Xiaoming leaves. At 16:05, the authorization time expires and the access control permission is automatically cleared. If the sensor detects no one in the room, it automatically turns off all devices and updates the space status to AVAILABLE again through the IoT gateway.

[0138] If on Wednesday morning, Mr. Li has an emergency leave, the administrator updates his status in the system. The emergency handling subprogram of the scheduling planning service is triggered by the event, automatically retrieves Xiao Ming's appointment, and immediately re-executes Step 2 and Step 3 to calculate a new optimal alternative solution for Xiao Ming (for example, recommending Mr. Zhang's 16:30 session), and sends a notification to Xiao Ming through the applet, requesting his confirmation of the change.

[0139] If Xiao Ming said "want to chat with the teacher online" when initiating the request. Then in Step 1, the modality parsed by the LLM will be "virtual". In Step 2, the system will only query the consultant's online available time and virtual conference room resources. After confirmation in Step 3, the system will not interact with the Internet of Things gateway, but will automatically generate an encrypted, one-time video conference link and send it to Xiao Ming and Mr. Li along with the appointment information.

[0140] Figure 3 A structural schematic diagram of a counseling transaction processing device 30 is provided for the exemplary embodiments of the present disclosure. As shown, the counseling transaction processing device 30 includes an acquisition module 31, an analysis module 32, a query module 33, a generation module 34, and an execution module 35. Figure 3

[0141] The acquisition module 31 acquires a psychological counseling demand text.

[0142] The analysis module 32 inputs the psychological counseling demand text into a large language model for structured analysis to obtain a structured task instruction; wherein the structured task instruction includes: intent, emotion label, time range, professional field, and service mode.

[0143] The query module 33 queries the time intersection result of the candidate consultants and candidate independent space resources that meet the professional field and service mode from the resource management module; wherein the resource management module is used to store and manage the state information of the consultants and independent space resources.

[0144] The generation module 34 generates at least one candidate solution according to the time intersection result and a preset strategy rule, so that a user can select a target solution from the at least one candidate solution; wherein the target solution includes: a target consultant, a target appointment time, and a target independent space resource.

[0145] The execution module 35 executes a counseling transaction processing operation according to the target solution.

[0146] Regarding the device in the above embodiments, the specific manner in which each module performs an operation has been described in detail in the embodiments related to the method, and will not be described in detail here.

[0147] ​Figure 4 A structural schematic diagram of an electronic device is provided for the exemplary embodiments of the present disclosure. As shown in Figure 4 , the electronic device includes a memory 41 and a processor 42. In addition, the electronic device also includes a power supply component 43 and a communication component 44.

[0148] The memory 41 is configured to store computer programs and can be configured to store other various data to support operations on the electronic device. Examples of these data include instructions for any application program or method operating on the electronic device.

[0149] The memory 41 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0150] The communication component 44 is configured to perform data transmission with other devices.

[0151] The processor 42 can execute computer instructions stored in the memory 41 to: acquire a psychological counseling demand text; input the psychological counseling demand text into a large language model to perform structured analysis, and obtain a structured task instruction; wherein the structured task instruction includes an intent, an emotion label, a time range, a professional field and a service mode; query a time intersection result of a candidate counselor and a candidate independent space resource that meet the professional field and the service mode from a resource management module; wherein the resource management module is configured to store and manage state information of the counselor and the independent space resource; generate at least one candidate scheme according to the time intersection result and a preset strategy rule, so that a user selects a target scheme from the at least one candidate scheme; wherein the target scheme includes a target counselor, a target appointment time and a target independent space resource; and perform a counseling transaction processing operation according to the target scheme.

[0152] Correspondingly, the embodiments of the present disclosure also provide a computer readable storage medium storing a computer program. When the computer readable storage medium stores the computer program and the computer program is executed by one or more processors, the one or more processors perform Figure 1 the steps in the method embodiments.

[0153] Correspondingly, the embodiments of the present disclosure also provide a computer program product, which includes a computer program / instruction, and the computer program / instruction is executed by a processor to perform Figure 1 the steps in the method embodiments.

[0154] The above Figure 4The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0155] The above Figure 4 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.

[0156] The aforementioned electronic devices also include a display screen and audio components.

[0157] The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0158] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0159] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0160] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0161] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0162] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0163] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0164] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory. The memory is an example of computer-readable media.

[0165] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. The 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, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0166] It should be noted that, in the present document, relational terms such as "first" and "second", and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus.

[0167] The above summary of the only specific embodiments of the present disclosure enables those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments disclosed herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing consultation transactions, characterized in that, include: Obtain the text of your psychological counseling needs; The text of the psychological counseling needs is input into a large language model for structured parsing to obtain structured task instructions; wherein, the structured task instructions include: intention, emotion label, time range, professional field and service mode; The resource management module retrieves the time intersection results of candidate consultants and candidate independent space resources that meet the professional field and service mode; wherein, the resource management module is used to store and manage the status information of consultants and independent space resources; Based on the time intersection results and preset strategy rules, at least one candidate solution is generated for the user to select a target solution from the at least one candidate solution; wherein, the target solution includes: target consultant, target appointment time, and target independent space resources; Based on the stated objective, perform the consultation transaction processing operation.

2. The method according to claim 1, characterized in that, The step of retrieving the time intersection results of candidate consultants and candidate independent space resources that meet the professional field and service mode from the resource management module includes: Based on the time range, query the resource management module to find candidate consultants who match the time range; Based on the time range, candidate independent spatial resources that match the time range are queried from the resource management module; Based on the first appointment time corresponding to the candidate consultant and the second appointment time corresponding to the candidate independent space resource, determine the time intersection result of the first appointment time and the second appointment time.

3. The method according to claim 1, characterized in that, The preset strategy rule prioritizes recommending consultants with high ratings or those with a high degree of compatibility with the user.

4. The method according to claim 1, characterized in that, The step of performing consultation transaction processing operations according to the target plan includes: According to the target scheme, a transactional locking operation is performed, and a status change instruction is sent to the resource management module so that the resource management module can change the status information of the target consultant and the target independent space resource to the occupied state according to the status change instruction; A pre-authorization instruction is sent to the IoT integration and control module, which then generates a one-time digital access credential valid within the target reservation time. The user can use the digital access credential to enter the target independent space corresponding to the target independent space resource and execute the environment configuration instructions of the target independent space.

5. The method according to claim 4, characterized in that, The method further includes: After the IoT integration and control module detects that the user has left the independent space, it executes an environment reset and access control permission invalidation command; and A status update instruction is sent to the resource management module so that the resource management module can change the status of the target independent space from occupied to usable.

6. The method according to claim 4, characterized in that, The environment configuration instructions for executing the target independent space include at least one of the following: Execute the lighting configuration corresponding to the target scheme; Play the background music corresponding to the target solution.

7. A consultation transaction processing device, characterized in that, include: The acquisition module is used to acquire texts containing psychological counseling requests. The parsing module is used to input the psychological counseling needs text into a large language model for structured parsing to obtain structured task instructions; wherein, the structured task instructions include: intent, emotion label, time range, professional field and service mode. The query module is used to retrieve the time intersection results of candidate consultants and candidate independent space resources that meet the professional field and the service mode from the resource management module; wherein, the resource management module is used to store and manage the status information of consultants and independent space resources; The generation module is used to generate at least one candidate solution based on the time intersection result and preset strategy rules, so that the user can select a target solution from the at least one candidate solution; wherein, the target solution includes: target consultant, target appointment time and target independent space resources; The execution module is used to perform consultation transaction processing operations according to the target plan.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps of the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.