A method, system, terminal, and storage medium for reasoning about text information.

By converting floating-point feature vectors into binary sequences and performing Boolean matching masks and recursive calculations on the edge device, the performance and accuracy issues in text information reasoning on the edge device are solved, and efficient text information reasoning is achieved.

CN122088697APending Publication Date: 2026-05-26SHENZHEN HUATUO WEIYE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HUATUO WEIYE TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient information reasoning performance, low accuracy, and low efficiency when performing text information reasoning on edge devices. This is mainly due to the high number of memory accesses, large memory consumption, and insufficient utilization of computing resources.

Method used

By employing feature extraction, bit mapping, and recursive computation, floating-point feature vectors are converted into binary sequences, and Boolean matching masks and the longest common suffix length are recursively calculated. This reduces the number of main memory accesses and memory usage, thereby improving computational efficiency.

Benefits of technology

It significantly reduces memory access and power consumption, improves inference accuracy and efficiency, breaks through the memory bandwidth bottleneck, and achieves efficient text information inference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122088697A_ABST
    Figure CN122088697A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, terminal, and storage medium for reasoning about text information. The method includes: acquiring long text information of a target application; extracting features from the long text information to obtain a floating-point feature vector; converting the floating-point feature vector to obtain a binary sequence; performing bit mapping on the binary sequence to obtain a packaged query vector; performing logical operations on the packaged query vector to obtain a Boolean matching mask; recursively calculating the Boolean matching mask to obtain the longest common suffix length state; and performing text reasoning based on the longest common suffix length state to obtain a long text reasoning result. This invention reduces the number of main memory accesses and memory usage while improving the reasoning efficiency and accuracy of context information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information reasoning technology, and in particular to a reasoning method, system, terminal, and computer-readable storage medium for text information. Background Technology

[0002] With the development of artificial intelligence technology, large language models are gradually migrating from cloud deployment to edge devices. In edge devices such as smartphones, in-vehicle terminals, and wearable devices, more and more applications need to complete complex reasoning tasks in a local environment, such as long text intelligent question answering and professional document analysis.

[0003] However, due to the physical constraints of edge devices in terms of power consumption, memory capacity and storage bandwidth, existing technologies cannot reduce the number of accesses to main memory and the scale of data accessed during text information inference. As a result, memory bandwidth has become a key bottleneck restricting edge inference performance. In order to reduce memory usage, historical context states are compressed or aggregated, which leads to lower accuracy of subsequent inference results and insufficient utilization of computing resources, resulting in low inference efficiency.

[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0005] The main objective of this invention is to provide a method, system, terminal, and storage medium for reasoning text information, aiming to solve the problems of insufficient information reasoning performance, low accuracy of information reasoning results, and low reasoning efficiency in the existing technology when reasoning text information.

[0006] To achieve the above objectives, the present invention provides a method for reasoning about text information, which includes the following steps: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and transform the floating-point feature vector to obtain a binary sequence; The binary sequence is bit-mapped to obtain a packaged query vector, and logical operations are performed on the packaged query vector to obtain a Boolean matching mask. The Boolean matching mask is recursively calculated to obtain the longest common suffix length state, and text reasoning is performed based on the longest common suffix length state to obtain the long text reasoning result.

[0007] Optionally, the text information reasoning method, wherein obtaining long text information of the target application, extracting features from the long text information to obtain a floating-point feature vector, and converting the floating-point feature vector to obtain a binary sequence, specifically includes: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and calculate local features of the floating-point feature vector by means of arithmetic mean to obtain a dynamic threshold; All dimensional components of the floating-point feature vector are compared with the dynamic threshold to obtain the comparison result, and a binary sequence is generated based on the comparison result.

[0008] Optionally, the text information reasoning method, wherein performing bit mapping processing on the binary sequence to obtain a packaged query vector, and performing logical operations on the packaged query vector to obtain a Boolean matching mask, specifically includes: Obtain a machine word with a preset bit width, and perform bit-block mapping on the binary sequence according to the machine word with the preset bit width to obtain a packaged query vector; Obtain the key vector sequence from the historical memory, and perform an XOR operation on the key vector sequence and the packaged query vector to obtain the operation result; If all binary bits in the operation result are preset values, then a Boolean matching mask is generated based on the operation result.

[0009] Optionally, in the text information reasoning method, the step of performing bit-block mapping on the binary sequence based on the preset bit-width machine word specifically includes: ; in, For packaged machine text, To map to the first in the machine word The binary feature of the bit, For bit index.

[0010] Optionally, in the text information reasoning method, the recursive calculation of the Boolean matching mask specifically includes: ; in, The length of consecutive matches at the current moment. The binary matching result determined based on the Boolean matching mask. The length of consecutive matches at historical moments. For the current time step, This is a step in historical time.

[0011] Optionally, the text information reasoning method, wherein the step of performing text reasoning based on the longest common suffix length state to obtain a long text reasoning result specifically includes: The index is confirmed based on the longest common suffix length status to obtain the historical time step index, and feature matching is performed based on the historical time step index to obtain the historical value features. Linear projection is performed on the historical value features to obtain the target projection result, and text reasoning is performed based on the target projection result to obtain the long text reasoning result.

[0012] Optionally, in the text information reasoning method, the step of performing feature matching based on the historical time step index specifically includes: ; in, Historical value features For historical time steps, For normalized activation functions, The length of consecutive matches at the current moment. It is a value vector corresponding to the historical time step stored in the value memory.

[0013] Optionally, the reasoning method for the text information includes a reasoning system comprising: The feature processing module is used to acquire long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and perform transformation processing on the floating-point feature vector to obtain a binary sequence. The sequence mapping module is used to perform bit mapping processing on the binary sequence to obtain a packaged query vector, and to perform logical operations on the packaged query vector to obtain a Boolean matching mask; The text reasoning module is used to recursively calculate the Boolean matching mask to obtain the longest common suffix length state, and to perform text reasoning based on the longest common suffix length state to obtain the long text reasoning result.

[0014] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a text information reasoning program stored in the memory and executable on the processor, wherein when the text information reasoning program is executed by the processor, it implements the steps of the text information reasoning method as described above.

[0015] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a text information reasoning program, which, when executed by a processor, implements the steps of the text information reasoning method as described above.

[0016] In this invention, long text information of the target application is acquired, features are extracted from the long text information to obtain floating-point feature vectors, and the floating-point feature vectors are transformed to obtain binary sequences. Bit mapping is performed on the binary sequences to obtain packaged query vectors, and logical operations are performed on the packaged query vectors to obtain Boolean matching masks. The Boolean matching masks are recursively calculated to obtain the longest common suffix length state, and text inference is performed based on the longest common suffix length state to obtain the long text inference result. This invention reduces the number of main memory accesses and memory usage while improving the inference efficiency and accuracy of context information. Attached Figure Description

[0017] Figure 1 This is a flowchart of a preferred embodiment of the text information reasoning method of the present invention; Figure 2 This is a schematic diagram of the overall process of the text information reasoning method of the present invention; Figure 3 This is a structural diagram of a preferred embodiment of the text information reasoning system of the present invention; Figure 4 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0020] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0021] With the development of artificial intelligence technology, large language models are gradually migrating from cloud deployment to edge devices. In edge devices such as smartphones, in-vehicle terminals, and wearable devices, an increasing number of applications need to complete complex reasoning tasks in a local environment, such as intelligent question answering of long texts and professional document analysis. However, limited by the physical constraints of edge devices in terms of power consumption, memory capacity, and storage bandwidth, existing technologies still face several technical challenges, making it difficult to simultaneously meet the requirements of real-time performance, energy efficiency, and inference accuracy. (1) Memory access and power consumption issues exist in edge-side inference scenarios: Existing technologies typically store historical context information in floating-point or fixed-point form. As the context length increases during inference, the amount of historical context information occupied in main memory grows linearly. In the actual inference process, for each new output result generated, the processor needs to frequently read a large amount of historical context information from main memory to complete context-related calculations. For edge devices, such high-frequency and large-scale memory access leads to significant main memory access latency, making it difficult for the inference response time to meet the real-time interaction requirements. Moreover, the DRAM read / write power consumption is much higher than the computing power consumption, resulting in low overall energy efficiency. (2) State maintenance issues exist in long context processing scenarios: In edge-side inference applications, such as long document analysis and continuous dialogue understanding, the model usually needs to maintain effective perception of historical information over a long period of time. In order to reduce memory consumption, existing technologies compress or aggregate historical context states; however, when the context sequence is long, this approach can easily lead to the early key information being covered or weakened during the state update process, thus affecting the accuracy of subsequent inference results. (3) Insufficient utilization of computing resources in general-purpose edge processors: Existing edge inference frameworks are mainly designed around floating-point or fixed-point multiplication and addition operations, with low utilization of bitwise logic operation instructions in the calculation process, resulting in long-term idle hardware resources in the processor used to perform bitwise operations. This uneven utilization of computing resources prevents edge devices from fully leveraging the potential performance advantages of the processor in bit-level parallel processing when performing inference tasks, thus limiting further improvement in overall inference efficiency.

[0022] Therefore, this invention proposes a reasoning method for text information to overcome the problems of insufficient information reasoning performance, low accuracy of information reasoning results, and low reasoning efficiency in the existing technology when reasoning about text information.

[0023] The text information reasoning method described in the preferred embodiment of the present invention, such as... Figure 1 As shown, the reasoning method for the text information includes the following steps: Step S10: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and perform conversion processing on the floating-point feature vector to obtain a binary sequence.

[0024] Specifically, in the embodiments of the present invention, the corresponding processing procedure is as follows: Figure 2 As shown, long text information of the target application is obtained, and features are extracted from the long text information to obtain a floating-point feature vector. The floating-point feature vector is an intermediate feature representation extracted from the current input context by the neural network pre-computation module, implicitly expressing its contextual semantic information. After obtaining the floating-point feature vector, dynamic feature binarization processing is required. This involves receiving the current floating-point feature vector, calculating the local statistical feature value of the floating-point feature vector as a dynamic threshold, and converting the floating-point feature vector into a binary sequence. Specifically, firstly, the dynamic threshold of the floating-point feature vector needs to be calculated. The corresponding calculation methods include calculating the arithmetic mean of all dimensions of the floating-point feature vector, calculating the median or quantile of the floating-point feature vector, and calculating statistical parameters based on layer normalization. In this invention, the dynamic threshold is preferably calculated based on the arithmetic mean of the floating-point feature vector. That is, the dynamic threshold is obtained by performing local feature calculation on the floating-point feature vector using the arithmetic mean method. The corresponding expression is: ; in, For dynamic thresholds, The dimension of the floating-point feature vector. The first eigenvector of the floating-point eigenvector The method based on the arithmetic mean of floating-point feature vectors has low computational complexity, is suitable for real-time inference on the edge, does not rely on additional statistical caching or sorting operations, and can effectively reflect the overall distribution characteristics of the current input features.

[0025] Next, a binarization operation is required. Specifically, all dimensional components of the floating-point feature vector are compared with the dynamic threshold to obtain the comparison result, which is expressed as follows: ; in, For the generated first 1 bit The function is an indicator function; it is 1 if the condition is met, and 0 otherwise. Finally, a binary sequence is generated based on the comparison result.

[0026] Step S20: Perform bit mapping processing on the binary sequence to obtain a packaged query vector, and perform logical operations on the packaged query vector to obtain a Boolean matching mask.

[0027] Specifically, after obtaining the binary sequence, bit-packing mapping needs to be performed. The binary sequence is divided into blocks according to a machine word of a predetermined bit width. Specifically, a machine word of a predetermined bit width (e.g., 32-bit, 64-bit, 128-bit, or 256-bit) is obtained, and the binary sequence is bit-blocked according to the machine word of the predetermined bit width to obtain a packed query vector. The corresponding expression is: ; in, For packaged machine text, To map to the first in the machine word The binary feature of the bit, The first step is to use a bit index. Then, using the processor's Single Instruction Multiple Data Extended (SIDML) instruction, parallel bitwise logic operations are performed on the packed query vector and the already packed key vector sequence in the historical memory to generate a Boolean matching mask representing the matching status. The corresponding processing modes include exact matching mode and approximate matching mode. This invention preferably uses exact matching mode, specifically, obtaining the key vector sequence from the historical memory, performing an XOR operation on the key vector sequence and the packed query vector to obtain the result, the corresponding expression of which is: ; ; in, Let be the difference vector; if two vectors are identical, then... Each of the digits should be 0. To package query vectors, For bitwise XOR operation, the result is 0 for the same bits and 1 for different bits. For key vectors, To represent the bit-level matching results between the packaged query vector and the key vector, when When true, it means that at the current comparison granularity, the two satisfy the preset matching conditions; when If the result is false, it indicates that the two do not meet the matching conditions. If all binary bits in the operation result are preset values ​​(e.g., 0), a Boolean matching mask is generated based on the operation result. The effect of using the exact matching mode is the shortest calculation path and the lowest power consumption, making it most suitable for resource-constrained edge devices. To achieve extreme efficiency on edge devices, this invention uses a 128-bit register to process two packed integers (i.e., 12 feature dimensions) at once. In this way, the CPU can complete hundreds of floating-point comparison equivalent logic operations per clock cycle with extremely low power consumption.

[0028] Step S30: Recursively calculate the Boolean matching mask to obtain the longest common suffix length state, and perform text reasoning based on the longest common suffix length state to obtain the long text reasoning result.

[0029] Specifically, after obtaining the Boolean matching mask, a streaming state update is required. This involves calculating the longest common suffix length (LCS) state between the current time step and the historical sequence based on the Boolean matching mask using a recursive state update algorithm. Specifically, the Boolean matching mask is recursively calculated to obtain the LCS state, and the corresponding expression is: ; in, The length of consecutive matches at the current moment. The value is 0 or 1, representing the binary matching result determined by the Boolean matching mask. The length of consecutive matches at historical moments. For the current time step, This is a step in historical time.

[0030] Subsequently, to ensure a cold start for the recursive logic, the system... Initialize the state matrix at each time step Set all as well as This indicates that the length of consecutive common suffixes is zero in the absence of any historical matches. When the length of the historical sequence exceeds the preset window size, the compressed historical memory adopts a circular overlay strategy; in the specific implementation, the historical key vector and its corresponding value vector are stored in a circular buffer. When the historical time step exceeds the buffer capacity, its logical index in memory is calculated as follows: ; in, For logical indexes, The default window size. For modulo operations; when an overwrite occurs in the circular buffer, the longest common suffix state corresponding to the overwritten logical index is synchronously reset to 0 to avoid old historical states interfering with the current inference result.

[0031] If the current time matches If the current continuous length is equal to the length of the previous time step plus 1, then the current continuous length is equal to the length of the previous time step plus 1; if the current time step does not match... If the continuity is interrupted, the length is reset to 0. This recursive structure is a typical state machine, which does not need to review earlier history, but only needs the "state of the previous moment", thus ensuring the time complexity of reasoning.

[0032] Next, the index is confirmed based on the longest common suffix length state to obtain the historical time step index, and feature matching is performed based on the historical time step index to obtain the historical value features. The corresponding expression is: ; in, Historical value features For historical time steps, For normalized activation functions, The length of consecutive matches at the current moment. The historical value features are stored in the value memory as value vectors corresponding to the historical time steps; the historical value features are linearly projected to obtain the target projection result, and text reasoning is performed based on the target projection result to obtain the long text reasoning result.

[0033] The technical effects that this invention can bring are as follows: (1) Breaking the "memory wall" to achieve a double release of bandwidth and capacity: By compressing the KV Cache (key-value cache) from FP16 (half-precision floating-point, 16 bits) to 1-bit Int64, the video memory usage is reduced by 16 times. For a model with a context window of 128k, it originally required several GB of video memory, but now only a few hundred MB are needed; it also reduces the amount of DRAM read and write, significantly reduces dynamic power consumption, and extends the battery life of the device; (2) Extremely high inference throughput: By utilizing SIMD (Single Instruction Multiple Data) parallel bitwise operations, the inference latency no longer increases computational complexity with the increase of context length; (3) Full-link bit-packed data stream: The input dynamic feature vector is also converted into a packaged integer stream in real time, which means that there are almost no floating-point numbers inside the inference engine, which completely changes the format of data interaction; (4) Lossless streaming state update: By using a recursive state update algorithm based on the "Longest Common Suffix (LCS)," this algorithm does not need to backtrack the history. It can accurately maintain the global context information by relying only on the matching result at the current moment and the state at the previous moment, thus realizing true low-complexity reasoning.

[0034] Furthermore, such as Figure 3 As shown, based on the above-mentioned reasoning method for text information, the present invention also provides a reasoning system for text information, wherein the reasoning system for text information includes: The feature processing module 51 is used to acquire long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and perform transformation processing on the floating-point feature vector to obtain a binary sequence. The sequence mapping module 52 is used to perform bit mapping processing on the binary sequence to obtain a packaged query vector, and to perform logical operations on the packaged query vector to obtain a Boolean matching mask; The text reasoning module 53 is used to recursively calculate the Boolean matching mask to obtain the longest common suffix length state, and to perform text reasoning based on the longest common suffix length state to obtain the long text reasoning result.

[0035] Furthermore, such as Figure 4 As shown, based on the above-mentioned reasoning method for text information, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 4 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0036] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a text information reasoning program 40, which can be executed by the processor 10 to implement the text information reasoning method of this application.

[0037] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing reasoning methods for the text information.

[0038] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface.

[0039] In one embodiment, when the processor 10 executes the reasoning program 40 of the text information in the memory 20, the following steps are performed: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and transform the floating-point feature vector to obtain a binary sequence; The binary sequence is bit-mapped to obtain a packaged query vector, and logical operations are performed on the packaged query vector to obtain a Boolean matching mask. The Boolean matching mask is recursively calculated to obtain the longest common suffix length state, and text reasoning is performed based on the longest common suffix length state to obtain the long text reasoning result.

[0040] Specifically, the steps of obtaining long text information of the target application, extracting features from the long text information to obtain a floating-point feature vector, and converting the floating-point feature vector to obtain a binary sequence include: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and calculate local features of the floating-point feature vector by means of arithmetic mean to obtain a dynamic threshold; All dimensional components of the floating-point feature vector are compared with the dynamic threshold to obtain the comparison result, and a binary sequence is generated based on the comparison result.

[0041] Specifically, the step of performing bit-mapping processing on the binary sequence to obtain a packaged query vector, and performing logical operations on the packaged query vector to obtain a Boolean matching mask, includes: Obtain a machine word with a preset bit width, and perform bit-block mapping on the binary sequence according to the machine word with the preset bit width to obtain a packaged query vector; Obtain the key vector sequence from the historical memory, and perform an XOR operation on the key vector sequence and the packaged query vector to obtain the operation result; If all binary bits in the operation result are preset values, then a Boolean matching mask is generated based on the operation result.

[0042] Specifically, the bit-block mapping of the binary sequence based on the preset bit-width machine word involves: ; in, For packaged machine text, To map to the first in the machine word The binary feature of the bit, For bit index.

[0043] Specifically, the recursive calculation of the Boolean matching mask involves: ; in, The length of consecutive matches at the current moment. The binary matching result determined based on the Boolean matching mask. The length of consecutive matches at historical moments. For the current time step, This is a step in historical time.

[0044] Specifically, the step of performing text reasoning based on the longest common suffix length state to obtain a long text reasoning result includes: The index is confirmed based on the longest common suffix length status to obtain the historical time step index, and feature matching is performed based on the historical time step index to obtain the historical value features. Linear projection is performed on the historical value features to obtain the target projection result, and text reasoning is performed based on the target projection result to obtain the long text reasoning result.

[0045] Specifically, the feature matching based on the historical time step index includes: ; in, Historical value features For historical time steps, For normalized activation functions, The length of consecutive matches at the current moment. It is a value vector corresponding to the historical time step stored in the value memory.

[0046] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a text information reasoning program, which, when executed by a processor, implements the steps of the text information reasoning method as described above.

[0047] In summary, this invention provides a method, system, terminal, and storage medium for reasoning about text information. The method includes: acquiring long text information of a target application; extracting features from the long text information to obtain a floating-point feature vector; converting the floating-point feature vector to obtain a binary sequence; performing bit mapping on the binary sequence to obtain a packaged query vector; performing logical operations on the packaged query vector to obtain a Boolean matching mask; recursively calculating the Boolean matching mask to obtain the longest common suffix length state; and performing text reasoning based on the longest common suffix length state to obtain a long text reasoning result. This invention reduces the number of main memory accesses and memory usage while improving the reasoning efficiency and accuracy of context information.

[0048] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0049] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0050] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for reasoning about textual information, characterized in that, The reasoning method for the text information includes: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and transform the floating-point feature vector to obtain a binary sequence; The binary sequence is bit-mapped to obtain a packaged query vector, and logical operations are performed on the packaged query vector to obtain a Boolean matching mask. The Boolean matching mask is recursively calculated to obtain the longest common suffix length state, and text reasoning is performed based on the longest common suffix length state to obtain the long text reasoning result.

2. The reasoning method for textual information according to claim 1, characterized in that, The process of acquiring long text information from the target application, extracting features from the long text information to obtain a floating-point feature vector, and converting the floating-point feature vector to obtain a binary sequence specifically includes: Obtain long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and calculate local features of the floating-point feature vector by means of arithmetic mean to obtain a dynamic threshold; All dimensional components of the floating-point feature vector are compared with the dynamic threshold to obtain the comparison result, and a binary sequence is generated based on the comparison result.

3. The reasoning method for textual information according to claim 1, characterized in that, The step of performing bit-mapping processing on the binary sequence to obtain a packaged query vector, and then performing logical operations on the packaged query vector to obtain a Boolean matching mask, specifically includes: Obtain a machine word with a preset bit width, and perform bit-block mapping on the binary sequence according to the machine word with the preset bit width to obtain a packaged query vector; Obtain the key vector sequence from the historical memory, and perform an XOR operation on the key vector sequence and the packaged query vector to obtain the operation result; If all binary bits in the operation result are preset values, then a Boolean matching mask is generated based on the operation result.

4. The reasoning method for textual information according to claim 3, characterized in that, The bit-block mapping of the binary sequence based on the preset bit-width machine word specifically involves: ; in, For packaged machine text, To map to the first in the machine word The binary feature of the bit, For bit index.

5. The reasoning method for textual information according to claim 1, characterized in that, The recursive calculation of the Boolean matching mask is specifically as follows: ; in, The length of consecutive matches at the current moment. The binary matching result determined based on the Boolean matching mask. The length of consecutive matches at historical moments. For the current time step, This is a step in historical time.

6. The reasoning method for textual information according to claim 1, characterized in that, The step of performing text reasoning based on the longest common suffix length state to obtain a long text reasoning result specifically includes: The index is confirmed based on the longest common suffix length status to obtain the historical time step index, and feature matching is performed based on the historical time step index to obtain the historical value features. Linear projection is performed on the historical value features to obtain the target projection result, and text reasoning is performed based on the target projection result to obtain the long text reasoning result.

7. The reasoning method for textual information according to claim 6, characterized in that, The feature matching based on the historical time step index specifically involves: ; in, Historical value features For historical time steps, For normalized activation functions, The length of consecutive matches at the current moment. It is a value vector corresponding to the historical time step stored in the value memory.

8. A reasoning system for textual information, characterized in that, The reasoning system for the text information includes: The feature processing module is used to acquire long text information of the target application, extract features from the long text information to obtain a floating-point feature vector, and perform transformation processing on the floating-point feature vector to obtain a binary sequence. The sequence mapping module is used to perform bit mapping processing on the binary sequence to obtain a packaged query vector, and to perform logical operations on the packaged query vector to obtain a Boolean matching mask; The text reasoning module is used to recursively calculate the Boolean matching mask to obtain the longest common suffix length state, and to perform text reasoning based on the longest common suffix length state to obtain the long text reasoning result.

9. A terminal, characterized in that, The terminal includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the reasoning method for text information as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program thereon, and the reasoning program for text information stores a reasoning program for text information. When the reasoning program for text information is executed by a processor, it implements the steps of the reasoning method for text information as described in any one of claims 1-7.