Multi-round human-computer conversation node dynamic routing and weight self-adaptive control method and system

By constructing micro-spatial structure matrices and correlation matrices to quantify occlusion relationships, and combining reward evaluation mechanisms and reinforcement learning matrix updates, the problem of unreasonable paths caused by physical space influences in multi-turn human-computer dialogues is solved, achieving adaptive dialogue decision-making and improved accuracy.

CN122433906APending Publication Date: 2026-07-21BEIJING YUETU TRAVEL TECH (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING YUETU TRAVEL TECH (GRP) CO LTD
Filing Date
2026-04-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies fail to effectively consider the impact of physical space structure on user operation behavior and cognitive judgment during multi-round human-computer dialogue node routing and weight adjustment, resulting in unreasonable dialogue paths or inaccurate weight adjustment, especially in accessible restroom scenarios where incorrect business node selection is prone to occur.

Method used

By constructing a micro-spatial structure matrix, a dialogue statement-spatial correlation matrix, and an occlusion attention matrix, the occlusion relationships in the physical space are quantified to participate in dialogue decision-making. Furthermore, a reward evaluation mechanism and an update state feedback mechanism are introduced to dynamically adjust the reinforcement learning matrix and node weight vector, thereby achieving adaptive decision-making.

Benefits of technology

It improves the accuracy of identifying button obstruction and operational uncertainty, enhances the rationality and stability of business node selection, reduces the number of calls to erroneous nodes, and improves the matching degree between human-computer dialogue results and real-world scenario requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433906A_ABST
    Figure CN122433906A_ABST
Patent Text Reader

Abstract

The application provides a multi-round human-computer conversation node dynamic routing and weight self-adaptive control method and system, relates to the field of reinforcement learning technology, and comprises the following steps: determining a target grid unit based on the planar area of an accessible toilet cubicle, and obtaining a micro-space structure matrix based on the target grid unit; obtaining a conversation sentence-space correlation matrix based on the micro-space structure matrix and a current conversation sentence text; performing matrix element multiplication processing on the conversation sentence-space correlation matrix and a masking mark matrix to obtain a masking attention matrix; controlling the routing mode of a business node corresponding to the human-computer conversation based on the masking attention matrix to obtain a human-computer conversation result; updating a reinforcement learning matrix based on the human-computer conversation result to obtain an updated reinforcement learning matrix; and obtaining an updated node weight vector based on the updated reinforcement learning matrix. The application realizes the rapid response of user attention focus under the influence of a complex entity environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of reinforcement learning technology, and in particular to a method and system for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes. Background Technology

[0002] With the advancement of intelligent construction in high-speed rail station public transportation hubs and public service venues, multi-turn human-computer dialogue technology is widely used in comprehensive business scenarios such as station navigation and emergency assistance. In these scenarios, dialogue interaction often needs to dynamically switch between multiple business nodes. For example, in the scenario of accessible restrooms in high-speed rail stations, users may ask a series of questions about whether the emergency call button has been pressed, whether it is obstructed, or whether an alarm has been triggered. The dialogue processing module needs to route between multiple business nodes such as emergency explanation nodes, status confirmation nodes, and manual assistance nodes. At the same time, in the real physical space environment, structures such as foldable handrails, emergency call buttons, wall layouts, and limited space dimensions directly affect users' operational behavior and cognitive judgments, thereby changing their dialogue content and questioning methods. In particular, when a foldable handrail rotates from a horizontal use position to a vertical storage position, its rotation trajectory may cover the area where the emergency call button is located, forming a specific spatial obstruction area, causing users to have uncertain judgments about the button's status, thus repeatedly asking related questions in multiple rounds of dialogue.

[0003] Existing technologies, in the process of routing and weight adjustment of nodes in multi-round human-computer dialogues, typically rely solely on semantic understanding results, contextual turn information, or preset business rules for decision-making. They lack a structured representation and computational mechanism for factors influencing the actual physical spatial structure, and fail to transform potentially obstructing or interfering areas in the physical space into quantifiable data that can participate in dialogue decisions. In accessible restroom scenarios, when a user's question stems from physical spatial obstruction, simply relying on semantic matching or contextual inference can easily lead to incorrect business node selections, resulting in unreasonable dialogue paths or inaccurate weight adjustments, thus affecting the overall interaction effect. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes, which can solve the technical problems of unreasonable dialogue paths or inaccurate weight adjustment in the prior art.

[0005] A first aspect of this invention proposes a method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes, comprising: S1: Based on the planar area of ​​the accessible toilet cubicle, determine the target grid cell and obtain the micro-space structure matrix based on the target grid cell; S2: Based on the micro-space structure matrix and the current dialogue text, obtain the dialogue statement-space correlation matrix; S3: Multiply the dialogue statement-space association matrix and the occlusion marker matrix element by matrix element to obtain the occlusion attention matrix; S4: Based on the masking attention matrix, control the routing method of the business nodes corresponding to the human-computer dialogue to obtain the human-computer dialogue result; S5: Based on the results of the human-computer dialogue, update the reinforcement learning matrix to obtain the updated reinforcement learning matrix; S6: Based on the updated reinforcement learning matrix, obtain the updated node weight vector.

[0006] A second aspect of this invention proposes a dynamic routing and weight adaptive control system for multi-turn human-computer dialogue nodes, comprising: a processor and a memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the multi-turn human-computer dialogue node dynamic routing and weight adaptive control method as described in the first aspect.

[0007] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. By constructing a micro-spatial structure matrix, a dialogue statement spatial association matrix, and an occlusion attention matrix, the rotation and occlusion relationships in the physical space are quantified and expressed and participate in dialogue decision calculation. This transforms the routing mechanism, which originally relied solely on semantics and rules, into a spatial information-driven adaptive decision-making mechanism. This effectively improves the accuracy of identifying issues such as button occlusion and operational uncertainty in accessible restroom scenarios, and enhances the rationality and stability of business node selection.

[0008] 2. By introducing a reward evaluation mechanism and an updated state feedback mechanism, the reinforcement learning matrix is ​​dynamically modified, so that the results of each round of dialogue can have a reverse effect on the subsequent action selection process, achieving continuous optimization in multi-round interactions, avoiding path deviation problems caused by long-term accumulation of single misjudgments, and improving the adaptability of business node routing under different spatial conditions and dialogue contexts.

[0009] 3. By generating node weight vectors based on the updated reinforcement learning matrix and adjusting and dynamically sorting the set of business nodes, the priority of each business node in multi-turn dialogue can change in real time with the actual interaction effect. This enables a rapid response to the user's focus under the influence of complex entity environments, reduces the number of calls to erroneous nodes, and improves the matching degree between human-computer dialogue results and real-world scenario requirements. Attached Figure Description

[0010] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0011] Figure 1 This is a flowchart illustrating the dynamic routing and weight adaptive control method for multi-turn human-computer dialogue nodes provided in an embodiment of the present invention.

[0012] Figure 2 This is a schematic diagram of the structure of a multi-turn human-computer dialogue node dynamic routing and weight adaptive control system provided in an embodiment of the present invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0014] The following description, in conjunction with the accompanying drawings, details the dynamic routing and weight adaptive control method for multi-turn human-computer dialogue nodes provided by the present invention through specific embodiments and application scenarios.

[0015] Reference manual attached Figure 1 The diagram shows a flowchart of the dynamic routing and weight adaptive control method for multi-turn human-computer dialogue nodes provided in an embodiment of the present invention.

[0016] This invention provides a method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes, which may include the following steps: S1: Based on the planar area of ​​the accessible hygiene partition, determine the target grid cell and obtain the micro-space structure matrix based on the target grid cell.

[0017] In one possible implementation, determining the target grid cell based on the planar area of ​​accessible hygiene partitions in S1 specifically includes sub-steps S101 to S103: S101: Obtain the planar area of ​​the accessible toilet cubicle and divide the planar area into multiple grid cells.

[0018] It should be noted that accessible toilet cubicles refer to isolated spaces located within station restrooms, possessing independent enclosures, and designed to meet the needs of wheelchair users and people with mobility impairments. A planar area refers to the projection of the cubicle onto the ground, including wall boundaries and the area occupied by internal facilities within the projection. A grid cell refers to the smallest area partition unit formed by discretizing the planar area according to rows and columns.

[0019] Specifically, the planar area of ​​the accessible toilet cubicle is first obtained. The planar area is enclosed by the projection of the inner boundary of the cubicle wall onto the ground, and includes the occupancy information of the toilet, washbasin, door and its opening sweeping area, foldable handrail, and the wall where the emergency call button is located on the ground projection. The planar area is obtained by measuring the position of each inflection point along the inner edge of the wall in a unified coordinate system on site and recording it to form a sequence of boundary points. The sequence of boundary points is then connected in sequence to form a closed polygon to represent the planar area. The planar area is then divided into grids. The grid division is achieved by establishing row and column dividing lines within the outer rectangle of the planar area. The row dividing lines are perpendicular to the column dividing lines and cover the outer rectangle. Several rectangular grid cells are formed between the row and column dividing lines. The grid cells located outside the planar area are marked as invalid cells, and the grid cells that overlap with the planar area are marked as valid cells, so as to obtain multiple valid grid cells covering the planar area.

[0020] S102: Based on the rotation range of the foldable handrail in the planar area, determine the set of grid cells in the planar area that intersect with the rotation trajectory of the foldable handrail.

[0021] It should be noted that a set of grid units refers to a collection of multiple grid units that satisfy the same spatial relationship conditions. A foldable handrail is a handrail component installed on the side wall or supporting structure near the toilet in the cubicle, capable of rotating around a pivot from a horizontal support position to a vertical storage position. The rotation range refers to the area swept by the outer contour of the foldable handrail as it moves from one rotational position to another. The rotation trajectory refers to the projection line or band of the sweeping path formed by the outer contour boundary of the foldable handrail during rotation in the planar area. Intersection refers to the overlap between the planar partition corresponding to the grid unit and the projection line or band of the rotation trajectory.

[0022] Specifically, the installation position and rotation range of the foldable handrail in the planar area are obtained. The installation position is determined by reading the position of the handrail's pivot center in a unified coordinate system from the planar layout drawing. The rotation range is determined by reading the outer contour line of the handrail in both the usage and storage positions and determining the rotation sweep area between the two positions. The rotation sweep area is defined by the planar projection area covered by the outer contour line of the handrail during rotation. After determining the rotation range, a planar projection representation of the rotation trajectory is constructed. The rotation trajectory is determined by the boundary envelope formed by the outer contour of the handrail during rotation and is represented in the coordinate system as a set of continuous line segments or curve segments. Subsequently, the spatial relationship between the turning trajectory and the effective grid cells obtained in step S101 is determined one by one. For each effective grid cell, its four boundary line segments and its internal area are extracted and their intersection with the line segments or curve segments of the turning trajectory is determined. When there is an overlap between the internal area of ​​the grid cell and the projection line or projection band of the turning trajectory, the grid cell is added to the grid cell set, and the grid cells added to the set are recorded with their row number and column number until the determination of all effective grid cells is completed, thereby obtaining the set of grid cells that intersect with the turning trajectory of the foldable handrail.

[0023] S103: In the set of grid cells, identify the target grid cell that overlaps with the location of the emergency call button.

[0024] It should be noted that an emergency call button refers to a push-button or trigger-type device installed in a compartment to activate a call signal when someone needs assistance. Overlap refers to the overlap between the planar partition corresponding to a grid cell and the projected area corresponding to the location of the emergency call button. A target grid cell refers to a grid cell in the grid cell set that overlaps with the location of the emergency call button.

[0025] Specifically, the location of the emergency call button is obtained by reading the coordinates of the installation point of the emergency call button in the floor plan. The projection range of the emergency call button in the plan area is determined based on its physical shape and installation method. The projection range is achieved by obtaining the outline of the outer contour of the emergency call button in the floor plan and forming a closed outline area, or by measuring the boundary points of the outer contour of the emergency call button projected from the wall to the ground and connecting the boundary points to form a closed area. Subsequently, for each grid cell in the grid cell set, the boundary line segment of the grid cell in a unified coordinate system is obtained to form the closed region corresponding to the grid cell. The overlap relationship between the closed region and the closed region of the projection range of the emergency call button is judged. The overlap relationship judgment includes judging whether there is a common area or a common boundary segment between the two closed regions. If there is a common area or a common boundary segment, it is determined that the grid cell and the location of the emergency call button have an overlap relationship. The grid cell is marked as the target grid cell and its row number and column number are recorded. If there is no common area and no common boundary segment, it is determined that the grid cell and the location of the emergency call button do not have an overlap relationship. The judgment continues for the next grid cell until the judgment of all grid cells in the grid cell set is completed, thereby obtaining the target grid cell set that has an overlap relationship with the location of the emergency call button.

[0026] In one possible implementation, obtaining the micro-spatial structure matrix based on the target mesh cells in S1 specifically includes sub-steps S104 to S107: S104: Obtain the first installation position of the foldable handrail in the planar area.

[0027] It should be noted that the first installation position of the foldable handrail in the planar area refers to the specific coordinate position of the center of the foldable handrail pivot or the installation fixing point in the planar area, which is determined by the architectural floor plan or on-site measurement.

[0028] Specifically, a coordinate reference is first established to describe the planar area of ​​the accessible toilet cubicle. This reference is achieved by selecting a corner point on the inner boundary of the cubicle wall as the origin and using two perpendicular wall lines as the first and second coordinate axes, respectively. Then, the first installation position of the foldable handrail in the planar area is obtained. This first installation position is determined by retrieving the positioning markers of the foldable handrail from the building plan and reading the coordinate values ​​of its rotation center or installation point relative to the coordinate reference. After obtaining the first installation position, its grid cell assignment is determined. This assignment is done by comparing the row and column dividing lines obtained from the grid division to determine the row and column intervals into which the coordinate point of the first installation position falls, thus identifying the grid cell containing that coordinate point.

[0029] S105: Obtain the second installation location of the emergency call button in the planar area.

[0030] It should be noted that the second installation location of the emergency call button in the plan area refers to the specific coordinates of the emergency call button installation point in the plan area, which is also obtained through the plan layout or on-site measurement.

[0031] Specifically, the coordinate reference established in step S104 is used to obtain the second installation position of the emergency call button in the planar area. The second installation position is obtained by retrieving the positioning mark of the emergency call button in the building plan and reading the coordinate value of its installation point under the coordinate reference, or by measuring the vertical distance from the installation point of the emergency call button to the two coordinate axes under the coordinate reference and recording it as coordinate value. After obtaining the second installation position, the grid cell assignment of the second installation position is determined. The assignment is determined by comparing the coordinate point of the second installation position with the row and column dividing lines of the grid to determine the row interval and column interval where the second installation position is located, thereby determining the grid cell containing the coordinate point. The row number and column number of the grid cell are recorded as the grid cell identifier corresponding to the second installation position. At the same time, the first installation position and the second installation position are expressed and recorded in a consistent manner under the same coordinate reference to ensure that the subsequent matrix construction and matrix element assignment can be performed in the same planar area.

[0032] S106: Construct the first initial matrix based on all grid cells.

[0033] It should be noted that the first initial matrix refers to a two-dimensional data structure that corresponds one-to-one with all grid cells in terms of the number of rows and columns. Each matrix element in this two-dimensional data structure corresponds to one grid cell, and the initial values ​​are not differentiated by facility.

[0034] Specifically, all valid grid cells obtained after the planar region is meshed are acquired. Valid grid cells are those that overlap with the planar region and are marked as valid. The row and column numbers of the valid grid cells are then obtained. Subsequently, the number of rows and columns of the first initial matrix are determined based on the row and column number ranges. The first initial matrix is ​​a two-dimensional matrix corresponding to the grid cells, where each matrix element corresponds to the row and column position of a grid cell. Then, the first initial matrix is ​​initialized by setting all matrix elements to zero. After initialization, a correspondence is established between the first initial matrix and the row and column numbers of each grid cell. This correspondence is achieved by recording the row and column numbers of each grid cell as matrix element indices, thus obtaining the first initial matrix constructed based on all grid cells.

[0035] S107: Based on the mesh elements corresponding to the first installation position and the second installation position and the target mesh element, assign values ​​to the matrix elements of the first initial matrix to obtain the micro-space structure matrix.

[0036] It should be noted that the grid cell corresponding to the first installation position refers to the grid cell containing the coordinates of the first installation position of the foldable handrail. The grid cell corresponding to the second installation position refers to the grid cell containing the coordinates of the second installation position of the emergency call button. Matrix element assignment refers to the operation of modifying the values ​​of corresponding positions in the first initial matrix based on the grid cells corresponding to the first installation position, the grid cells corresponding to the second installation position, and the target grid cell. The micro-spatial structure matrix refers to the two-dimensional matrix obtained after the above matrix element assignment, which is used to represent the spatial relationship between each grid cell in the planar area and the foldable handrail, the emergency call button, and the turning area.

[0037] Specifically, the grid cells corresponding to the first installation position of the foldable handrail and the second installation position of the emergency call button are obtained. The grid cells corresponding to the first and second installation positions are determined by the row and column intervals where the coordinates of the corresponding installation positions fall. Target grid cells are then obtained; these target grid cells are those that overlap with the location of the emergency call button within the set of grid cells intersecting the foldable handrail's rotation trajectory. Subsequently, in the first initial matrix, matrix elements with the same index position as the grid cells corresponding to the first installation position are assigned a first identifier value. Similarly, matrix elements with the same index position as the grid cells corresponding to the second installation position are assigned a second identifier value. Finally, matrix elements with the same index position as each target grid cell are assigned a third identifier value. After completing the matrix element assignments, the first initial matrix is ​​output as the micro-space structure matrix.

[0038] In embodiments of the present invention, by obtaining a micro-spatial structure matrix, the originally dispersed planar arrangement relationship is transformed into a matrix data structure with a row and column index correspondence.

[0039] S2: Based on the micro-space structure matrix and the current dialogue statement text, obtain the dialogue statement-space correlation matrix.

[0040] In one possible implementation, S2 specifically includes sub-steps S201 to S204: S201: Obtain the text of the current dialogue statement from the user's dialogue statement in the current round.

[0041] It should be noted that the current user dialogue statement refers to the complete language content entered by the user during a specific human-computer interaction. The current dialogue statement text refers to the text sequence data obtained through speech recognition or direct input, expressing the user's intent and descriptive content in the current round.

[0042] Specifically, the system acquires the source data of the dialogue statement input by the user in the current round. The source data can be either speech data or text data. When the source data is speech data, speech recognition processing is performed on the speech data to obtain a text sequence. Speech recognition processing includes framing the speech data, endpoint detection, acoustic unit decoding, and outputting the text sequence to obtain the text of the current dialogue statement. When the source data is text data, the text data is directly used as the text of the current dialogue statement.

[0043] S202: Perform keyword matching on the current dialogue text to obtain the set of keywords associated with the handrail, the set of keywords associated with the emergency call button, and the set of keywords associated with the obscured domain.

[0044] It should be noted that keyword matching refers to the process of comparing the current dialogue text with a pre-organized keyword list word by word. The handrail-related keyword set refers to the set of words used to describe the actions, location, or state of the foldable handrail. The emergency call button-related keyword set refers to the set of words used to describe the location, operation, or state of the emergency call button. The occlusion domain-related keyword set refers to the set of words used to describe spatial states such as being obstructed, difficult to reach, or covered.

[0045] Specifically, the following steps are taken: obtaining the handrail-related keyword table, the emergency call button-related keyword table, and the occlusion field-related keyword table. The keyword table consists of component names, action descriptions, and location descriptions related to the foldable handrail. The keyword table consists of component names, trigger descriptions, and call descriptions related to the emergency call button. The keyword table also consists of descriptions related to spatial states such as obstruction, inaccessibility, and being pressed down. Then, using the word sequence obtained in step S201 as the matching object, each word is compared word-by-word with entries in the three keyword tables. If a word matches any entry in the handrail-related keyword table, it is recorded as a handrail-matched word and added to the handrail-related keyword set. If a word matches any entry in the emergency call button-related keyword table, it is recorded as a button-matched word and added to the emergency call button-related keyword set. If a word matches any entry in the occlusion field-related keyword table, it is recorded as an occlusion-matched word and added to the occlusion field-related keyword set. The set also stores the location index corresponding to the matched word. If a term does not match any keyword list, it will not be added to any of the above sets. After completing the word-by-word comparison of all terms, the set of keywords associated with the handrail, the set of keywords associated with the emergency call button, and the set of keywords associated with the masking domain will be output.

[0046] S203: Construct a second initial matrix based on the micro-space structure matrix.

[0047] It should be noted that the second initial matrix refers to a two-dimensional matrix with the same row and column structure as the micro-space structure matrix, and its matrix elements are used to carry the association results between dialogue statements and spatial units.

[0048] Specifically, a two-dimensional matrix with the exact same number of rows and columns as the micro-space structure matrix is ​​established as the second initial matrix. This second initial matrix is ​​then initialized by sequentially traversing all its elements according to their row and column indices, assigning each element a value of zero. After initialization, a positional mapping relationship is established between the second initial matrix and the micro-space structure matrix. This mapping is achieved by recording a one-to-one correspondence between the same row and column indices in the two matrices. Values ​​are then assigned to the corresponding elements in the second initial matrix, forming a dialog statement space association matrix.

[0049] S204: Based on the micro-space structure matrix, assign values ​​to the matrix elements of the second initial matrix to obtain the dialogue statement-space association matrix.

[0050] It should be noted that the dialogue statement spatial association matrix refers to a two-dimensional matrix formed by assigning matrix elements to the corresponding grid cells based on the set of keywords matched in the current dialogue statement text, on the basis of the second initial matrix. It is used to represent the association between the current dialogue statement and each grid cell in the planar region.

[0051] In one possible implementation, S204 specifically includes sub-steps S2041 to S2044: S2041: When the matrix element of the micro-space structure matrix is ​​equal to the first identifier value, and the current dialogue text contains any keyword in the handrail-related keyword set, assign the corresponding matrix element in the second initial matrix a value of 1.

[0052] Specifically, the set of handrail-related keywords corresponding to the current dialogue statement text is obtained, and the non-emptiness of the handrail-related keyword set is checked. When there is at least one keyword in the handrail-related keyword set, all matrix elements of the micro-space structure matrix are traversed in row and column index order. For each row and column, the matrix element value of the micro-space structure matrix is ​​obtained and it is determined whether it is equal to the first identifier value. When the determination result is yes, the matrix element in the second initial matrix at the same position as the row and column index is located, and the matrix element is changed from zero to one value. When the determination result is no, the matrix element at that position remains unchanged until the traversal of all row and column indices is completed, so that the grid cell corresponding to the first identifier value forms a corresponding one-value mark in the second initial matrix.

[0053] S2042: When the matrix element of the micro-space structure matrix is ​​equal to the second identifier value, and the current dialogue text contains any keyword in the set of keywords associated with the emergency call button, assign the corresponding matrix element in the second initial matrix a value of 1.

[0054] Specifically, the set of keywords associated with the emergency call button corresponding to the current dialogue text is obtained, and the non-emptiness of the set of keywords associated with the emergency call button is checked. When there is at least one keyword in the set of keywords associated with the emergency call button, all matrix elements of the micro-space structure matrix are traversed in row and column index order. For each row and column, the matrix element value of the micro-space structure matrix is ​​obtained and it is determined whether it is equal to the second identifier value. When the determination result is yes, the matrix element in the second initial matrix at the same position as the row and column index is located and the matrix element is assigned a value. When the determination result is no, the matrix element at that position remains unchanged until the traversal of all row and column indices is completed. Thus, the grid cell corresponding to the second identifier value forms a corresponding one-value mark in the second initial matrix, and is retained in the same second initial matrix together with the one-value mark formed for the first identifier value.

[0055] S2043: When the matrix element of the micro-space structure matrix is ​​equal to the third identifier value, and the current dialogue text contains any keyword in the masking domain associated keyword set, the corresponding matrix element in the second initial matrix is ​​assigned a value of 1.

[0056] Specifically, the non-emptiness of the set of keywords associated with the occlusion domain is determined. When there is at least one keyword in the set of keywords associated with the occlusion domain, all matrix elements of the micro-space structure matrix are traversed in row and column index order. For each row and column, the matrix element value of the micro-space structure matrix is ​​obtained and it is determined whether it is equal to the third identifier value. When the determination result is yes, the matrix element in the second initial matrix at the same position as the row and column index is located and the matrix element is assigned a value. When the determination result is no, the matrix element at that position remains unchanged until the traversal of all row and column indices is completed. Thus, the grid cell corresponding to the third identifier value forms a corresponding one-value mark in the second initial matrix. After completing the assignment of matrix elements of the second initial matrix, the second initial matrix after assignment is output as the dialog statement space association matrix.

[0057] It should be noted that by matching different identifier values ​​in the micro-spatial structure matrix with different sets of keywords in the current dialogue text, and assigning a value to the corresponding matrix element in the second initial matrix when the corresponding conditions are met, a clear mapping relationship can be established between the specific objects or spatial states mentioned by the user in the current round of dialogue and the specific grid cells within the planar area. This transforms the semantic content at the linguistic level into computable spatial matrix data. Assigning a value when the matrix element equals the first identifier value and the text contains keywords related to handrails is to map the semantics related to foldable handrails to the grid cell containing the handrail. Assigning a value when the matrix element equals the second identifier value and the text contains keywords related to the emergency call button is to map the semantics related to the emergency call button to the grid cell containing the button. Assigning a value when the matrix element equals the third identifier value and the text contains keywords related to occlusion is to map the semantics involving occlusion or coverage states to the rotation-related grid cells. This allows the second initial matrix to form a dialogue statement spatial association matrix that simultaneously reflects the spatial layout and the current dialogue focus.

[0058] S2044: Define the second initial matrix after the assignment is completed as the dialogue statement-space association matrix.

[0059] It should be noted that the second initial matrix after the assignment is completed is defined as the dialogue statement spatial association matrix because after the matrix elements are assigned values, each matrix element no longer only represents the occupancy status of the grid cell, but comprehensively reflects the correspondence between the keyword information contained in the current dialogue statement text and the grid cell categories in the micro-spatial structure matrix. That is, the position in the matrix assigned a value of one indicates that there is an association between the current dialogue statement and the corresponding spatial cell, while the position that remains at zero indicates that the current dialogue statement does not involve the corresponding spatial cell. Thus, the matrix can express the mapping result between language content and spatial layout in the form of structured data, so it is defined as the dialogue statement spatial association matrix.

[0060] In embodiments of the present invention, by obtaining the spatial correlation matrix of dialogue statements, the semantic content in the user's current round of dialogue and the relationship between each grid unit in the planar area are uniformly expressed in matrix form, thereby achieving clear positioning of the user's focus object and its corresponding spatial location. This processing method can reduce the uncertainty of semantic judgment of pure text.

[0061] S3: Multiply the dialogue statement-space association matrix and the occlusion marker matrix element by matrix element to obtain the occlusion attention matrix.

[0062] In one possible implementation, S3 specifically includes sub-steps S301 to S305: S301: Construct the third initial matrix based on the micro-space structure matrix.

[0063] It should be noted that the third initial matrix refers to a two-dimensional matrix with the same number of rows and columns as the micro-space structure matrix. Each element of the third initial matrix corresponds one-to-one with a grid cell in the planar region and is in an unmarked state during construction.

[0064] Specifically, the micro-spatial structure matrix is ​​obtained, and its row and column numbers are read. A third initial matrix is ​​then established, which is a two-dimensional matrix that is identical to the micro-spatial structure matrix in terms of row and column numbers. Each element in the third initial matrix corresponds one-to-one with the element at the same row and column index in the micro-spatial structure matrix. Then, the third initial matrix is ​​initialized by traversing all its elements in row and column index order and assigning each element a value of zero, thus placing the third initial matrix in the initial state of the unmarked occlusion region.

[0065] S302: When the matrix element of the micro-space structure matrix is ​​equal to the third identifier value, the corresponding matrix element in the third initial matrix is ​​assigned a value of 1; otherwise, the corresponding matrix element in the third initial matrix is ​​assigned a value of 0.

[0066] Specifically, the third identifier value is obtained. The third identifier value is a numerical marker in the micro-space structure matrix used to represent the grid cells related to the foldable armrest rotation area. Then, all matrix elements of the micro-space structure matrix are traversed in row and column index order. For each row and column, the matrix element of the micro-space structure matrix is ​​read and it is determined whether it is equal to the third identifier value. When the determination result is yes, the matrix element in the third initial matrix with the same row and column index is located and the matrix element is assigned a value of one. When the determination result is no, the matrix element in the third initial matrix with the same row and column index is located and its value is kept as zero or assigned a value of zero, until the determination and assignment of all row and column index positions of the micro-space structure matrix are completed, thus obtaining a third initial matrix with a value of one at the position corresponding to the third identifier value and zero values ​​at the other positions.

[0067] Specifically, by judging the positions in the micro-spatial structure matrix that are equal to the third identifier value and assigning a value of one to the corresponding positions in the third initial matrix, while assigning a value of zero to positions that are not equal to the third identifier value, the purpose is to extract the grid cells related to the foldable handrail's swivel sweeping area from the overall spatial structure and clearly mark them in binary form. This transforms the complex spatial category information into a simplified representation that only indicates whether it belongs to the swivel influence area. This allows the third initial matrix to intuitively reflect which grid cells are in the area that may cause occlusion and which grid cells are not in the area. This provides a clear basis for region selection for subsequent element-wise multiplication operations with the dialogue statement spatial association matrix, thereby achieving an accurate judgment on whether the current dialogue involves an occlusion area.

[0068] S303: Define the third initial matrix after the assignment is completed as the masking mark matrix.

[0069] It should be noted that the occlusion marker matrix refers to the two-dimensional data structure corresponding to each grid cell in the planar area. This matrix is ​​used to represent the spatial distribution that the foldable handrail may cover or affect during the rotation process. Matrix elements with a value of one indicate that the corresponding grid cell is within the foldable handrail's rotation sweep range and may obstruct the accessibility of the emergency call button. Matrix elements with a value of zero indicate that the corresponding grid cell is not within the rotation sweep range. Thus, the spatial coverage area generated by the handrail's rotation is structurally expressed in the planar area in matrix form, which is used for subsequent determination and calculation of occlusion relationships.

[0070] It should be noted that the third initial matrix after the assignment is completed is defined as the occlusion marker matrix because after the matrix elements are assigned, a value in this matrix only appears in the micro-spatial structure matrix at the position equal to the third identifier value. This makes the position of a value in the matrix correspond one-to-one with the grid cell corresponding to the foldable handrail's rotating sweeping area, while the zero value position corresponds to the grid cell that does not belong to this area. Therefore, this matrix no longer only represents a general initial data structure, but is specifically used to mark which grid cells in the planar area are within the range that may cause occlusion. By naming it the occlusion marker matrix, its data meaning and purpose can be clearly defined.

[0071] S304: Multiply the matrix elements of the dialogue statement-space association matrix and the matrix elements of the masking mark matrix to obtain the product result.

[0072] It should be noted that the product operation refers to the element-wise multiplication of the elements of the dialogue statement space association matrix and the masking mark matrix at the same row and column index positions. The product operation result refers to the two-dimensional matrix data formed after element-wise multiplication.

[0073] Specifically, the spatial association matrix and the occlusion marker matrix of the dialogue statement are obtained. Then, a product result matrix is ​​constructed, which is a two-dimensional matrix with the same number of rows and columns as the two matrices mentioned above. Next, all matrix elements of the spatial association matrix and the occlusion marker matrix are traversed in row and column index order. For each row and column, the corresponding element value in the spatial association matrix and the corresponding element value in the occlusion marker matrix are read, and element-wise multiplication is performed to obtain the product result. Positions where the product result is one indicate that the grid cell is associated in the current dialogue statement and simultaneously within the occlusion marker region. Positions with a zero value indicate that the grid cell does not satisfy the above simultaneous condition.

[0074] S305: Construct the occlusion concern matrix based on the product operation results.

[0075] It should be noted that the occlusion attention matrix is ​​a two-dimensional matrix constructed based on the product operation result. A value in the occlusion attention matrix is ​​used to indicate that the grid cell associated with the current dialogue statement is also within the occlusion mark region, and a zero value in the occlusion attention matrix is ​​used to indicate that the current dialogue statement is not associated with a grid cell within the occlusion mark region.

[0076] Specifically, firstly, the spatial association matrix of the dialogue statement and the occlusion marker matrix are obtained, and a two-dimensional matrix with the same number of rows and columns as the occlusion attention matrix is ​​constructed. Then, the position indices corresponding to all grid cells are traversed in row and column index order. For each row and column, the matrix element value at the corresponding position in the spatial association matrix of the dialogue statement and the matrix element value at the corresponding position in the occlusion marker matrix are read. The element-wise product operation is performed on the two matrix element values ​​to obtain the product operation result at that position. Then, when the product operation result is equal to a value, the matrix element at the same row and column index position in the occlusion attention matrix is ​​assigned a value of one. When the product operation result is not equal to a value, the matrix element at the same row and column index position in the occlusion attention matrix is ​​assigned a value of zero. This process is repeated until the assignment of all row and column index positions is completed, thus obtaining the occlusion attention matrix.

[0077] In embodiments of the present invention, by constructing a masking attention matrix, the uncertainty caused by abstract judgment based solely on text content can be avoided, thereby improving the accuracy of the correlation analysis between dialogue semantics and spatial layout.

[0078] S4: Based on the occlusion attention matrix, control the routing method of the business nodes corresponding to the human-computer dialogue to obtain the human-computer dialogue result.

[0079] In one possible implementation, S4 specifically includes sub-steps S401 to S406: S401: Construct a finite set of states based on the occlusion attention matrix and the business nodes corresponding to the human-computer dialogue.

[0080] It should be noted that the business node corresponding to human-computer dialogue refers to the specific business processing node to which the dialogue content is assigned during the current human-computer interaction process. This indicates that the current dialogue is in a business processing stage such as order processing, emergency explanation, or emergency response. The finite state set refers to the discrete state set formed by the combination relationship between the occlusion attention matrix and business nodes. This set is used to represent several internal states that human-computer dialogue may be in at different times.

[0081] Specifically, the occlusion attention matrix is ​​obtained, and its row and column numbers are read. All elements of the occlusion attention matrix are traversed in row and column index order. The grid cell positions corresponding to the matrix elements with a value of one are counted. The set of grid cell positions is then combined with the business node corresponding to the current human-computer dialogue to form a state description. The business node is obtained by identifying the business processing entry point in the current dialogue process. The identification process includes obtaining the current business node identifier and mapping it to a distinguishable node category label. Subsequently, the combined and encoded state descriptions are deduplicated. All deduplicated state descriptions are summarized to form a finite state set, where each state in the finite state set corresponds to a combination of an occlusion attention matrix value distribution and a business node category label.

[0082] S402: Based on the routing method of business nodes, construct a limited set of actions.

[0083] It should be noted that the routing method of a business node refers to the path selection method for switching the dialogue from one business node to another during human-computer interaction. The finite action set refers to the discrete action set abstracted from the routing method of the business node, used to represent several executable routing control actions.

[0084] Specifically, the process involves obtaining a set of business nodes and identifying the executable routing methods between them. Routing methods are determined by reading the reachability relationships between business nodes, which are obtained by organizing the allowed node jump paths in the business process. These paths are stored as pairs of records containing the starting business node identifier and the target business node identifier. Each routing method is then defined as an action description, which must include at least the starting and target business node identifiers. All action descriptions are deduplicated, and then aggregated to form a finite set of actions.

[0085] S403: Construct a reinforcement learning matrix based on a finite set of states and a finite set of actions.

[0086] It should be noted that a reinforcement learning matrix is ​​a two-dimensional matrix constructed with a finite set of states as the matrix rows and a finite set of actions as the matrix columns, where the matrix elements are used to record the value data corresponding to performing a certain action in a certain state.

[0087] Specifically, the number of states in the finite set of states is read, a finite set of actions is obtained, and the number of actions in the finite set of actions is read. A two-dimensional matrix is ​​constructed based on the number of states and actions as the reinforcement learning matrix, so that the rows of the reinforcement learning matrix correspond to the states in the finite set of states, and the columns of the reinforcement learning matrix correspond to the actions in the finite set of actions. Subsequently, the reinforcement learning matrix is ​​initialized by traversing all elements of the reinforcement learning matrix in row and column index order and assigning each element a value of 0. A correspondence is established between state numbers and matrix row indices, and between action numbers and matrix column indices. The correspondence is recorded by mapping each state number to a unique row index and each action number to a unique column index.

[0088] S404: Based on the occlusion attention matrix and the business nodes corresponding to the human-computer dialogue, select states from a finite set of states to obtain the target state of the reinforcement learning matrix.

[0089] It should be noted that state selection refers to the process of determining the corresponding state from a finite set of states based on the current occlusion attention matrix and the current service node. The target state refers to the state obtained through state selection and used to locate a row in the reinforcement learning matrix.

[0090] Specifically, the occlusion attention matrix for the current round is obtained, and its elements are traversed in row and column index order. The set of grid cell positions corresponding to the matrix elements with a value of 1 is extracted, and the business node identifier corresponding to the current human-computer dialogue is obtained. Then, the set of grid cell positions and the business node identifier are combined and encoded to form the current state description. Then, state selection processing is performed in the finite state set. The state selection processing reads the state description corresponding to each state in the finite state set one by one and compares it with the current state description. When a state description is consistent with the current state description, the state is determined as the target state and its state number is output. When no state description is consistent with the current state description, the current state description is added to the finite state set and a new state number is assigned to it. After obtaining the target state, the matrix row in the reinforcement learning matrix corresponding to the target state is determined according to the correspondence between the state number and the matrix row index, thus obtaining the target state of the reinforcement learning matrix.

[0091] S405: Select the target action from the matrix rows corresponding to the target state in the reinforcement learning matrix.

[0092] It should be noted that a matrix row refers to a row of matrix elements in the reinforcement learning matrix that corresponds to a specific state. A target action refers to the action selected from the matrix row corresponding to the target state and used to control the routing method of business nodes.

[0093] Specifically, based on the target state obtained in step S404, the matrix row corresponding to the target state is determined. This determination process involves finding the correspondence between the state number and the matrix row index based on the target state's state number, thereby locating the target matrix row in the reinforcement learning matrix. Then, all matrix elements in the target matrix row are traversed in column index order. The value of each matrix element in each column is read and compared with the recorded optimal value. During the first read, the first matrix element value is recorded as the current optimal value, and its corresponding column index is recorded as the current optimal column index. In subsequent reads, when a matrix element value is greater than the current optimal value, the current optimal value and its current optimal column index are updated, until all matrix elements in the target matrix row have been traversed. After the traversal is complete, the action number corresponding to the current optimal column index is determined as the target action.

[0094] S406: Based on the target action, control the routing method of the business node to obtain the human-computer dialogue result.

[0095] It should be noted that the human-computer dialogue result refers to the interactive output result after the dialogue is routed to the corresponding business node and the corresponding business content is output after the target action is executed.

[0096] Specifically, the process involves obtaining the action description corresponding to the target action from a finite set of actions, and reading the starting business node identifier and the target business node identifier from the action description. Then, the business node identifier corresponding to the current human-computer dialogue is obtained and used as the starting business node identifier for verification. When the current business node identifier matches the starting business node identifier, routing control processing is executed. This involves switching the business node corresponding to the current human-computer dialogue from the starting business node to the target business node, and calling the business processing content corresponding to the target business node to generate output information for the current round. After completing the business node switching, the human-computer dialogue result is obtained based on the business processing content of the target business node. The human-computer dialogue result includes the text response content output by the target business node and the execution result of the business operation triggered by the target business node.

[0097] In embodiments of the present invention, by obtaining the human-computer dialogue results, the actions selected in the reinforcement learning matrix can be directly applied to the actual dialogue process.

[0098] S5: Based on the results of the human-computer dialogue, update the reinforcement learning matrix to obtain the updated reinforcement learning matrix.

[0099] In one possible implementation, S5 specifically includes sub-steps S501 to S503: S501: Based on the results of human-computer dialogue, evaluate the target action to obtain a reward value.

[0100] It should be noted that reward evaluation refers to the process of evaluating the performance of a target action based on the results of human-computer dialogue. The reward value refers to the numerical data obtained through the reward evaluation process, used to represent the degree of effectiveness of the target action in the current state.

[0101] Specifically, the process involves obtaining the action description of the target action and determining the target business node to which the target action points. Then, it retrieves the human-computer dialogue result generated after executing the target action and parses the output content and business execution record within the dialogue result. The output content includes the user-facing response text, and the business execution record includes whether the business node routing is complete, whether the business request is accepted, whether the business operation produces a valid result, and whether the key fields of the valid result are complete. The process also involves obtaining the business node after executing the target action and determining whether it is equal to the target business node. If they are equal, the routing execution is recorded as successful; otherwise, it is recorded as a failure. If the routing execution is successful, the process determines whether the business operation corresponding to the target business node is complete based on the business execution record. This determination includes checking whether a completion marker exists in the business execution record and whether there is an output field corresponding to the completion marker. If the business operation is complete, the business execution is recorded as successful; otherwise, it is recorded as a failure. Subsequently, based on the output content, it is determined whether the current dialogue maintains a business context consistent with the target business node. This determination includes segmenting the response text and matching it word-by-word with the keyword table corresponding to the target business node. If a matching term exists, context consistency is recorded as successful; otherwise, it is recorded as unsuccessful. After obtaining the routing execution result, business execution result, and context consistency result, the reward evaluation result is represented as a reward value. The reward value is obtained by summing the above three types of results, where each type of result is recorded as one value when it is successful or unsuccessful, and zero value when it is unsuccessful or unsuccessful. This yields the reward value used for updating the reinforcement learning matrix.

[0102] S502: Based on the occlusion attention matrix and business nodes after the target action is executed, the updated state of the human-computer dialogue is obtained.

[0103] It should be noted that the occlusion attention matrix after executing the target action refers to the matrix data recalculated based on the new dialogue statement spatial association and occlusion marker information after the target action is completed. The updated state refers to the state description formed by combining the new occlusion attention matrix with the new business nodes after executing the target action.

[0104] Specifically, the occlusion attention matrix after the target action is executed is obtained, and all matrix elements are traversed in row and column index order. The grid cell positions corresponding to the matrix elements with a value of 1 are extracted, and the grid cell positions are summarized into a grid position set in the form of position pairs composed of row and column numbers. At the same time, the business node identifiers corresponding to the human-computer dialogue after the target action is executed are obtained and converted into node category tags to ensure consistency with the node descriptions in the state set. Subsequently, an updated state description is constructed. The updated state description is formed by concatenating the grid position set and the node category tags in a fixed field order. The fixed field order includes writing the node category tags first and then writing the grid position set, or writing the grid position set first and then writing the node category tags. The field order is kept consistent in the same state description to ensure state comparability. Then, state localization processing is performed on the finite set of states. This process involves reading the state description corresponding to each state in the finite set one by one and comparing it field by field with the updated state description. When a state description is found to be completely identical to the updated state description, the state is determined to be the updated state and its state number is output. When no state description is found to be completely identical to the updated state description, the updated state description is added to the finite set and a new state number is assigned to it. Finally, the obtained state number and the state description corresponding to that state number are used together as the updated state output for the human-computer dialogue.

[0105] S503: Based on the current state, updated state, target action, and reward value of the human-computer dialogue, update the reinforcement learning matrix to obtain the updated reinforcement learning matrix.

[0106] It should be noted that the current state of human-computer dialogue refers to the state description formed by combining the current occlusion attention matrix and the current business node before executing the target action. The updated reinforcement learning matrix refers to the new matrix data obtained after adjusting the corresponding matrix elements in the original reinforcement learning matrix by combining the current state, the updated state, the target action, and the reward value.

[0107] Specifically, a reinforcement learning matrix is ​​obtained, along with an update counting matrix with the same row and column structure. The elements of the update counting matrix record the number of times each state number and action number combination is updated. Then, the state number of the current state, the state number of the updated state, and the action number of the target action are obtained. The row index corresponding to the current state and the row index corresponding to the updated state are determined based on the correspondence between state numbers and matrix row indices. Similarly, the column index corresponding to the target action is determined based on the correspondence between action numbers and matrix column indices. Next, the matrix element at the intersection of the current state's row index and the target action's column index is read as the value to be updated. Simultaneously, the matrix element at the same intersection position in the update counting matrix is ​​incremented by one to obtain the update count. The learning weight is calculated based on this update count, taking the reciprocal of the update count to ensure that the more times the same state-action combination is updated, the smaller the magnitude of a single update. Subsequently, all matrix elements corresponding to the row index of the updated state are read from the reinforcement learning matrix, and the largest element value is determined as the subsequent value reference value. A discount weight is calculated based on historical dialogue transition records. These records consist of multiple triples, each including at least the previous state number, the executed action number, and a flag indicating whether subsequent dialogue rounds have occurred. The discount weight is obtained by filtering historical dialogue transition records where the previous state number equals the current state number and the executed action number equals the target action number, and then calculating the ratio of the number of records with the flag indicating subsequent dialogue rounds is true to the total number of filtered records. This ensures that the discount weight reflects the experience proportion of dialogue progression under this state-action combination. After obtaining the learning weight, discount weight, reward value, and subsequent value reference value, an update target value is generated. The update target value is equal to the sum of the reward value, the discount weight multiplied by the subsequent value reference value. Finally, a linear correction is performed on the value to be updated. The difference between the value to be updated and the target value is multiplied by the learning weight and added to the value to be updated to obtain the updated matrix element value. This updated matrix element value is then written back to the matrix element at the intersection position of the reinforcement learning matrix, thus obtaining the updated reinforcement learning matrix.

[0108] In embodiments of the present invention, the updated reinforcement learning matrix can provide a continuously optimized data foundation for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes.

[0109] S6: Based on the updated reinforcement learning matrix, obtain the updated node weight vector.

[0110] In one possible implementation, S6 specifically includes sub-steps S601 to S607: S601: Select the final action from the updated reinforcement learning matrix.

[0111] It should be noted that the final action refers to the action identifier selected from the matrix row corresponding to the current state in the updated reinforcement learning matrix, which has the best numerical value or satisfies the predetermined selection rules.

[0112] Specifically, the updated reinforcement learning matrix and the current state number of the current human-computer dialogue are obtained. Based on the correspondence between the state number and the matrix row index, the matrix row corresponding to the current state in the updated reinforcement learning matrix is ​​located. Then, all matrix elements in the matrix row are traversed in column index order. The value of each matrix element in each column is read and compared. During the first read, the first matrix element value is recorded as the current optimal value, and the corresponding column index is recorded as the current optimal column index. In subsequent reads, when a read matrix element value is greater than the current optimal value, the current optimal value and the current optimal column index are updated, until all matrix elements in the matrix row have been traversed. After the traversal is complete, the action number corresponding to the current optimal column index is determined as the final action.

[0113] S602: Obtain the set of business nodes for multi-round human-computer dialogue.

[0114] It should be noted that the set of business nodes in a multi-turn human-computer dialogue refers to a collection of multiple business processing units that can be invoked or routed in the current dialogue process, with each business processing unit corresponding to a specific business function module.

[0115] Specifically, the process involves obtaining a business process description file or business configuration table for multi-turn human-computer dialogue. This file or table records the node identifiers, node names, and node call entry information for available business nodes. The process is then parsed, reading each recorded business node information line by line. The node identifier in each business node entry is registered as a unique identifier, and the node name and node call entry information are associated with the node identifier. After reading and registering all business node information, all registered node identifiers are aggregated to form a business node set. This set is then deduplicated; if duplicate node identifiers exist, the first registered node identifier is retained, and the duplicate entries are deleted. Finally, the set of business nodes used for multi-turn human-computer dialogue routing control is output.

[0116] S603: Obtain the node weight vector corresponding to the set of business nodes.

[0117] It should be noted that the node weight vector refers to a numerical sequence that corresponds one-to-one with the set of business nodes. Each value represents the priority or selection tendency of the corresponding business node in the current dialogue process.

[0118] Specifically, the process involves obtaining a set of business nodes and determining their order. This order is achieved either by arranging nodes according to the order recorded in the business process description file or business configuration table, or by lexicographical order of node identifiers. This order is then used as the index order of the node weight vector. Next, a node weight vector is constructed. This node weight vector is a one-dimensional numerical sequence with the same number of elements as the number of business nodes in the set. Then, historical interaction records of multi-round human-computer dialogues are obtained. These records include at least the business node identifier corresponding to each round of dialogue and a marker indicating whether the business node produced an output result in that round. The weight of each business node is calculated based on these historical records. This calculation includes counting the number of times each business node was routed in the historical interaction records and the number of times it produced an output result when routed. The ratio of the number of output results produced to the number of times routed is used as the weight value of that business node and written into the node weight vector at the position corresponding to that business node, thus obtaining the node weight vector corresponding to the set of business nodes.

[0119] S604: Determine the correspondence between the finite set of actions and the set of business nodes.

[0120] It should be noted that the correspondence refers to the mapping table established between the action identifiers in the finite action set and the business processing units in the business node set. This mapping table is used to convert the action selection result into a specific business node invocation object.

[0121] Specifically, a finite set of actions is obtained, and the action description for each action in the finite set is determined. The action description must at least include a starting business node identifier and a target business node identifier. Then, a set of business nodes is obtained, and the set of node identifiers within it is extracted, serving as the object for validating the node identifiers in the action descriptions. Next, a mapping table is constructed to record the mapping relationship between action identifiers and business node identifiers. The construction process includes traversing each action in the finite set in order of action number, reading the target business node identifier for that action, and searching for a node identifier in the business node set that matches the target business node identifier. When a match is found, the action number and the target business node identifier are written into the mapping table to form a mapping record. When a match is not found, the process continues to read the next action until all actions have been traversed. After the mapping table is constructed, an integrity check is performed on the mapping table. The integrity check includes confirming that the business node identifier for each mapping record in the mapping table exists in the business node set, and the mapping table that passes the check is output as the mapping relationship between the finite set of actions and the set of business nodes.

[0122] S605: Based on the final action, find the correspondence between the finite set of actions and the set of business nodes to obtain the target business node.

[0123] It should be noted that the target business node refers to the business processing unit that matches the final action after the corresponding relationship is found.

[0124] Specifically, the process involves obtaining the action number of the final action and a mapping table between the finite set of actions and the set of business nodes. This mapping table records the mapping between action numbers and target business node identifiers. A lookup process is then performed in this table, reading each action number in the storage order of the mapping records and comparing it with the action number of the final action. If a match is found, the target business node identifier in that mapping record is read and identified as the target business node identifier, and the reading of subsequent mapping records is stopped. After obtaining the target business node identifier, the process searches for a business node entry in the set that matches the target business node identifier. The node name and node call entry information corresponding to this business node entry are read, and the business node entry containing the target business node identifier, node name, and node call entry information is identified as the target business node output.

[0125] S606: Based on the target business node, perform routing control on the set of all business nodes.

[0126] It should be noted that routing control refers to the process of switching or pointing to the processing path in the set of currently available service nodes according to the target service node.

[0127] Specifically, the process involves acquiring the target business node and reading its node call entry information. This entry information indicates the call path required to switch dialogue processing to the target business node during multi-turn dialogues. Next, the business node identifier corresponding to the current human-computer dialogue is acquired and compared with the target business node identifier. If they do not match, routing control is executed. This involves switching the current dialogue processing entry point from the current business node to the node call entry point of the target business node, and registering the target business node identifier as the business node identifier corresponding to the current human-computer dialogue. After the business node switching is completed, an available and unavailable status flag is set for each business node in the business node set. The status flag corresponding to the target business node is set to available, while the status flags of the remaining business nodes are set to unavailable. This restricts subsequent dialogue processing to be handled only by the target business node. The dialogue output content for the current round is then generated based on the target business node, thus completing the routing control of the business node set.

[0128] S607: After the routing control is completed, the node weight vector is adjusted based on the target service node to obtain the updated node weight vector.

[0129] It should be noted that the updated node weight vector refers to the new numerical sequence formed after the routing control is completed and the corresponding values ​​in the original node weight vector are adjusted according to the target service node. It is used to reflect the changes in the relative priority of each service node in subsequent dialogues.

[0130] Specifically, the process involves obtaining a set of business nodes and confirming a one-to-one correspondence between the node weight vectors and the set of business nodes in terms of index order. Then, the business node identifier of the target business node is obtained, and a node entry matching the business node identifier is searched within the set of business nodes to determine the target index position. Next, the dialogue feedback record after the routing control process ends is obtained. This record includes at least a marker indicating whether the target business node generated dialogue output, a marker indicating whether the corresponding business operation of the target business node was completed, and a marker indicating whether the user continued to initiate requests around the target business node in the subsequent dialogue round. These markers are then converted into evaluation values ​​of the same dimension and summed to obtain the target business node's contribution value for this round. Subsequently, each business node in the business node set is traversed. For the weight element corresponding to the target index position, this weight element is combined with the current round's contribution value to calculate the target weight correction amount, which is then added to the weight element to form the updated target weight value. For weight elements corresponding to non-target index positions, the flags indicating whether the business node was routed in the current round of dialogue and whether it generated output content are obtained, and the current round's contribution value of the business node is obtained accordingly. This current round's contribution value is combined with the corresponding weight element to calculate the weight correction amount of the business node, which is then written back to the corresponding weight element, thus completing the update of all elements of the node weight vector. After the update is completed, the updated node weight vector is normalized. Normalization involves calculating the sum of all elements of the updated node weight vector and dividing each weight element by the sum of the elements to make the weight elements form a comparable relative proportion. Finally, the normalized node weight vector is output as the updated node weight vector.

[0131] Specifically, after obtaining the updated node weight vector, it is used as the basis for prioritizing and dynamically scheduling business nodes in subsequent multi-round human-computer dialogues. Specifically, when a new dialogue round arrives, the set of business nodes is sorted based on the weight values ​​in the node weight vector. Business nodes with higher weight values ​​are given priority to be included in the candidate processing range. When there are multiple selectable business nodes, the calling order or the proportion of computing resources allocated is determined according to the weight value. This allows business nodes that have performed well in historical interactions to have a higher probability of being selected in subsequent dialogues, while suppressing business nodes with poor response performance. This achieves the goal of continuously optimizing and adaptively adjusting the business routing path, making the multi-round human-computer dialogue process gradually more stable and in line with the needs of actual use cases.

[0132] In embodiments of the present invention, by obtaining the updated node weight vector, the selection of business nodes no longer depends on fixed rules or manual configuration, but can be dynamically adjusted based on the user's actual interaction performance in multi-round human-computer dialogue.

[0133] Reference manual attached Figure 2 The diagram shows a schematic of the structure of the dynamic routing and weight adaptive control system for multi-turn human-computer dialogue nodes provided in an embodiment of the present invention.

[0134] This invention provides a dynamic routing and weight adaptive control system 20 for multi-turn human-computer dialogue nodes, including: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-mentioned dynamic routing and weight adaptive control method for multi-turn human-computer dialogue nodes and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0135] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0136] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DRRAM).

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes, characterized in that, include: S1: Based on the planar area of ​​the accessible toilet cubicle, determine the target grid cell and obtain the micro-space structure matrix based on the target grid cell; S2: Based on the micro-space structure matrix and the current dialogue text, obtain the dialogue statement-space correlation matrix; S3: Multiply the dialogue statement-space association matrix and the occlusion marker matrix element by matrix element to obtain the occlusion attention matrix; S4: Based on the masking attention matrix, control the routing method of the business nodes corresponding to the human-computer dialogue to obtain the human-computer dialogue result; S5: Based on the results of the human-computer dialogue, update the reinforcement learning matrix to obtain the updated reinforcement learning matrix; S6: Based on the updated reinforcement learning matrix, obtain the updated node weight vector.

2. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 1, characterized in that, The determination of target grid cells in the planar area based on accessible hygiene partitions in S1 specifically includes: S101: Obtain the planar area of ​​the accessible toilet cubicle and divide the planar area into multiple grid cells; S102: Based on the rotation range of the foldable handrail in the planar area, determine the set of grid cells in the planar area that intersect with the rotation trajectory of the foldable handrail; S103: In the set of grid cells, identify the target grid cell that overlaps with the location of the emergency call button.

3. The multi-turn human-computer dialogue node dynamic routing and weight adaptive control method according to claim 2, characterized in that, The micro-space structure matrix obtained based on the target grid cell in S1 specifically includes: S104: Obtain the first installation position of the foldable handrail in the planar area; S105: Obtain the second installation location of the emergency call button in the planar area; S106: Construct the first initial matrix based on all grid cells; S107: Based on the mesh elements corresponding to the first installation position and the second installation position and the target mesh element, assign values ​​to the matrix elements of the first initial matrix to obtain the micro-space structure matrix.

4. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 1, characterized in that, S2 specifically includes: S201: Obtain the text of the current dialogue statement from the user's dialogue statement in the current round; S202: Perform keyword matching on the current dialogue text to obtain the set of keywords associated with the handrail, the set of keywords associated with the emergency call button, and the set of keywords associated with the obscured domain; S203: Construct the second initial matrix based on the micro-space structure matrix; S204: Based on the micro-space structure matrix, assign values ​​to the matrix elements of the second initial matrix to obtain the dialogue statement-space association matrix.

5. The multi-turn human-computer dialogue node dynamic routing and weight adaptive control method according to claim 4, characterized in that, S204 specifically includes: S2041: When the matrix element of the micro-space structure matrix is ​​equal to the first identifier value, and the current dialogue text contains any keyword in the handrail-related keyword set, the corresponding matrix element in the second initial matrix is ​​assigned a value of 1. S2042: When the matrix element of the micro-space structure matrix is ​​equal to the second identifier value, and the current dialogue text contains any keyword in the set of keywords associated with the emergency call button, assign the corresponding matrix element in the second initial matrix a value of 1. S2043: When the matrix element of the micro-space structure matrix is ​​equal to the third identifier value, and the current dialogue text contains any keyword in the masking domain associated keyword set, the corresponding matrix element in the second initial matrix is ​​assigned a value of 1. S2044: Define the second initial matrix after the assignment is completed as the dialogue statement-space association matrix.

6. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 1, characterized in that, S3 specifically includes: S301: Construct the third initial matrix based on the micro-space structure matrix; S302: When the matrix element of the micro-space structure matrix is ​​equal to the third identifier value, the corresponding matrix element in the third initial matrix is ​​assigned a value of 1; otherwise, the corresponding matrix element in the third initial matrix is ​​assigned a value of 0. S303: Define the third initial matrix after the assignment is completed as the masking mark matrix; S304: Multiply the matrix elements of the dialogue statement-space association matrix and the matrix elements of the masking mark matrix to obtain the product result; S305: Construct the occlusion concern matrix based on the product operation results.

7. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 1, characterized in that, S4 specifically includes: S401: Construct a finite set of states based on the occlusion attention matrix and the business nodes corresponding to the human-computer dialogue; S402: Based on the routing method of business nodes, construct a limited set of actions; S403: Construct a reinforcement learning matrix based on a finite set of states and a finite set of actions; S404: Based on the occlusion attention matrix and the business nodes corresponding to the human-computer dialogue, select states from a finite set of states to obtain the target state of the reinforcement learning matrix; S405: Select the target action from the rows of the reinforcement learning matrix corresponding to the target state; S406: Based on the target action, control the routing method of the business node to obtain the human-computer dialogue result.

8. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 7, characterized in that, S5 specifically includes: S501: Based on the results of human-computer dialogue, perform a reward evaluation on the target action to obtain a reward value; S502: Based on the occlusion attention matrix and business nodes after the target action is executed, the updated state of the human-computer dialogue is obtained; S503: Based on the current state, updated state, target action, and reward value of the human-computer dialogue, update the reinforcement learning matrix to obtain the updated reinforcement learning matrix.

9. The method for dynamic routing and weight adaptive control of multi-turn human-computer dialogue nodes according to claim 7, characterized in that, S6 specifically includes: S601: Select the final action from the updated reinforcement learning matrix; S602: Obtain the set of business nodes for multi-round human-computer dialogue; S603: Obtain the node weight vector corresponding to the set of business nodes; S604: Determine the correspondence between the finite set of actions and the set of business nodes; S605: Based on the final action, find the correspondence between the finite set of actions and the set of business nodes to obtain the target business node; S606: Based on the target service node, perform routing control on the set of all service nodes; S607: After the routing control is completed, the node weight vector is adjusted based on the target service node to obtain the updated node weight vector.

10. A dynamic routing and weighted adaptive control system for multi-turn human-computer dialogue nodes, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the multi-turn human-computer dialogue node dynamic routing and weight adaptive control method as described in any one of claims 1 to 9.