Social media speech site detection method based on conjugate chain reasoning and intelligent gating function

By using conjugated chain inference and intelligent gating function methods in position detection, complementary parallel inference chains and reference nodes are constructed, which solves the problems of instability and inefficiency in the existing technology, and achieves a more efficient, stable and accurate position detection effect.

CN119940556AActive Publication Date: 2025-05-06CHENGDU YUNZHONGLE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510433379.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-05-06
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

The existing position detection method based on large language models has problems such as inference instability, inefficiency and insufficient information utilization.

Method used

Using a method based on conjugated chain inference and intelligent gating function, dynamic interaction and conditional fusion are achieved by constructing two complementary parallel inference chains (support chain and opposition chain) and an independent reference node, and the inference termination condition is determined through the scoring function.

Benefits of technology

It improves the efficiency and stability of position detection, enhances the accuracy and robustness of reasoning, avoids excessive reasoning, and ensures the credibility of the final result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940556A_ABST
    Figure CN119940556A_ABST
Patent Text Reader

Abstract

The invention discloses a social media speech site detection method based on conjugate chain reasoning and an intelligent gating function, and relates to the field of natural language processing. According to the method, the parallelization of the reasoning process is realized by constructing the two parallel conjugate vertical chains, and the reasoning time is effectively shortened. And on the other hand, the reasoning maturity is comprehensively reflected through a scoring function, and when the score exceeds a preset upper threshold value or is lower than a lower threshold value, the system immediately stops the link extension and determines that the vertical field of the text is'support 'or'opposite'. According to the mechanism, excessive reasoning is effectively avoided, and the reasoning efficiency is improved. According to the method, a dynamic interaction and conditional fusion mechanism is introduced, and the two links can influence and correct each other in the reasoning process, so that the reasoning efficiency is improved, and the stability is enhanced. In the arbitration stage, the system can synthesize information of the two links and the reference node to generate a final node, and robustness and credibility of a reasoning result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing (NLP), and in particular to a social media speech stance detection method based on conjugate chain reasoning and intelligent gating function. Background Art

[0002] Stance detection is an important task in natural language processing, which aims to determine the attitude of a text towards a target (such as a person, event, opinion, etc.). With the advancement of large language model-related technologies, natural language processing subfields such as stance detection and sentiment analysis are increasingly using large language model-based methods. Most existing stance detection methods rely on a single reasoning chain or independent multi-chain reasoning. Although they can complete basic tasks, they have the following problems:

[0003] (1) The reasoning process is lengthy and unstable, often relying on manually specified thinking steps.

[0004] (2) In multi-chain scenarios, there is little interaction between reasoning chains, and the reasoning results of each chain are not fully utilized.

[0005] (3) There is often a lack of an efficient termination mechanism, which can easily lead to over-inference and reduce reasoning efficiency and robustness. Summary of the invention

[0006] The purpose of the present invention is to propose a method of comprehensive reasoning using an independent reference node plus two complementary parallel reasoning chains (conjugate position chains) to detect the position expressed by social media speech in view of the instability of reasoning, low efficiency and insufficient information utilization in the current position detection technology based on large language models. Previous methods often rely on single-link reasoning, the reasoning process is lengthy and unstable, and there is an over-computation phenomenon; and although the multi-link method can be reasoned in parallel, it lacks a flexible link interaction mechanism and is difficult to fully utilize the information in each link. The present invention constructs two complementary parallel links: a support chain and an opposition link, initializes the two opposing viewpoints of support and opposition as the initial nodes of the two links, and guides the large model to continuously and synchronously deepen and correct the viewpoints on two different viewpoints, so as to reach a consistent conclusion. External knowledge injection is performed each time the next step of reasoning (link extension) is performed, and the adjacent link viewpoint is dynamically selected according to the level of confidence of the complementary link to achieve dynamic interaction and conditional fusion within the link. At the same time, combined with the bottom-up auxiliary role of the reference node, the instability of the long link is prevented. This "conjugate chain" mechanism enables the two links to influence each other and deepen the viewpoints during the reasoning process, thus achieving the "depth" of reasoning. The introduction of external knowledge and reference nodes expands the "breadth" of information, and together they can improve the accuracy and stability of reasoning.

[0007] However, an overly long reasoning chain will reduce detection efficiency and bring instability. In order to solve this problem, the present invention has designed a scoring function and its gating mechanism. The function comprehensively evaluates the consistency of the positions and the overall position between the independent reference node and the latest nodes of the two links, and gives a score. The higher the absolute value of the score, the higher the degree of consensus the system has reached on a certain point of view. The positive and negative signs of the score represent the polarity of the position (support or opposition). Therefore, when the three nodes reach a high degree of consistency during the reasoning process, the link extension can be terminated in advance, and the final node (representing the final conclusion) can be generated to improve the reasoning efficiency. Finally, the final node generation stage integrates the information of the two links and the reference nodes to ensure the robustness and credibility of the reasoning results.

[0008] The present invention aims to provide a more efficient, more stable and more intelligent solution for stance detection in natural language processing.

[0009] The technical solution of the present invention is as follows:

[0010] A method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function, comprising the following steps:

[0011] Step S1: For the given text to be detected and the target, generate the initial nodes of two opposing position links and an independent reference node respectively, and set the upper limit L of the link length and the upper threshold of the gating mechanism and lower threshold ;

[0012] Step S2: Before the next step of reasoning, dynamic external knowledge injection is performed to supplement the two links with question-knowledge pairs according to the conclusion of the previous step;

[0013] Step S3: Combine external knowledge injection, conditionally interact with adjacent link arguments, perform reasoning and extend the link;

[0014] Step S4: Evaluate the latest nodes and reference nodes of the two links through the node stance scoring function, and select the next operation according to the result of the scoring function;

[0015] Step S5: When the link extension reaches the upper limit or the scoring function reaches a clear conclusion, the final node generation phase is entered; otherwise, steps S2-S4 are repeated;

[0016] Step S6: Integrate the two-link results and reference node information to construct a final node to represent the final reasoning result.

[0017] Furthermore, the step S1 specifically includes:

[0018] By specifying a stance, the large language model is called in sequence to generate support nodes and opposition nodes, which contain two opposing viewpoints as the initial nodes of the support chain and opposition chain respectively. In addition, an independent reference node without specifying a stance is generated separately.

[0019] Furthermore, the external knowledge injection method is specifically: using a large model or an external search tool to construct external knowledge composed of question-answer combinations by summarizing the latest nodes.

[0020] Furthermore, the interactive adjacent link arguments in step S3 are as follows:

[0021] When the confidence of the node generated in the previous round of the adjacent link is greater than the set confidence threshold, it is added together with the external knowledge to the reasoning of the current link to generate a new node and extend the link.

[0022] Furthermore, the node stance scoring function is specifically a gated scoring function, and the formula is as follows:

[0023] ;

[0024] in, Represents the node's position points, Represents the polarity of the node, which has three values: opposition, neutrality, and support; Represents the node confidence; , and Representing opposing chain nodes Position points, support chain nodes The position score of and the position score of reference node K; is the variance calculation function; when the score If it exceeds the upper threshold, the text is determined to be "supportive" of the target position; if it is lower than the lower threshold, the text is determined to be "opposed" to the target position; otherwise, go to the next step.

[0025] Furthermore, the node is defined as follows:

[0026] ;

[0027] in, Representative arguments, which summarize the explanatory textual arguments that produced the judgment in the form of a paragraph; Represents polarity, three values Respectively, they represent opposition, neutrality, and support; Represents confidence; these three variables are extracted simultaneously from the single-round output of the large model.

[0028] Furthermore, the generation of the nodes in step 1 is described by the following formula:

[0029] ;

[0030] in, , , They represent opposing nodes, supporting nodes, and reference nodes respectively; Represents a parameter Large language model; Represents the prompt word template used to guide the model to generate nodes with "opposition" stance when the opposition chain is initialized; Represents the prompt word template used to guide the model to generate nodes with a "support" stance when the support chain is initialized; Represents the prompt word template used to generate the reference node; Represents the text to be detected; Represents the stance target corresponding to the text.

[0031] Furthermore, the final node is as follows:

[0032] When the final node generation is triggered by the score calculated by the gated scoring function exceeding the threshold, the given symbol represents the final node argument, represents the final node polarity, then the final node The generation of is described by the following formula:

[0033] ;

[0034] in, Represents the sign function, which returns 1 if the input is positive and -1 if it is negative; represents the final actual length of the link, and They represent the final nodes of the opposition chain and the support chain respectively;

[0035] If the link cap triggers the generation of the final node, the large model is called to summarize the polarity and arguments at the same time, thus constructing the final node:

[0036] .

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. Reasoning efficiency. The present invention realizes the parallelization of the reasoning process by constructing two parallel conjugate position chains, which effectively shortens the reasoning time. Compared with the traditional single thinking chain method, it avoids the lengthy and unstable reasoning path and reduces the reliance on manually specified thinking steps. On the other hand, the present invention comprehensively reflects the maturity of reasoning through a scoring function. When the score exceeds the preset upper threshold or is lower than the lower threshold, the system will immediately terminate the link extension and determine the position of the text as "support" or "oppose". This mechanism effectively avoids excessive reasoning and improves the efficiency of reasoning.

[0039] 2. Accuracy and robustness. The present invention introduces dynamic interaction and conditional fusion mechanisms, so that the two links can influence and correct each other during the reasoning process, which not only improves the efficiency of reasoning, but also enhances stability. In the arbitration stage, the system will integrate the information of the two links and the reference node to generate the final node to ensure the robustness and credibility of the reasoning results. Compared with the prior art, the present invention can not only make accurate judgments in clear situations, but also maintain stable detection performance in complex or ambiguous situations, achieving more efficient, more stable and more intelligent stance detection.

[0040] 3. Innovative knowledge and link interaction mechanism. This invention introduces an external knowledge injection collaborative link interaction mechanism, which significantly enhances the depth and breadth of reasoning. During the reasoning process, the system will use a large model or external retrieval tool to construct external knowledge based on the needs of the latest nodes and inject it into the link reasoning. At the same time, the interaction logic between links ensures that the information of adjacent links can be effectively integrated, further improving the comprehensiveness of reasoning. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flowchart of a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function.

[0042] Figure 2 Schematic diagram of the data structure of the nodes used in the reasoning process.

[0043] Figure 3 Detailed flowchart of conjugate chain reasoning.

[0044] Figure 4 The figure is a schematic diagram of the interaction logic between links. DETAILED DESCRIPTION

[0045] The present invention is further described in detail below in conjunction with specific implementation modes, but the present invention is not limited to the following implementation modes.

[0046] Example 1

[0047] This embodiment provides a social media speech stance detection method based on conjugate chain reasoning and intelligent gating function. Figure 1 As shown, the following steps are included:

[0048] Step S1: For the given text to be detected and the target, generate the initial nodes of the two links and an independent reference node respectively, and set the upper limit L of the link length and the upper threshold of the gating mechanism and lower threshold ;

[0049] Specifically, by specifying a stance, the large language model is called in sequence to generate support nodes and opposition nodes, each containing two opposing viewpoints, as the initial nodes of the two links (support chain and opposition chain). In addition, an independent reference node without specifying a stance is generated separately.

[0050] like Figure 2 As shown, the node definition is as follows:

[0051]

[0052] in: Representative arguments, which summarize the explanatory textual arguments that produced the judgment in the form of a paragraph; Represents polarity, three values Respectively, they represent opposition, neutrality, and support; Represents confidence, indicating the confidence of the big model in the correctness of its own views. The three variables are extracted from the single-round output of the big model at the same time, and the specific details are set by the prompt words.

[0053] The generation of nodes can be described by the following formula:

[0054]

[0055] in, , , They represent opposing nodes, supporting nodes, and reference nodes respectively; Represents a parameter Large language model; Represents the prompt word template used to guide the model to generate nodes with "opposition" stance when the opposition chain is initialized; Represents the prompt word template used to guide the model to generate nodes with a "support" stance when the support chain is initialized; Represents the prompt word template used to generate the reference node; Represents the text to be detected; Represents the stance target corresponding to the text.

[0056] Step S2: Before the next step of reasoning, dynamic external knowledge injection is performed to supplement the two links with question-knowledge pairs based on the conclusion of the previous step. The specific method of obtaining external knowledge is as follows:

[0057] Using a large model or external retrieval tool, by summarizing the latest nodes, external knowledge composed of several question-answer combinations is constructed. The generation process can be described by the following formula:

[0058]

[0059]

[0060] in, Represents the latest node of one of the two links; Representative Node Questions that need to be answered to make inferences; Represents tools for acquiring knowledge, which can be large models or API tools such as online retrieval; Representatives on the issue The answer.

[0061] Step S3: Combined with external knowledge injection, conditionally interact with adjacent link arguments, perform reasoning and extend the link; specifically, if the confidence of the node generated in the previous round of the adjacent link is high enough, add it together with the external knowledge to the reasoning of the current link to generate a new node and extend the link. The specific process is described by the following formula (taking the opposing link as an example, the same applies to the other link):

[0062]

[0063] in, Represents the opposition chain node to be generated; and Representative Node Generate the required external questions and corresponding answers; Indicates the nodes obtained by the support chain in the previous round of generation; Representative Node Confidence.

[0064] Step S4: Evaluate the latest nodes and reference nodes of the two links through the node stance scoring function, and select the next operation according to the result of the scoring function;

[0065] The node stance scoring function is specifically a gated scoring function. The formula is as follows: the numerator is the sum of the stance scores of the three nodes, representing the overall sentiment stance of the system. The denominator can represent the degree of difference between the three nodes through the calculation of variance, and when there is a disagreement, the denominator is increased to suppress the calculated score:

[0066]

[0067] in, Represents the stance score of a node. The value indicates the intensity of emotion, and the positive or negative sign indicates the direction of emotion (support or opposition). , and Representing opposing chain nodes Position points, support chain nodes The position score of and the position score of reference node K; is the variance calculation function, which is used to evaluate the consistency of the three;

[0068] When the score exceeds the upper threshold The text is determined to be "supportive" of the target position, which is below the lower threshold. , then the text is determined to be "opposed" to the target. Otherwise, the next step is required.

[0069] Step S5: When the link extension reaches the upper limit or the scoring function reaches a clear conclusion, stop the reasoning and extension of the link and enter the final node generation stage; otherwise, repeat steps S2-S4; if the link length reaches the upper limit or the value of the gated scoring function exceeds the threshold, generate the final node. Otherwise, repeat steps S2-S4 to continue extending the link.

[0070] Step S6: Integrate the two-link results and reference node information to construct a final node to represent the final reasoning result.

[0071] Specifically, if the final node generation stage is triggered by the gated score reaching the threshold, it means that the three nodes have reached a consensus, so the final node polarity can be directly determined by the score, and only the evidence needs to be summarized in this stage. Otherwise, it is necessary to call a large model to summarize the polarity and arguments at the same time to construct the final node.

[0072] When the final node generation is triggered by the score calculated by the gated scoring function exceeding the threshold, the given symbol represents the final node argument, represents the final node polarity, then the final node The generation of can be described by the following formula:

[0073]

[0074] in, Represents the sign function, which returns 1 if the input is positive and -1 if it is negative; represents the final actual length of the link, and They represent the final nodes of the opposition chain and the support chain respectively.

[0075] If the link cap triggers the generation of the final node, the large model is called to summarize the polarity and arguments at the same time, thus constructing the final node:

[0076]

[0077] Example 2

[0078] Conjugate stance chain implementation.

[0079] This example shows the basic implementation of the present invention, using conjugate stance chains to perform inference detection of the target stance of the text. The large language model used has parameters , which can generate response replies based on input. The external knowledge acquisition tool is an intelligent agent constructed by the large model, which can quickly respond to the external information needs of the reasoning node and return relevant answers. Secondly, it is necessary to clarify the maximum length L of this reasoning, as well as the upper and lower thresholds of the gating mechanism, such as Figure 3 As shown, the following steps are included:

[0080] Step S1: initial node generation;

[0081] Enter text and goals , through the prompt template and Generate the initial nodes of the support chain respectively and the initial node of the opposing chain Using the prompt template Generate independent reference nodes , ensuring that even if there is a deviation between the two links, the system can still refer to independent views to assist in decision-making. The node form is defined as ,in represents the textual argument of the node, Indicates polarity, Indicates confidence; the specific node generation process is as follows:

[0082] Step S2: Reasoning based on knowledge interaction;

[0083] Based on the textual arguments of the current link node , generate questions through large language models , and use online search tools Get answers . Inject corresponding links to supplement the external knowledge required for the reasoning process.

[0084] When performing reasoning expansion on two links, check the confidence of the nodes on the adjacent links .like Figure 4As shown in ), taking its arguments and external knowledge as input to extend the current link: If the confidence is low, only the information of the current link is used for extension:

[0085] Step S3: scoring and termination judgment;

[0086] The newly generated node is evaluated by the scoring function Conduct a comprehensive assessment: in is the node stand score. According to the scoring results, if or Then stop reasoning and enter the final node generation stage; otherwise, continue to step S2.

[0087] Step S4: final node generation;

[0088] If the score exceeds the threshold, the final node polarity is generated directly: , and then call the big model to summarize the arguments of three nodes (two final link nodes and one reference node): If the link upper limit triggers the generation of the final node, it means that the link information is inconsistent and arbitration is required. At this time, the large model is called to comprehensively summarize the information of the two links and the reference node to generate the final node, and at the same time generate polarity and arguments.

[0089] In summary, the present invention provides an innovative, efficient and stable technical solution for stance detection tasks.

[0090] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.

Claims

1. A social media speech stance detection method based on conjugate chain reasoning and intelligent gating function, characterized in that: The following steps are involved: Step S1: For the given text to be detected and the target, generate the initial nodes of two opposing position links and an independent reference node respectively, and set the upper limit L of the link length and the upper threshold of the gating mechanism and lower threshold ; Step S2: Before the next step of reasoning, dynamic external knowledge injection is performed to supplement the two links with question-knowledge pairs according to the conclusion of the previous step; Step S3: Combine external knowledge injection, conditionally interact with adjacent link arguments, perform reasoning and extend the link; Step S4: Evaluate the latest nodes and reference nodes of the two links through the node stance scoring function, and select the next operation according to the result of the scoring function; Step S5: When the link extension reaches the upper limit or the scoring function reaches a clear conclusion, the final node generation phase is entered; Otherwise, repeat steps S2-S4; Step S6: Integrate the two-link results and reference node information to construct a final node to represent the final reasoning result.

2. According to claim 1, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The step S1 specifically includes: By specifying a stance, the large language model is called in sequence to generate support nodes and opposition nodes, which contain two opposing viewpoints as the initial nodes of the support chain and opposition chain respectively. In addition, an independent reference node without specifying a stance is generated separately.

3. According to claim 2, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The specific method of injecting external knowledge is: using a large model or an external search tool to construct external knowledge composed of a question-answer combination by summarizing the latest nodes.

4. According to claim 3, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The arguments for the interactive adjacent links in step S3 are as follows: When the confidence of the node generated in the previous round of the adjacent link is greater than the set confidence threshold, it is added together with the external knowledge to the reasoning of the current link to generate a new node and extend the link.

5. According to claim 4, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The node stance scoring function is specifically a gated scoring function, and the formula is as follows: ; in, Represents the node's position points, Represents the polarity of the node, which has three values: opposition, neutrality, and support; Represents the node confidence; , and Representing opposing chain nodes Position points, support chain nodes The position score of and the position score of reference node K; is the variance calculation function; when the score If the value exceeds the upper threshold, the text is determined to be "supportive" of the target; if the value is lower than the lower threshold, the text is determined to be "opposed" to the target; otherwise, go to the next step.

6. According to claim 5, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The node definition is as follows: ; in, Representative arguments, which summarize the explanatory textual arguments that produced the judgment in the form of a paragraph; Represents polarity, three values Respectively, they represent opposition, neutrality, and support; Represents confidence; these three variables are extracted simultaneously from the single-round output of the large model.

7. According to claim 6, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The generation of nodes in step 1 is described by the following formula: ; in, , , They represent opposing nodes, supporting nodes, and reference nodes respectively; Represents a parameter Large language model; Represents the prompt word template used to guide the model to generate nodes with "opposition" stance when the opposition chain is initialized; Represents the prompt word template used to guide the model to generate nodes with "support" stance when the support chain is initialized; Represents the prompt word template used to generate the reference node; Represents the text to be detected; Represents the stance target corresponding to the text.

8. According to claim 7, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The final nodes are as follows: When the final node generation is triggered by the score calculated by the gated scoring function exceeding the threshold, the given symbol represents the final node argument, represents the final node polarity, then the final node The generation of is described by the following formula: ; in, Represents the sign function, which returns 1 if the input is positive and -1 if it is negative; represents the final actual length of the link, and They represent the final nodes of the opposition chain and the support chain respectively; If the link cap triggers the generation of the final node, the large model is called to summarize the polarity and arguments at the same time, thus constructing the final node: 。 9. According to claim 8, a method for detecting social media speech stance based on conjugate chain reasoning and intelligent gating function is characterized in that: The confidence threshold is 4.

Citation Information

Patent Citations

  • Dialogue system using knowledge bases and language models for automotive systems and applications

    CN117725150A

  • Long context knowledge reasoning method based on large language model knowledge extraction and self-consistent thinking chain prompt

    CN119378685A

  • Smart contract creation and management using generative artificial intelligence with model merging

    US20240394705A1

  • Translation method, translation model training method, and electronic device

    WO2025065481A1

Cited By

  • Product comment detection method based on anti-provincial chain reasoning

    CN120179917A