Text processing method and device, computer equipment, storage medium and computer program product

By combining text recognition and key feature extraction with large language model and text compression, the problems of high computing resource consumption and low accuracy of large language model are solved, and more efficient acquisition of power object information is achieved.

CN119149723APending Publication Date: 2024-12-17CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411127082.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The high consumption of large language models on hardware computing resources leads to limited processing context length, and existing methods lead to problems of high overall complexity and low accuracy through small model preprocessing.

Method used

Through text recognition and key feature extraction, combined with large language model and text compression, the power object association information for power information query requests is obtained, and the compression process is performed to reduce the complexity of model calculations and improve the accuracy of information acquisition.

Benefits of technology

While reducing the computational complexity of the model, it improves the accuracy of power object information acquisition, solving the problems of high hardware computing resource consumption and low accuracy in large language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149723A_ABST
    Figure CN119149723A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text processing method and device, computer equipment, a storage medium and a computer program product, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring electric power object associated information of an electric power information query request for a to-be-queried electric power object; performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information; according to the at least one text slice, obtaining a key power feature of each text slice; and obtaining power object information corresponding to the to-be-queried power object according to the key power characteristics and power query text information associated with the to-be-queried power object contained in the power information query request. According to the method, the calculation complexity of the model can be reduced, and the accuracy of obtaining the power object information is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a text processing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] In some power scenarios, such as retrieval and question-answering, it is necessary to use a natural language model to obtain the corresponding answer information based on the query information. In order to improve the natural language processing capabilities, a large language model can be introduced to obtain the corresponding answer information based on the query information to complete the retrieval task and / or question-answering task. However, due to the reliance of the large language model on huge scale parameters, it leads to high consumption of hardware computing resources, which in turn causes the problem of context length limitation for its processing.

[0003] In current technology, a small model is generally used as an external model to perform data preprocessing on the input information of the large language model to reduce the high consumption of hardware computing resources by the large language model. However, this method will lead to problems of high overall complexity and weak model learning ability, and there is a problem of low accuracy. Summary of the invention

[0004] Based on this, it is necessary to provide a text processing method, apparatus, computer equipment, storage medium and computer program product to address the above technical issues.

[0005] In a first aspect, the present application provides a text processing method. The method comprises:

[0006] Obtaining power object associated information of a power information query request for a power object to be queried;

[0007] Performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0008] According to at least one of the text slices, acquiring key power features of each of the text slices;

[0009] The power object information corresponding to the power object to be queried is acquired according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request.

[0010] In one of the embodiments, obtaining the key power characteristics of each of the text slices based on at least one of the text slices includes: performing text recognition processing on each of the at least one text slice to obtain at least one text segmentation corresponding to each of the text slices; obtaining the key power characteristics of each of the text slices based on at least one of the text segments.

[0011] In one of the embodiments, obtaining the key power characteristics of each of the text slices based on at least one of the text segmentations includes: determining a weight value of each of the text segmentations; obtaining the key power characteristics of each of the text slices based on at least one of the text segmentations and the weight values ​​corresponding to each of the text segmentations.

[0012] In one of the embodiments, the key power feature of each text slice is obtained based on at least one of the text segmentations and the weight value corresponding to each of the text segmentations, including: performing weighted summation on at least one of the text segmentations according to the weight value corresponding to each of the text segmentations to obtain the corresponding key power feature of the text slice.

[0013] In one of the embodiments, obtaining power object information corresponding to the power object to be queried based on the key power feature and the power query text information associated with the power object to be queried contained in the power information query request includes: performing text recognition processing on the power query text information to obtain at least one query text segmentation corresponding to the power query text information; obtaining query segmentation entities corresponding to each of the query text segments, and relationship information between each of the query segmentation entities; obtaining the power object information corresponding to the power object to be queried based on the key power feature, the query segmentation entity and the relationship information.

[0014] In one of the embodiments, before obtaining the power object information corresponding to the power object to be queried, it also includes: determining the feature vector dimension of the key power feature; and converting the feature vector dimension into an adaptation vector dimension.

[0015] In a second aspect, the present application provides a text processing device. The device comprises:

[0016] An acquisition module, used for acquiring power object associated information of a power information query request for a power object to be queried;

[0017] A text recognition module, used for performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0018] A feature extraction module, used for acquiring key power features of each text slice according to at least one of the text slices;

[0019] The answer generation module is used to obtain the power object information corresponding to the power object to be queried according to the key power characteristics and the power query text information associated with the power object to be queried contained in the power information query request.

[0020] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0021] Obtaining power object associated information of a power information query request for a power object to be queried;

[0022] Performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0023] According to at least one of the text slices, acquiring key power features of each of the text slices;

[0024] The power object information corresponding to the power object to be queried is acquired according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request.

[0025] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0026] Obtaining power object associated information of a power information query request for a power object to be queried;

[0027] Performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0028] According to at least one of the text slices, acquiring key power features of each of the text slices;

[0029] The power object information corresponding to the power object to be queried is acquired according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request.

[0030] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0031] Obtaining power object associated information of a power information query request for a power object to be queried;

[0032] Performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0033] According to at least one of the text slices, acquiring key power features of each of the text slices;

[0034] The power object information corresponding to the power object to be queried is acquired according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request.

[0035] In the above-mentioned text processing method, device, computer equipment, storage medium and computer program product, the power object associated information of the power information query request for the power object to be queried is obtained; the power object associated information is subjected to text recognition processing to obtain at least one text slice of the power object associated information; based on the at least one text slice, the key power features of each text slice are obtained; based on the key power features and the power query text information associated with the power object to be queried contained in the power information query request, the power object information corresponding to the power object to be queried is obtained. In the method provided in the embodiment of the present application, a large language model and text compression can be combined. After obtaining the power object associated information for the power information query request, the power object associated information can be compressed, that is, text recognition and key feature extraction can be performed, and then, the power object information corresponding to the power object to be queried can be obtained. Based on this, the accuracy of obtaining power object information can be improved while reducing the complexity of model calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] FIG1 is a flow chart of a text processing method provided in an embodiment of the present application;

[0038] FIG2 is a schematic diagram of a process for obtaining key power characteristics of each text slice according to at least one text slice provided by an embodiment of the present application;

[0039] FIG3 is a schematic diagram of a process for obtaining key power features of each text slice according to the weight value of each text slice provided by an embodiment of the present application;

[0040] FIG4 is a schematic diagram of a process for obtaining power object information provided by an embodiment of the present application;

[0041] FIG5 is a structural block diagram of a text processing device provided in an embodiment of the present application;

[0042] FIG6 is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] In an exemplary embodiment, as shown in FIG1 , a text processing method is provided. This embodiment is illustrated by applying the method to a server. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0045] Step 102: acquiring power object associated information of a power information query request for a power object to be queried.

[0046] Among them, the embodiments of the present application can be applied to some power query scenarios, such as power retrieval scenarios and power question and answer scenarios. Take the application of the text processing method to the power retrieval scenario as an example for explanation. A user can register and log in to the power query system on the power business terminal. The user can trigger a login request on the power business terminal. The power business terminal can display a login interface in response to the login request. The power business terminal can enter a user name and password on the login interface to log in. Among them, the login method for the user to log in to the power business system may include but is not limited to applications, public accounts, applets, and web pages, etc., and this application does not limit this. If the user logs in successfully, a power information query request for the pending business can be triggered through the power query page of the power business terminal. The power business terminal can respond to the power information query request and send the power information query request to the system server of the power business system. The system server can obtain the corresponding power query text information of the power object to be queried according to the power information query request; next, the system server can perform text recognition processing on the power query text information to obtain at least one query text segmentation corresponding to the power query text information; further, according to the at least one query text segmentation, the power object association information corresponding to the power query text information can be obtained in multiple power databases associated with the power query system, and the power object association information can be the retrieval information of this retrieval query task, which is the power information associated with the power object to be queried and the power query text information.

[0047] Step 104: Perform text recognition processing on the power object association information to obtain at least one text slice of the power object association information.

[0048] Among them, in some possible implementations, the text recognition processing of the power object association information can be performed by natural language processing technology. The natural language processing technology is a technology that enables computers to understand, process and generate natural language. It involves a series of technologies and methods for analyzing, understanding and generating text or voice data. Generally, natural language processing technology can include: Lexical analysis: performing word segmentation, part-of-speech tagging and other processing on the text for subsequent semantic analysis and understanding. Syntactic analysis: analyzing the structure and grammatical relationship of the sentence, including the identification of sentence components, the construction of syntax trees, etc. Semantic analysis: understanding the meaning and semantic relationship of the text, including named entity recognition, semantic role labeling, relationship extraction, etc. Language model: establishing a statistical model of the language for tasks such as automatic completion, machine translation, and speech recognition. Information retrieval: by indexing and searching the text, the rapid retrieval and relevance ranking of the text are realized. Machine translation: a technology for automatically translating text in one language into another language. Text generation: generating text that conforms to grammatical and semantic rules according to given conditions and language models. Sentiment analysis: identifying the emotional tendency and emotional polarity in the text, such as positive, negative or neutral. In an embodiment of the present application, the power object association information can be subjected to lexical analysis, syntactic analysis and semantic analysis based on natural language technology, and finally, the power entity for the power object to be queried and the relationship between each power entity can be extracted from the power object association information. Among them, the power object association information can first be sliced ​​to obtain at least one text slice of the power object association information. The text slicing mainly involves the selective extraction and processing of text content, which is usually achieved through string slicing operations in programming languages. The starting index and the ending index for the power object association information can be set, and then, according to the starting index and the ending index, a substring can be sliced ​​in the character string of the power object association information to obtain at least one text slice.

[0049] Step 106: Acquire key power features of each text slice according to at least one text slice.

[0050] In this step, a pre-trained text processing model can be used to obtain the power object information corresponding to the power object to be queried according to at least one text slice. The text processing model may include a text compression module, an adaptation module, and an answer generation module. The text compression module may obtain the key power features of each text slice according to at least one text slice; the adaptation module may convert the feature vector dimension of the key power feature of each text slice into an adaptation vector dimension, which is a vector dimension that can be adapted to the input vector of the answer generation module; the answer generation module may obtain the power object information corresponding to the power object to be queried according to the key power features and the power query text information associated with the power object to be queried contained in the power information query request. Specifically, the text compression module obtains the key power features of each text slice based on at least one text slice, which may include: in a possible implementation, the text compression module may be an attention mechanism, first, at least one text slice of indefinite length may be converted into a numerical vector representation that satisfies a fixed length, then each text slice may be subjected to text recognition processing to obtain at least one text segmentation corresponding to each text slice, and determine the weight value corresponding to each text segmentation in the at least one text segmentation; further, based on the at least one text segmentation and the weight value corresponding to each text segmentation, redundant information and noise in the context may be efficiently filtered to extract key power features.

[0051] Step 108 : acquiring power object information corresponding to the power object to be queried according to the key power characteristics and the power query text information associated with the power object to be queried contained in the power information query request.

[0052] In this step, the answer generation module of the text processing model can be used to obtain the power object information corresponding to the power object to be queried according to the key power characteristics and the power query text information associated with the power object to be queried contained in the power information query request. The answer generation module can be a decoder. The answer generation module can obtain the query segmentation entities of each query text segmentation and the relationship information between each query segmentation entity according to at least one query text segmentation corresponding to the power query text information; further, the power object information corresponding to the power object to be queried can be obtained according to the key power characteristics, the query segmentation entity and the relationship information.

[0053] In the method of this embodiment, the power object associated information of the power information query request for the power object to be queried can be obtained; the power object associated information can be subjected to text recognition processing to obtain at least one text slice of the power object associated information; based on the at least one text slice, the key power features of each text slice can be obtained; based on the key power features and the power query text information associated with the power object to be queried contained in the power information query request, the power object information corresponding to the power object to be queried can be obtained. In the method provided by the embodiment of the present application, a large language model and text compression can be combined. After obtaining the power object associated information for the power information query request, the power object associated information can be compressed, that is, text recognition and key feature extraction can be performed, and then, the power object information corresponding to the power object to be queried can be obtained. Based on this, the accuracy of obtaining power object information can be improved while reducing the complexity of model calculation.

[0054] In an exemplary embodiment, as shown in FIG2 , step 106 may include steps 202 to 204. Among them:

[0055] Step 202: Perform text recognition processing on each text slice in at least one text slice to obtain at least one text segmentation corresponding to each text slice.

[0056] Among them, in some possible implementations, each text slice can be processed for text recognition by natural language processing technology, and each text slice can be processed for word segmentation by the following method: the text slice can be segmented to obtain multiple text characters of the text slice, for example, {equipment model of power equipment} can be segmented to obtain {"electricity", "power", "equipment", "equipment", "of", "equipment", "equipment", "model", "number"}; then, the multiple text characters can be matched and segmented based on the maximum matching algorithm, and the maximum matching algorithm (MMA) is an algorithm commonly used for Chinese word segmentation. Chinese word segmentation is the process of segmenting a continuous sequence of Chinese characters into meaningful words, and the maximum matching algorithm is one of the rule-based word segmentation methods. The basic idea of ​​the maximum matching algorithm is to select the longest word from the text to be segmented as the segmentation result, then remove the word from the text, and then continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. In specific implementation, the maximum matching algorithm usually has two strategies: forward maximum matching: starting from the left side of the text, select the longest word as the segmentation result, then remove the word from the text, and continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. Reverse maximum matching: starting from the right side of the text, select the longest word as the segmentation result, then remove the word from the text, and continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. For example, using the maximum matching algorithm to segment {"electric", "power", "equipment", "equipment", "of", "equipment", "model", "number"}, you can get {"electric equipment", "of", "equipment model"}, where "electric equipment", "of", "equipment model" can be considered as the three text segmentations of the text slice {equipment model of electric equipment}.

[0057] Step 204: Obtain key power features of each text slice based on at least one text segmentation.

[0058] In an exemplary embodiment, as shown in FIG3 , step 204 may include steps 302 to 304. Among them:

[0059] Step 302: Determine the weight value of each text segment.

[0060] Step 304 : Acquire key power features of each text slice according to at least one text segmentation and a weight value corresponding to each text segmentation.

[0061] The text compression module of the text processing model can be used to obtain the key power features of each text slice according to at least one text slice. Specifically, the text compression module obtains the key power features of each text slice according to at least one text slice, which may include: In a possible implementation, the text compression module may be an attention mechanism. First, at least one text slice of indefinite length may be converted into a numerical vector representation that satisfies a fixed length. Next, each text slice may be subjected to text recognition processing to obtain at least one text segmentation corresponding to each text slice, and determine the weight value corresponding to each text segmentation in the at least one text segmentation; further, based on the at least one text segmentation and the weight value corresponding to each text segmentation, redundant information and noise in the context may be efficiently filtered to extract key power features.

[0062] In the method of this embodiment, a text compression module and an adaptation module can be introduced into the text processing model of the large language model. Before answer generation, the text can be compressed, which can reduce the high consumption of hardware computing resources of the large language model, thereby reducing costs and increasing computational simplicity.

[0063] In an exemplary embodiment, step 304 may include:

[0064] According to the weight value corresponding to each text segmentation, a weighted sum is performed on at least one text segmentation to obtain the key power feature of the corresponding text slice.

[0065] Among them, the weight value of each text segmentation can be determined according to the similarity between each text segmentation and the power query text information, and the weight value can be used to characterize the similarity between each text segmentation and the power query text information. In a possible implementation, the weight value of at least one text segmentation can be normalized so that the sum of all weights is 1. The weight obtained in this way can be regarded as a probability distribution, indicating the importance of different text segmentations. Then, according to the weight value corresponding to each text segmentation, the weighted sum of at least one text segmentation can be performed to obtain the key power features of the corresponding text slice.

[0066] In the method of this embodiment, the attention mechanism can be used to extract the key power features of each text slice, and then, based on the key power features, the power object information for the power query text information can be obtained, thereby improving the accuracy of answer generation.

[0067] In an exemplary embodiment, as shown in FIG4 , step 108 may include steps 402 to 406. Among them:

[0068] Step 402: Perform text recognition processing on the power query text information to obtain at least one query text segmentation word corresponding to the power query text information.

[0069] Among them, in some possible implementations, the power query text information can be processed for text recognition by natural language processing technology, and each power query text information can be processed for word segmentation by the following method: the power query text information can be segmented to obtain multiple text characters of the power query text information, for example, {equipment model of power equipment} can be segmented to obtain {"electricity", "power", "equipment", "equipment", "of", "equipment", "equipment", "model", "number"}; then, the multiple text characters can be matched and segmented based on the maximum matching algorithm, and the maximum matching algorithm (MMA) is an algorithm commonly used for Chinese word segmentation. Chinese word segmentation is the process of segmenting a continuous sequence of Chinese characters into meaningful words, and the maximum matching algorithm is one of the rule-based word segmentation methods. The basic idea of ​​the maximum matching algorithm is to select the longest word from the text to be segmented as the segmentation result, then remove the word from the text, and then continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. In specific implementation, the maximum matching algorithm usually has two strategies: forward maximum matching: starting from the left side of the text, select the longest word as the segmentation result, then remove the word from the text, and continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. Reverse maximum matching: starting from the right side of the text, select the longest word as the segmentation result, then remove the word from the text, and continue to select the longest word in the remaining text until the text is segmented or cannot be segmented further. For example, using the maximum matching algorithm to segment {"electric", "power", "equipment", "of", "equipment", "model", "number"}, {"electric equipment", "of", "equipment model"} can be obtained, where "electric equipment", "of", "equipment model" can be considered as three query text segmentations of the power query text information {equipment model of electric equipment}.

[0070] Step 404: Obtain the query word segmentation entity corresponding to each query text word segmentation, and the relationship information between the query word segmentation entities.

[0071] After the electric power query text information is segmented by natural language processing technology to obtain at least one query text segmentation of the electric power query text information, the query segmentation entity corresponding to each query text segmentation and the relationship information between each query segmentation entity can be obtained based on the at least one query text segmentation by using named entity recognition in natural language processing technology. The query segmentation entity can be an electric power equipment entity related to the electric power object to be queried contained in the electric power query text information, such as the name of the electric power equipment, the model of the electric power equipment, and the related protocol of the electric power equipment. The relationship information is used to characterize the correlation between the query segmentation entities.

[0072] Step 406: acquiring power object information corresponding to the power object to be queried according to the key power features, the query word segmentation entities and the relationship information.

[0073] In the method of this embodiment, natural language processing technology can be used to perform text recognition processing on power query text information, thereby improving the accuracy of subsequent acquisition of power object information.

[0074] In an exemplary embodiment, the embodiment of the present application further includes the following steps, which are used to explain the role of the adaptation module in the text processing model, and the steps specifically include:

[0075] Determine the dimension of the feature vector of the key power characteristic; and convert the feature vector dimension into an adaptation vector dimension.

[0076] The text processing model may include a text compression module, an adaptation module and an answer generation module. The adaptation module may convert the feature vector dimension of the key power feature of each text slice into an adaptation vector dimension, which is a vector dimension that can adapt to the input vector of the answer generation module.

[0077] In the method of this embodiment, an adaptation module is introduced into the large language model, which can convert the feature vector dimension of the key power feature and ensure the feasibility of combining the text compression module with the large language model.

[0078] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0079] Based on the same inventive concept, the embodiment of the present application also provides a text processing device for implementing the above-mentioned text processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more text processing device embodiments provided below can refer to the limitations on the text processing method above, and will not be repeated here.

[0080] In one embodiment, as shown in FIG. 5 , a text processing device is provided, including: an acquisition module 502, a text recognition module 504, a feature extraction module 506 and an answer generation module 508, wherein:

[0081] An acquisition module 502 is used to acquire power object associated information of a power information query request for a power object to be queried;

[0082] A text recognition module 504 is used to perform text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information;

[0083] A feature extraction module 506, configured to obtain key power features of each text slice according to at least one of the text slices;

[0084] The answer generation module 508 is used to obtain the power object information corresponding to the power object to be queried according to the key power characteristics and the power query text information associated with the power object to be queried contained in the power information query request.

[0085] In one embodiment, the feature extraction module 506 is further used to: perform text recognition processing on each of the at least one text slice to obtain at least one text segmentation corresponding to each text slice; and obtain the key power feature of each text slice based on at least one text segmentation.

[0086] In one embodiment, the feature extraction module 506 is further used to: determine a weight value of each of the text segmentations; and obtain the key power feature of each of the text slices based on at least one of the text segmentations and the weight value corresponding to each of the text segmentations.

[0087] In one embodiment, the feature extraction module 506 is further used to: perform weighted summation on at least one of the text segmentations according to the weight values ​​corresponding to each of the text segmentations, so as to obtain the key power feature of the corresponding text slice.

[0088] In one embodiment, the answer generation module 508 is also used to: perform text recognition processing on the power query text information to obtain at least one query text segmentation corresponding to the power query text information; obtain the query segmentation entity corresponding to each of the query text segmentations, and the relationship information between each of the query segmentation entities; and obtain the power object information corresponding to the power object to be queried based on the key power features, the query segmentation entity and the relationship information.

[0089] In one embodiment, the answer generation module 508 is further used to: determine the feature vector dimension of the key power feature; and convert the feature vector dimension into an adaptation vector dimension.

[0090] Each module in the above-mentioned text processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0091] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6 . The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store text processing related data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a text processing method is implemented.

[0092] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0093] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0094] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0095] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0096] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0097] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0098] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A text processing method, characterized in that: The method comprises: Obtaining power object associated information of a power information query request for a power object to be queried; Performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information; According to at least one of the text slices, acquiring key power features of each of the text slices; The power object information corresponding to the power object to be queried is acquired according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request.

2. The method according to claim 1, characterized in that The acquiring, according to at least one of the text slices, a key power feature of each of the text slices comprises: Performing text recognition processing on each of the at least one text slice to obtain at least one text segmentation corresponding to each of the text slices; According to at least one of the text segmentations, the key power feature of each of the text slices is obtained.

3. The method according to claim 2, characterized in that The acquiring the key power feature of each of the text slices according to at least one of the text segmentations includes: Determining a weight value of each of the text segmentations; The key power feature of each of the text slices is obtained according to at least one of the text segmentations and the weight value corresponding to each of the text segmentations.

4. The method according to claim 3, characterized in that The acquiring the key power feature of each of the text slices according to at least one of the text segmentations and the weight value corresponding to each of the text segmentations includes: According to the weight values ​​corresponding to the text segmentations, a weighted sum is performed on at least one of the text segmentations to obtain the key power feature of the corresponding text slice.

5. The method according to claim 1, characterized in that The acquiring, according to the key power feature and the power query text information associated with the power object to be queried contained in the power information query request, power object information corresponding to the power object to be queried comprises: Performing text recognition processing on the power query text information to obtain at least one query text segmentation word corresponding to the power query text information; Obtaining the query word segmentation entities corresponding to each of the query text segmentations, and the relationship information between the query word segmentation entities; The power object information corresponding to the power object to be queried is acquired according to the key power feature, the query word segmentation entity and the relationship information.

6. The method according to any one of claims 1 to 5, characterized in that Before acquiring the power object information corresponding to the power object to be queried, the method further includes: Determining a feature vector dimension of the key power feature; The feature vector dimension is converted into an adaptation vector dimension.

7. A text processing device, characterized in that: The device comprises: An acquisition module, used for acquiring power object associated information of a power information query request for a power object to be queried; A text recognition module, used for performing text recognition processing on the power object associated information to obtain at least one text slice of the power object associated information; A feature extraction module, configured to obtain key power features of each text slice according to at least one of the text slices; The answer generation module is used to obtain the power object information corresponding to the power object to be queried according to the key power characteristics and the power query text information associated with the power object to be queried contained in the power information query request.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

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

Citation Information

Patent Citations

  • Electric power knowledge base updating method and device, equipment, storage medium and program product

    CN117539976A

  • Multi-modal multi-scale multi-recall large language model retrieval enhancement generation method

    CN118296120A

  • Data processing method and system based on large language model and computer equipment

    CN118332081A

  • Knowledge retrieval enhancement generation method and system based on large language model

    CN118394890A