System and method for active chatbot with composite finite state machine
By using a composite finite state machine system and an emotional AI model, and by using sensors to sense user behavior to generate natural language questions, the problem of insufficient flexibility and realism in chatbot dialogues is solved, and proactive and emotionally rich human-computer interaction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SQ TECH (SHANGHAI) CORP
- Filing Date
- 2023-06-25
- Publication Date
- 2026-05-19
AI Technical Summary
Existing chatbots lack flexibility and realism in their dialogue, and are unable to perceive the user's state and the real world. Their interaction methods are stiff and rigid.
A composite finite state machine system is adopted to sense the user's physiological state and body movements through sensors to generate the user's behavioral state. Combined with a large language model and an emotion AI model, it generates question information with natural language structure, performs precise filtering and emotion adjustment, and outputs optional dialogue information that conforms to time and user settings.
It improves the conversational flexibility and realism of chatbots, enabling proactive and emotionally rich human-computer interaction.
Smart Images

Figure CN116775834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a system and method for a chatbot, and more particularly to a system and method for an active chatbot with a composite finite state machine. Background Technology
[0002] In recent years, with the popularization and rapid development of artificial intelligence, various applications of artificial intelligence have sprung up like mushrooms after rain. Among them, chatbots have attracted the most attention.
[0003] Generally speaking, traditional chatbots use a passive chat approach for human-computer interaction. That is, the chatbot only responds to questions when asked by the user. Even when using the most popular Large Language Model (LLM), the chatbot will not respond if the user does not ask a question. At most, it will proactively reply with a welcome message or guidance message at the beginning. Although chatbots using LLM have made great progress in understanding and generating natural language, they still lack the ability to perceive the user's state and the real world. The natural language they generate does not have rich emotions and can only answer specific questions or complete specific tasks in a standardized way. Therefore, they suffer from the problems of insufficient dialogue flexibility and realism of chatbots.
[0004] In light of this, some manufacturers have proposed using user browsing history as a technical means to proactively ask questions. For example, when a user browses an item on a webpage, the chatbot proactively asks if they want to buy the item or provides a detailed introduction. However, while this method can proactively reply to messages, the interaction is stiff and rigid, lacking human touch and cannot be considered a true chat. Therefore, it still fails to effectively solve the problems of insufficient dialogue flexibility and realism in chatbots.
[0005] In conclusion, it is clear that existing technologies have long suffered from insufficient dialogue flexibility and realism in chatbots, thus necessitating the development of improved technologies to address this issue. Summary of the Invention
[0006] This invention discloses a system and method for an active chatbot with a composite finite state machine.
[0007] First, this invention discloses a system for an active chatbot with a composite finite state machine. This system includes an artificial intelligence platform, a client host, and a server host. The artificial intelligence platform receives precise question information through an application programming interface (API), inputs this precise question information into a large language model to generate answer information, and then transmits the answer information to the server host through the API. Next, the client host includes a sensor, a first non-transitory computer-readable storage medium, and a first hardware processor. The sensor continuously senses at least one of physiological state, facial expression, and body movement to generate a user behavior state; the first non-transitory computer-readable storage medium stores a plurality of first computer-readable instructions; the first hardware processor is electrically connected to the first non-transitory computer-readable storage medium and the sensor, and executes the plurality of first computer-readable instructions to cause the client host to continuously transmit the user behavior state and a plurality of on-demand dialogue settings, wherein the on-demand dialogue settings include time information and filtering parameters. Additionally, the server-side host connects to the client-side host to receive user behavior states and on-demand dialogue settings. The server-side host includes: a question optimization circuit, a second non-transitory computer-readable storage medium, and a second hardware processor. The question optimization circuit includes multiple registers to store corresponding states, and a first combinational logic circuit for determining state transitions and a second combinational logic circuit for determining outputs, forming a cascaded first finite state machine and a second finite state machine. The first finite state machine receives coarse question and answer information, and its output serves as the input to the second finite state machine. The second finite state machine outputs precise question information to the artificial intelligence platform through an application programming interface. The second non-transitory computer-readable storage medium stores multiple second computer-readable instructions. The second hardware processor is electrically connected to the second non-transitory computer-readable storage medium and the question optimization circuit to execute the multiple second computer-readable instructions. The command instructs the server host to perform the following actions: based on the received user behavior state and on-demand dialogue settings, generate a rough question with a natural language structure and input it into the question optimization circuit; after the question optimization circuit outputs precise question information to the artificial intelligence platform, receive the corresponding answer information from the artificial intelligence platform, input the answer information into the trained emotional AI model to generate corresponding emotional answer information, and then store the emotional answer information in the answer list; and automatically filter emotional answer information that meets the time information and filtering parameters from the answer list as on-demand dialogue information generated based on the on-demand dialogue settings, and transmit the on-demand dialogue information to the client host for output.
[0008] In addition, this invention also discloses a method for an active chatbot with a composite finite state machine, the steps of which include: connecting a server host to an artificial intelligence platform and a client host respectively; the client host continuously sensing at least one of physiological state, facial expression, and body movement through sensors to generate a user behavior state; the client host continuously transmitting the user behavior state and multiple optional dialogue settings to the server host, wherein the optional dialogue settings include time information and filtering parameters; the server host generating coarse question information with a natural language structure based on the received user behavior state and optional dialogue settings, and inputting the coarse question information into a first finite state machine and a second finite state machine for parsing and state transformation to generate precise question information, wherein the first finite state machine receives the coarse question information and the... The output of the first finite state machine from the AI platform's response information serves as the input of the second finite state machine. The second finite state machine outputs precise question information to the AI platform through the AI platform's application interface. The AI platform inputs the precise question information into a large language model to generate response information, and then transmits the response information to the server host through the application interface. The server host receives the response information corresponding to the precise question information from the AI platform, inputs the response information into a trained emotional AI model to generate corresponding emotional response information, stores the emotional response information in a response list, and automatically filters emotional response information that meets the time information and filtering parameters from the response list as optional dialogue information, and then transmits the optional dialogue information to the client host for output.
[0009] The system and method disclosed in this invention are as described above. The difference between this invention and the prior art is that this invention generates coarse question information with a natural language structure by using user behavior state and on-demand dialogue settings. The coarse question information is then input into a question optimization circuit to generate precise question information. The precise question information is then transmitted to an artificial intelligence platform to obtain corresponding answer information. This answer information is then input into a trained emotional AI model to generate corresponding emotional answer information. Finally, the emotional answer information is stored in an answer list so that emotional answer information that meets the on-demand dialogue settings can be selected as on-demand dialogue information and transmitted to the client host for output.
[0010] Through the above-mentioned technical means, the present invention can achieve the technical effect of improving the dialogue flexibility and realism of chatbots. Attached Figure Description
[0011] Figure 1 This is a system block diagram of the active chatbot system with a composite finite state machine according to the present invention.
[0012] Figure 2A and Figure 2BThis is a flowchart of the method for an active chatbot with a composite finite state machine according to the present invention.
[0013] Figure 3 This is a schematic diagram illustrating the proactive chatbot that applies the present invention.
[0014] Figure 4 This is a schematic diagram of the composite finite state machine that applies the present invention.
[0015] Figure 5 This is a schematic diagram illustrating how the present invention actively filters out emotional response information from a list of responses.
[0016] Explanation of reference numerals in the attached figures:
[0017] 110: Artificial Intelligence Platform
[0018] 120: Client host
[0019] 121: Sensor
[0020] 122: First non-transitory computer-readable storage medium
[0021] 123: First hardware processor
[0022] 130: Server host
[0023] 131: Question about optimizing circuits
[0024] 132: Second non-transitory computer-readable storage medium
[0025] 133: Second hardware processor
[0026] 410: Millitype Finite State Machine
[0027] 420: Moore-type finite state machine
[0028] 500: Answer List
[0029] 510: Display Interface
[0030] Step 210: Connect the server host to both the artificial intelligence platform and the client host.
[0031] Step 220: The client host continuously senses at least one of physiological state, facial expression, and body movement through at least one sensor to generate user behavior state.
[0032] Step 230: The client host continuously transmits the user's behavior status and multiple on-demand conversation settings to the server host, wherein the on-demand conversation settings include time information and filtering parameters.
[0033] Step 240: The server host generates a rough question with a natural language structure based on the received user behavior state and the on-demand dialogue settings. This rough question is then input into a first finite state machine and a second finite state machine connected in series for parsing and state transformation to generate a precise question. The first finite state machine receives the rough question and the answer from the AI platform. The output of the first finite state machine serves as the input to the second finite state machine. The second finite state machine outputs the precise question to the AI platform through the AI platform's application programming interface (API).
[0034] Step 250: The AI platform inputs the precise question information into a Large Language Model (LLM) to generate the answer information, and then transmits the answer information to the server host through the application interface.
[0035] Step 260: The server host receives the answer information corresponding to the precise question information from the artificial intelligence platform, inputs the answer information into the trained emotional AI model to generate corresponding emotional answer information, stores the emotional answer information in the answer list, and automatically filters the emotional answer information that meets the time information and the filtering parameters from the answer list as optional dialogue information, and transmits the optional dialogue information to the client host for output. Detailed Implementation
[0036] The following will describe in detail the implementation of the present invention with reference to the accompanying drawings and embodiments, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0037] First, please refer to " Figure 1 " Figure 1This is a system block diagram of the active chatbot system with a composite finite state machine according to the present invention. The system includes: an artificial intelligence platform 110, a client host 120, and a server host 130. The artificial intelligence platform 110 receives precise question information through an application interface, inputs this precise question information into a large language model to generate answer information, and then transmits the answer information to the server host 130 through the application interface. In actual implementation, the artificial intelligence platform 110 is a chatbot using a large language model, such as a Generative Pre-trained Transformer (GPT), PaLM, Galactica, LLaMA, LaMDA, or similar models.
[0038] The client host 120 includes a sensor 121, a first non-transitory computer-readable storage medium 122, and a first hardware processor 123. The sensor 121 continuously senses at least one of physiological states, facial expressions, and body movements to generate a user behavior state. In practice, the sensor 121 can sense physiological characteristics such as blood pressure, heart rate, pulse, and blood sugar to determine physiological states, such as happiness, excitement, or depression; or it can sense facial expressions and moods by sensing the face, iris, etc.; or it can sense user body movements, such as walking, running, or dancing, through sensors worn on the limbs, such as a three-axis accelerometer or gyroscope.
[0039] The first non-transitory computer-readable storage medium 122 is used to store a plurality of first computer-readable instructions. In practice, the first non-transitory computer-readable storage medium 122 may include a hard disk, optical disk, flash memory, or the like. Furthermore, the first computer-readable instructions refer to instructions that can be interpreted and executed by the client host 120, such as a client computer (or PC).
[0040] The first hardware processor 123 is electrically connected to the first non-transitory computer-readable storage medium 122 and the sensor 121 to execute the plurality of first computer-readable instructions, causing the client host 120 to continuously transmit user behavior status and a plurality of on-demand dialogue settings. The on-demand dialogue settings include time information and filtering parameters. For example, the time information may include year, month, day, hour, minute, second, or even time intervals, etc., used as a basis for determining whether the response information is related to time. For example, it may determine whether the response information has expired, set a timed feedback (e.g., sending a reminder to eat at 12:00 noon every day), or other time-related situations, such as: morning being associated with breakfast, 0:00 to 4:00 AM being associated with sleep, national holidays being associated with fixed dates, birthdays being associated with specified dates, etc. Therefore, when the time falls within the morning range, response information related to breakfast can be filtered out; when the time falls within 0:00 to 4:00 AM, response information related to sleep can be filtered out; and when the time is a national holiday, response information containing that national holiday can be filtered out. In addition, taking the filtering parameters as an example, the filtering parameters are used to set the response information that is accepted and the response information that is rejected. For example, it can be set by the user according to their own preferences, such as: setting to filter out chat content containing politics or religion, setting to only accept chat content containing entertainment, setting to filter out content with a depressing tone, etc.
[0041] Next, in the server host 130, which is connected to the client host 120 to receive user behavior states and on-demand dialogue settings, the server host 130 includes: a question optimization circuit 131, a second non-transitory computer-readable storage medium 132, and a second hardware processor 133. The question optimization circuit 131 includes multiple registers to store corresponding states, and a first combinational logic circuit for determining state transitions and a second combinational logic circuit for determining outputs, forming a cascaded first finite state machine and a second finite state machine. The first finite state machine receives coarse question information and answer information, and its output serves as the input to the second finite state machine. The second finite state machine outputs precise question information to the artificial intelligence platform 110 through an application programming interface. In practice, the first finite state machine can be a Mealy machine, whose output is affected by the current state, coarse question information, and answer information. Alternatively, the second finite state machine can be a Moore machine, whose output is only affected by the current state. In fact, each optional dialogue can be converted into a state table first, and then the transition table of the flip-flop can be set according to the excitation table. Then, the input program of each flip-flop can be obtained by using the Karnaugh map, which can generate the final finite state machine circuit diagram, and thus realize the query optimization circuit 131.
[0042] The second non-transitory computer-readable storage medium 132 is used to store a plurality of second computer-readable instructions. In actual implementation, the second non-transitory computer-readable storage medium 132 is very similar to the first non-transitory computer-readable storage medium 122, the only difference being that the former is the non-transitory computer-readable storage medium of the server host 130, storing computer-readable instructions (i.e., second computer-readable instructions) to be executed by the server host 130, while the latter is the non-transitory computer-readable storage medium of the client host 120, storing computer-readable instructions (i.e., first computer-readable instructions) to be executed by the client host 120.
[0043] The second hardware processor 133 is electrically connected to the second non-transitory computer-readable storage medium 132 and the question optimization circuit 131 to execute a plurality of second computer-readable instructions, causing the server host 130 to perform the following: generate coarse question information with a natural language structure based on the received user behavior state and on-demand dialogue settings, and input it to the question optimization circuit 131; after the question optimization circuit 131 outputs precise question information to the artificial intelligence platform 110, receive the answer information corresponding to the precise question information from the artificial intelligence platform 110, input the answer information into the trained emotional AI model to generate corresponding emotional answer information, and then store the emotional answer information in the answer list; and automatically filter emotional answer information that meets the time information and filtering parameters from the answer list as on-demand dialogue information generated based on the on-demand dialogue settings, and transmit the on-demand dialogue information to the client host 120 for output. For example, suppose the server host 130 receives a user behavior state of "excitement," and the on-demand dialogue setting includes the time information "AM 08:00" and the filter parameter "excluding statements of frustration." In this case, the second hardware processor 133 generates a rough question based on "excitement," "AM 08:00," and "excluding statements of frustration," such as "excitement, AM 08:00, statements of frustration." This rough question is then input into the composite finite state machine of the question optimization circuit 131 for parsing and state transition. For example, it defines the question type based on "excitement," the specific time state of the question based on "AM 08:00," and the scope of the question based on "excluding statements of frustration." Then, it uses predefined templates or syntax rules to generate precise question information, such as: "Please list five reasons why you feel excited and not frustrated at 8 AM," or "It's 8 AM now, and I'm very excited. What suggestions do you have?" Finally, the precise question information is transmitted to the artificial intelligence platform 110 to obtain the corresponding answer information. At this point, the obtained answer information will be fed back to the question optimization circuit 131 to automatically identify the correlation between the question and the answer, and then dynamically adjust the state setting of the finite state machine to further improve the accuracy of the question. For example, it can automatically set a question with better correlation to replace a question with poor correlation to generate accurate question information.In addition, the response information is input into the trained emotional AI model to generate corresponding emotional response information, which is then stored in a response list. The second hardware processor 133 automatically selects emotional responses from the response list that match the time information and selection parameters as optional dialogue information. For example, assuming the user's excitement is sensed at 8:00 AM and 6:00 PM, and corresponding responses are obtained, such as "Good morning, please share your excitement with others" and "Good night, please share your excitement with others," these responses will be used by the emotional AI model to generate corresponding emotional responses, such as "Quick! Record your current excitement as soon as possible" and "Share your excitement with the world, it's never too late!" and stored in the response list. If the current time is evening, responses related to the morning will be excluded, and only responses related to the evening will be selected as optional dialogue information. Finally, the second hardware processor 133 drives the transmission element to actively transmit the optional dialogue information to the client host 120 for output. In other words, when the server host 130 receives the user's behavior status, it will trigger an active on-demand dialogue and filter out the appropriate emotional response information as the on-demand dialogue information according to the on-demand dialogue settings.
[0044] It should be noted that, in practical implementation, this invention can be partially or entirely based on hardware. For example, one or more components in the system can be implemented using hardware processors such as integrated circuit chips, system-on-chips (SoCs), complex programmable logic devices (CPLDs), and field-programmable gate arrays (FPGAs). The non-transitory computer-readable storage medium described in this invention carries computer-readable instructions (or computer program instructions) for enabling a processor to implement various aspects of this invention. The non-transitory computer-readable storage medium can be a tangible device capable of holding and storing instructions used by an instruction execution device. The non-transitory computer-readable storage medium can be, but is not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: hard disks, random access memory, read-only memory, flash memory, optical disks, floppy disks, and any suitable combination thereof. The term "non-transitory computer-readable storage medium" as used herein is not to be interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical signals through fiber optic cables), or electrical signals transmitted through wires. Furthermore, the computer-readable instructions described herein can be downloaded from the non-transitory computer-readable storage medium to various computing / processing devices, or via a network, such as the Internet, local area network, wide area network, and / or wireless network, to external computer devices or external storage devices. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, hubs, and / or gateways. A network card or network interface in each computing / processing device receives the computer-readable instructions from the network and forwards them to the non-transitory computer-readable storage medium in the respective computing / processing device. The computer-readable instructions that perform the operations of this invention may be assembly language instructions, instruction set architecture instructions, machine instructions, machine-dependent instructions, microinstructions, firmware instructions, or source code or object code written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Common Lisp, Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby, and PHP, as well as conventional procedural programming languages such as C or similar programming languages.
[0045] Please see " Figure 2A "and" Figure 2B " Figure 2A "and" Figure 2B This is a flowchart of the method for an active chatbot with a composite finite state machine according to the present invention. The steps include: connecting the server host 130 to the artificial intelligence platform 110 and the client host 120 respectively (step 210); the client host 120 continuously sensing at least one of physiological state, facial expression, and body movement through sensor 121 to generate a user behavior state (step 220); the client host 120 continuously transmitting the user behavior state and multiple optional dialogue settings to the server host 130, wherein the optional dialogue settings include time information and filtering parameters (step 230); the server... The host 130 generates a rough question with a natural language structure based on the received user behavior state and optional dialogue settings. This rough question is then input into a first finite state machine and a second finite state machine connected in series for parsing and state transitions to generate a precise question. The first finite state machine receives the rough question and the answer from the artificial intelligence platform 110. The output of the first finite state machine serves as the input to the second finite state machine. The second finite state machine outputs the precise question to the artificial intelligence platform 110 through the application interface of the artificial intelligence platform 110 (step 240). The artificial intelligence platform 110 then... The precise question information is input into a large language model to generate answer information, which is then transmitted to the server host 130 via the application interface (step 250). The server host 130 receives the answer information corresponding to the precise question information from the artificial intelligence platform 110, inputs the answer information into the trained emotional AI model to generate corresponding emotional answer information, stores the emotional answer information in the answer list, and automatically filters emotional answer information that meets the time information and filtering parameters from the answer list as optional dialogue information, and transmits the optional dialogue information to the client host 120. Output is then performed (step 260). Through the above steps, a rough question information with a natural language structure can be generated based on the user's behavior state and the on-demand dialogue settings. This rough question information is then input into the question optimization circuit to generate precise question information. The precise question information is then transmitted to the artificial intelligence platform to obtain corresponding answer information. This answer information is then input into the trained emotion AI model to generate corresponding emotion answer information. Finally, the emotion answer information is stored in the answer list so that emotion answer information that meets the on-demand dialogue settings can be selected as on-demand dialogue information and transmitted to the client host for output.
[0046] The following are in conjunction with " Figure 3 "to" Figure 5 The following description will be provided by way of examples, such as " Figure 3 "As indicated, " Figure 3This is a schematic diagram of an active chatbot using the present invention. First, the server host 130 is interconnected with the artificial intelligence platform 110 and the client host 120. The client host 120 continuously senses at least one of the user's physiological state, facial expressions, and body movements through sensors to generate a user behavior state, and continuously transmits the user behavior state and multiple optional dialogue settings to the server host 130 through an input interface. The optional dialogue settings include time information and filtering parameters. The state management module of the server host 130 generates a rough question message with a natural language structure based on the received user behavior state and optional dialogue settings, and inputs the generated rough question message into a first finite state machine (e.g., a Milli finite state machine) and a second finite state machine (e.g., a Moore finite state machine) connected in series for parsing and state transformation to generate precise question message. Next, the server host 130 transmits the precise question message to the artificial intelligence platform 110 through the platform's API. At this time, the artificial intelligence platform 110 inputs the precise question message into a large language model to generate... The system generates and sends the response information to the server host 130 via API. When the server host 130 receives the response information corresponding to the precise question from the AI platform 110, it inputs the response information into a first finite state machine to confirm the relevance between the question and the response, further optimizing the rough question information into a precise one. The response information is then input into a trained emotional AI model to generate corresponding emotional response information, which is then stored in a response list. The system actively filters out emotional responses that meet the on-demand dialogue settings (i.e., time information and filtering parameters) from the response list as on-demand dialogue information, and sends this selected on-demand dialogue information to the client host 120 for output through the display interface 510. Thus, the chatbot completes the process of actively sending on-demand dialogue information based on the sensed user behavior state to engage in proactive and emotional human-computer interaction with the user. It is particularly important to note that the state management module, the emotional AI model, and the proactive on-demand dialogue module are implemented by executing computer-readable instructions through a hardware processor.In practice, the trained emotional AI model is created by training data with emotional markers, such as joy, worry, and anger, and combining it with artificial intelligence (AI) neural networks, such as Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM), Transformers, or similar technologies. When emotionless responses are input into the emotional AI model, it can generate emotional responses. This means embedding emotional terms into the responses to express joy (e.g., happy, cheerful), anger (e.g., angry, dissatisfied), sorrow (e.g., sad, heartbroken), happiness (e.g., joy, delight), excitement (e.g., impatient, thrilled), surprise (e.g., unexpected, stunned), gratitude (e.g., heartfelt thanks, grateful) using words, idioms, adjectives, etc. However, it is important to note that the generated emotional responses only appear to possess emotion; it does not mean that the emotional AI model itself has emotion. In addition, optimization can be achieved during training using methods such as backpropagation and gradient descent.
[0047] like" Figure 4 "As indicated, " Figure 4 This is a schematic diagram illustrating the composite finite state machine of the present invention. In practical implementation, the cascaded Millitype finite state machine 410 and Moore type finite state machine 420 can be considered a composite finite state machine. After generating a rough question, the Millitype finite state machine 410 can be used to identify keywords and detect whether it contains specific types of keywords, such as "behavior," "emotion," "time," etc. If these types of keywords are detected, the corresponding state is entered, and the keyword is output. Next, the Moore type finite state machine 420 is used to further parse the user's intent based on the keywords output in the previous step. It can identify specific question types based on the combination of keywords and context to generate precise question information, such as: "What are the causes of excitement?", "What are some suggestions for exercise?", "What are some options for the morning?" "Wait, then the server host 130 will output the precise question information to the artificial intelligence platform 110 to obtain the corresponding answer information. After the server host 130 obtains the answer information, it will send this answer information to the Milli finite state machine 410 in order to identify the correlation between the question and the answer, and provide the Moore finite state machine 420 with the ability to analyze the intent and improve the generated question (i.e., the precise question information)."
[0048] like" Figure 5 "As indicated, " Figure 5 This diagram illustrates how the present invention actively filters emotional responses from a list of answers. Assuming multiple responses already exist in the answer list 500, and the filtering parameters for the impromptu dialogue include the keyword "early," when the server host 130 initiates an impromptu dialogue, it will filter out the first response from the list above as the impromptu dialogue information because this emotional response contains the keyword "early." Furthermore, assuming the impromptu dialogue is set to a timed feedback period of "12 noon," then when the time is 12 noon, the server host 130 will filter emotional responses related to 12 noon from the answer list 500 as the impromptu dialogue information. For example, "I can't wait for a delicious lunch," where "can't wait" and "expect" are emotional expressions, and "lunch" is related to 12 noon. In this way, even if the user doesn't ask a question, the chatbot using this invention will proactively provide emotionally charged impromptu dialogue information to the user based on user behavior, timed feedback, etc., effectively improving the chatbot's dialogue flexibility and realism.
[0049] In summary, the difference between this invention and existing technologies lies in generating coarse question information with a natural language structure based on user behavior and on-demand dialogue settings. This coarse question information is then input into a question optimization circuit to generate precise question information. The precise question information is then transmitted to an artificial intelligence platform to obtain corresponding answer information. This answer information is then input into a trained emotional AI model to generate corresponding emotional answer information. Finally, the emotional answer information is stored in an answer list so that emotional answer information that matches the on-demand dialogue settings can be selected as on-demand dialogue information and transmitted to the client host for output. This technical approach can solve the problems existing in existing technologies, thereby achieving the technical effect of improving the dialogue flexibility and realism of chatbots.
[0050] Although the present invention has been disclosed above with reference to the foregoing embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of patent protection of the present invention shall be determined by the scope defined in the appended claims.
Claims
1. A system for an active chatbot with a composite finite state machine, the system comprising: An artificial intelligence platform is used to receive precise question information through an application interface, input the precise question information into a large language model to generate answer information, and then transmit the answer information through the application interface. The client host contains: At least one sensor is used to continuously sense at least one of physiological state, facial expression and body movement to generate user behavior state; A first non-transitory computer-readable storage medium for storing a plurality of first computer-readable instructions; as well as A first hardware processor, electrically connected to the first non-transitory computer-readable storage medium and the sensor, is used to execute the plurality of first computer-readable instructions, causing the client host to continuously transmit the user's behavior status and a plurality of on-demand dialogue settings, wherein... The on-demand dialogue settings include time information and filtering parameters. The filtering parameters are used to set the response information to be accepted and the response information to be rejected. The time information is used as the basis for determining whether the response information is related to time. as well as A server host, connected to the client host to receive the user behavior state and the on-demand dialogue settings, comprises: The question optimization circuit includes multiple registers to store corresponding states, a first combinational logic circuit for determining state transitions, and a second combinational logic circuit for determining outputs, to form a first finite state machine and a second finite state machine connected in series. The first finite state machine receives coarse question information and the answer information. The first finite state machine outputs keywords obtained based on the coarse question information. The output of the first finite state machine serves as the input of the second finite state machine. The second finite state machine outputs the precise question information to the artificial intelligence platform through the application interface. A second non-transitory computer-readable storage medium for storing a plurality of second computer-readable instructions; and A second hardware processor, electrically connected to the second non-transitory computer-readable storage medium and the query optimization circuit, is used to execute the plurality of second computer-readable instructions, causing the server host to perform: Based on the received user behavior state and the on-demand dialogue settings, a rough question information with a natural language structure is generated and input into the question optimization circuit. After the question optimization circuit outputs the precise question information to the artificial intelligence platform, it receives the corresponding answer information from the platform and inputs it into the trained emotional AI model to generate corresponding emotional answer information. Then, it stores the emotional answer information in the answer list. The system automatically filters out the emotional responses that match the time information and the filtering parameters from the list of responses, using them as the on-demand dialogue information generated based on the on-demand dialogue settings, and then transmits the on-demand dialogue information to the client host for output.
2. The system of an active chatbot with a composite finite state machine according to claim 1, wherein the server host selects at least one of natural language processing, generative modeling, and template matching to generate the rough question information with a natural language structure.
3. The system of an active chatbot with a composite finite state machine according to claim 1, wherein the second finite state machine identifies the question type based on the keyword and its grammatical structure, and then uses a predefined template or grammatical rule to generate the precise question information that is more specific and clear than the rough question information.
4. The system of an active chatbot with a composite finite state machine according to claim 1, wherein the first finite state machine is a Milli-type finite state machine whose output is affected by the current state, the coarse question information and the answer information, and the second finite state machine is a Moore-type finite state machine whose output is affected only by the current state.
5. A method for an active chatbot with a composite finite state machine, comprising the following steps: Connect the server host to both the artificial intelligence platform and the client host; The client host continuously senses at least one of physiological state, facial expression, and body movement through at least one sensor to generate user behavior status; The client host continuously transmits the user's behavior status and multiple on-demand dialogue settings to the server host. The on-demand dialogue settings include time information and filtering parameters. The filtering parameters are used to set the response information to be accepted and the response information to be rejected. The time information is used as the basis for determining whether the response information is related to time. The server host generates a rough question with a natural language structure based on the received user behavior state and the optional dialogue settings. The rough question is then input into a first finite state machine and a second finite state machine connected in series for parsing and state transformation to generate a precise question. The first finite state machine receives the rough question and the answer from the artificial intelligence platform. The first finite state machine outputs keywords obtained based on the rough question. The output of the first finite state machine serves as the input of the second finite state machine. The second finite state machine outputs the precise question to the artificial intelligence platform through the application interface of the artificial intelligence platform. The AI platform inputs the precise question information into a large language model to generate the answer information, and then transmits the answer information to the server host through the application interface; and The server receives the answer information corresponding to the precise question information from the artificial intelligence platform, inputs the answer information into the trained emotional AI model to generate corresponding emotional answer information, stores the emotional answer information in the answer list, and automatically filters the emotional answer information that meets the time information and the filtering parameters from the answer list as optional dialogue information, and transmits the optional dialogue information to the client host for output.
6. The method for an active chatbot with a composite finite state machine according to claim 5, wherein the server host selects at least one of natural language processing, generative modeling, and template matching to generate the rough question information with a natural language structure.
7. The method for an active chatbot with a composite finite state machine according to claim 5, wherein the second finite state machine identifies the question type based on the keyword and its grammatical structure, and then uses a predefined template or grammatical rule to generate the precise question information that is more specific and clear than the rough question information.
8. The method for an active chatbot with a composite finite state machine according to claim 5, wherein the first finite state machine is a Milli-type finite state machine whose output is affected by the current state, the coarse question information, and the answer information, and the second finite state machine is a Moore-type finite state machine whose output is affected only by the current state.