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

By searching and comparing the explanation text of the target object, the corresponding operation text is generated, solving the problem of complexity of the user's operation, and realizing the simple operating process.

CN119357374AActive Publication Date: 2025-01-24ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202411681499.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-01-24
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

In the prior art, users need to read complex explanatory text when operating target objects, resulting in operation difficulties and affecting user experience.

Method used

By obtaining the target object of the target object to explain the text, the existing explanation text that is similar to the similarity rules, determine the corresponding operating text, and generate the target operation text based on the comparison results to simplify the user operation.

Benefits of technology

There is no need for the user to understand and refine the explanatory text, and the operation text is automatically generated, which reduces the complexity and difficulty of the user's operation and realizes a simple operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357374A_ABST
    Figure CN119357374A_ABST
Patent Text Reader

Abstract

The invention discloses a text processing method, a computer program product, equipment and a computer medium, and relates to the technical field of natural language processing. Retrieving an existing description text which meets a similarity rule with the target description text; determining an existing operation text corresponding to the existing description text; according to the comparison result and the existing operation text, generating a target operation text corresponding to the target description text, and operating the target object based on the target operation text; wherein the description text is used for recording an operation rule of the target object; the comparison result comprises difference information between the target description text and the existing description text. According to the difference information between the target description text and the existing description text, the target operation text corresponding to the target description text is generated according to the existing operation text corresponding to the existing description text, so that the operation difficulty of a user on the target object is reduced, and simple and convenient operation on the target object is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and more specifically, to a text processing method, a computer program product, a device and a computer medium. Background Art

[0002] Currently, in the process of operating a target object, the user needs to read the description text of the target object and then perform the corresponding operation on the target object according to the description text. However, the complexity of the description text is difficult to estimate, which brings difficulty to the user and affects the user experience of the target object.

[0003] In summary, how to operate the target object simply and conveniently is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The purpose of the present invention is to provide a text processing method, which can solve the technical problem of how to operate the target object simply to a certain extent. The present invention also provides a computer program product, an electronic device and a computer readable storage medium.

[0005] In a first aspect, a text processing method is provided, comprising:

[0006] Get the target description text of the target object;

[0007] Retrieving existing description texts that satisfy similarity rules with the target description text;

[0008] Determine an existing operation text corresponding to the existing description text;

[0009] Generate a target operation text corresponding to the target description text according to the comparison result and the existing operation text, so as to operate the target object based on the target operation text;

[0010] The description text is used to record the operation rules of the target object; and the comparison result includes the difference information between the target description text and the existing description text.

[0011] On the other hand, the existing description texts satisfying the similarity rule with the target description text are retrieved, including:

[0012] determining the category of the target object;

[0013] Extracting keywords from the description text corresponding to the category;

[0014] Generate a word segmentation table according to the keywords;

[0015] determining a description text knowledge base for storing description texts;

[0016] Based on the word segmentation table, existing description texts satisfying a similarity rule with the target description text are retrieved from the description text knowledge base.

[0017] On the other hand, based on the word segmentation table, existing description texts satisfying the similarity rule with the target description text are retrieved from the description text knowledge base, including:

[0018] Segmenting the target description text according to the segmentation table to obtain target words;

[0019] For a candidate explanatory text in the explanatory text knowledge base, determining the length of the candidate explanatory text, generating a word frequency of the target word in the candidate explanatory text, generating an inverse text frequency index of the target word in the explanatory text knowledge base, and generating a first similarity score between the target explanatory text and the candidate explanatory text according to the length, the word frequency and the inverse text frequency index;

[0020] Selecting the description texts to be selected corresponding to the first similarity scores that are greater than a first set value as first candidate description texts;

[0021] According to the first candidate description text, an existing description text is determined.

[0022] On the other hand, determining an existing description text according to the first candidate description text includes:

[0023] generating a first vector of the target description text;

[0024] For the description text to be selected in the description text knowledge base, generating a second vector of the description text to be selected, and generating a second similarity score between the target description text and the description text to be selected according to the first vector and the second vector;

[0025] Selecting the description texts to be selected corresponding to the second similarity scores that are greater than a second set value as second candidate description texts;

[0026] Sorting the first candidate description text and the second candidate description text to obtain a sorting result;

[0027] Existing description texts are screened out from the sorting results.

[0028] On the other hand, a description text knowledge base for storing description texts is determined, including:

[0029] Obtain the historical description text corresponding to the category;

[0030] Segmenting the historical description text to obtain segmented text;

[0031] Determining the hierarchical annotations of the segmented texts and the reference relationships between the segmented texts;

[0032] Adding the hierarchical annotation and the reference relationship to the segmented text to obtain the text to be stored;

[0033] The texts to be stored are grouped and stored in a description text knowledge base according to the hierarchical annotations.

[0034] On the other hand, based on the word segmentation table, existing description texts satisfying the similarity rule with the target description text are retrieved from the description text knowledge base, including:

[0035] Check whether there is an existing description text stored that meets the similarity rule with the target description text;

[0036] In response to the existing description text being stored, reading out the existing description text;

[0037] In response to the existing description text not being stored, the word segmentation table and the target description text are input into a large language model; and the large language model receives the existing description text that satisfies a similarity rule with the target description text and is retrieved from the description text knowledge base based on the word segmentation table.

[0038] On the other hand, determining the existing operation text corresponding to the existing description text includes:

[0039] Obtain the historical operation text corresponding to the category;

[0040] Vectorizing the historical operation text to obtain a third vector;

[0041] Storing the third vector in an operation text knowledge base;

[0042] The existing operation text corresponding to the existing description text is retrieved from the operation text knowledge base.

[0043] On the other hand, the operation text knowledge base includes a first text knowledge base and a second text knowledge base, and storing the third vector into the operation text knowledge base includes:

[0044] Performing a performance evaluation on the historical operation text to obtain an evaluation result of the historical operation text;

[0045] Classifying the historical operation text according to the evaluation result to obtain a classification result;

[0046] In response to the classification result indicating that the historical operation text belongs to the first level, storing the third vector into the first text knowledge base;

[0047] In response to the classification result indicating that the historical operation text belongs to the second level, the third vector is stored in the second text knowledge base.

[0048] On the other hand, after generating the target operation text corresponding to the target description text according to the comparison result and the existing operation text, the method further includes:

[0049] Obtaining the operation text to be optimized and the corresponding description text to be optimized of the target object;

[0050] In the description text knowledge base, searching whether there is a reference description text that satisfies a similarity rule with the description text to be optimized;

[0051] In response to retrieving the reference description text from the description text knowledge base, the reference operation text of the reference description text is retrieved from the operation text knowledge base, and the operation text to be optimized is optimized based on the reference operation text.

[0052] On the other hand, optimizing the to-be-optimized operation text based on the reference operation text includes:

[0053] Detecting whether the reference operation text is stored in the second text knowledge base;

[0054] In response to the reference operation text being stored in the second text knowledge base, the word segmentation table, the reference operation text and the operation text to be optimized are input into a large language model, and an optimization result of the operation text to be optimized by the large language model based on the word segmentation table and the reference operation text is received.

[0055] On the other hand, generating a target operation text corresponding to the target description text according to the comparison result and the existing operation text includes:

[0056] Inputting the target description text, the existing description text and the existing operation text into a large language model;

[0057] Receive a target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text.

[0058] On the other hand, before receiving the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text, the method further includes:

[0059] Acquire search information, where the search information is used to search the operation text of the target object;

[0060] inputting the search information into a large language model;

[0061] The receiving of the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text includes:

[0062] A target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text is received, wherein the comparison result also includes similarity information between the search information and the existing operation text.

[0063] In a second aspect, a computer program product is provided, comprising a computer program / instruction, which implements the steps of any of the above-mentioned text processing methods when executed by a processor.

[0064] According to a third aspect, an electronic device is provided, including:

[0065] Memory for storing computer programs;

[0066] A processor is used to implement the steps of any of the above-mentioned text processing methods when executing the computer program.

[0067] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned text processing methods are implemented.

[0068] The present invention provides a text processing method, which obtains a target description text of a target object; retrieves an existing description text that satisfies a similarity rule with the target description text; determines an existing operation text corresponding to the existing description text; generates a target operation text corresponding to the target description text according to a comparison result and the existing operation text, so as to operate the target object based on the target operation text; wherein the description text is used to record the operation rules of the target object; and the comparison result includes the difference information between the target description text and the existing description text. The beneficial effect of the present invention is that the target operation text corresponding to the target description text can be generated by applying the existing operation text corresponding to the existing description text according to the difference information between the target description text and the existing description text, and the operation text can be automatically generated without the user having to understand and refine the description text, thereby reducing the difficulty of the user in operating the target object and realizing a simple operation on the target object. The computer program product, electronic device and computer-readable storage medium provided by the present invention also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0070] Figure 1 A flowchart of a text processing method provided by an embodiment of the present invention;

[0071] Figure 2 This is a schematic diagram of similar text retrieval;

[0072] Figure 3 Optimized schematic diagram for manipulating text;

[0073] Figure 4 This is the network architecture diagram of the server;

[0074] Figure 5 A schematic diagram for generating target code;

[0075] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0076] Figure 7 Another structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0078] See also Figure 1 , Figure 1 A flowchart of a text processing method provided by an embodiment of the present invention.

[0079] A text processing method provided by an embodiment of the present invention may include the following steps:

[0080] Step S101: Acquire a target description text of a target object, where the description text is used to record the operation rules of the target object.

[0081] In practical applications, the target description text of the target object can be obtained first, and the description text is used to record the operation rules of the target object. For example, the description text can be the manual prepared by the manufacturer when producing the target object, and can be a pdf version or a chm version. The target description text is also the description text required for reference when performing target operations on the target object. For example, if the target object is a network device such as a server, router, and switch, the target description text can be the operation rules when the network device is connected to the network, and if the target object is a test device, the target description text can be the operation rules when the test device tests the device under test.

[0082] Step S102: Retrieve existing description texts that meet similarity rules with the target description text.

[0083] Step S103: Determine the existing operation text corresponding to the existing description text.

[0084] In practical applications, considering that there is an operation history of the target object, and these operation histories carry the operation methods of the target object, the target operation methods corresponding to the target description text can be generated according to the operation history of the target object. In this process, only the existing description texts that meet the similarity rules with the target description text can be retrieved, and the existing operation texts corresponding to the existing description texts can be determined, so as to apply the existing operation texts similar to the target description texts to generate the target operation texts, thereby accelerating the generation efficiency and accuracy of the target operation texts. Among them, the similarity rules between the target description text and the existing description texts are used to detect whether the target description text and the existing description texts are similar, which can be flexibly determined according to the application scenario, such as using a trained large model to detect whether the two texts are similar or how different they are. In addition, the operation text refers to the text for operating the target object, which can be a programming language text input to the target object, or a text for instructing a machine to operate the target object, etc.

[0085] In actual applications, considering that there are many types of objects to be operated, there are commonalities between the description texts of each type of objects to be operated, such as domain-specific nouns, phrases, and keywords, while the description texts of different types of objects to be operated are too different and unique. Therefore, the description texts can be accurately retrieved based on the commonalities between the description texts of the same type of objects to be operated. Taking network devices as an example, although there are many differences between network devices, in order to ensure network interconnection, network devices from different manufacturers will follow certain industry standards or protocol specifications when designing, such as TCP / IP (Transmission Control Protocol / Internet Protocol), SNMP (Simple Network Management Protocol), HTTP (Hypertext Transfer Protocol), etc. Protocol, Hypertext Transfer Protocol), etc. These standardized protocols provide guarantees for the adaptation between different network devices, so that network devices at certain levels have certain similarities, and these similarities can be used to screen keywords to retrieve similar texts. In other words, in the process of retrieving existing description texts that meet the similarity rules with the target description text, the category of the target object can be determined; extract keywords from the description text corresponding to this category, for example, a trained large language model can be used to extract keywords from the description text corresponding to this category, etc. This keyword is also a keyword that reflects the professional field characteristics of the description text of this category; then generate a word segmentation table based on the keywords, so that the word segmentation table can be used to segment the description text in the future to obtain feature words that can reflect the object of this category. In other words, the word segmentation table is a table used to segment text, and the word segmentation table can be composed of keywords or derivatives of keywords, etc.; finally, determine the description text knowledge base used to store the description text, and based on the word segmentation table, retrieve the existing description text that meets the similarity rules with the target description text in the description text knowledge base.

[0086] From this implementation process, it can be seen that the present invention can determine the category of the target object and extract the keywords in the description text corresponding to this category, so that the keywords can represent the commonality of the description text of the target object of this category; then generate a word segmentation table based on the keywords, which is equivalent to generating a word segmentation table based on the commonality of the description text of the target object of this category, so that the word segmentation table can obtain words that can reflect the commonality between the description texts of the target object of this category after segmenting the description text of the target object of this category; finally, determine the description text knowledge base for storing the description text, and based on the word segmentation table, retrieve the existing description text that meets the similarity rule with the target description text in the description text knowledge base, which is equivalent to extracting the common words in the description text of the target object of this category and performing text screening. Compared with arbitrarily applying keywords to screen the existing description text, the existing description text similar to the target description text can be screened more accurately.

[0087] In a specific application scenario, in the process of retrieving existing explanatory texts that meet similarity rules with target explanatory texts in an explanatory text knowledge base based on a word segmentation table, the target explanatory text can be segmented according to the word segmentation table to obtain target words; for the candidate explanatory text in the explanatory text knowledge base, the length of the candidate explanatory text is determined, the word frequency of the target word in the candidate explanatory text is generated, and the inverse text frequency index of the target word in the explanatory text knowledge base is generated; based on the length, word frequency and inverse text frequency index, a first similarity score between the target explanatory text and the candidate explanatory text is generated; the candidate explanatory text corresponding to the first similarity score greater than a first set value is selected as the first candidate explanatory text; and the existing explanatory text is determined based on the first candidate explanatory text.

[0088] From this implementation process, it can be seen that in the process of retrieving existing description texts, the present invention first uses the word segmentation table to segment the target description text to obtain the target words, which is equivalent to using the specific words of the description text in the field to which the target object belongs to segment the target description text, and obtains the target words that can be adapted to the field to which the target object belongs, so that the target words can more accurately reflect the field characteristics of the target description text; and in the process of applying the target words to screen the existing description texts, the first similarity score is generated based on the length of the to-be-selected description text and the word frequency and inverse text frequency index of the target words in the to-be-selected description text, so that the first similarity score can accurately reflect the similarity between the target description text and the existing description text, thereby improving the screening accuracy of the existing description text, so that the existing operation text can be more accurately applied to generate the target operation text later.

[0089] In a specific application scenario, in the process of determining the existing description text based on the first candidate description text, the first candidate description text can be directly used as the existing description text, or a first vector of the target description text can be generated; for the candidate description text in the description text knowledge base, a second vector of the candidate description text is generated, and a second similarity score between the target description text and the candidate description text is generated based on the first vector and the second vector; the candidate description text corresponding to the second similarity score greater than the second set value is selected as the second candidate description text; the first candidate description text and the second candidate description text are sorted to obtain a sorting result, for example, a model that re-sorts the preliminary retrieval results to improve the accuracy and relevance of the retrieval results can be applied to sort the first candidate description text and the second candidate description text to obtain a sorting result, etc.; finally, the existing description text is screened out in the sorting result, for example, a target number of candidate description texts that are most similar to the target description text in the sorting result are used as the existing description text, etc. In this way, the first candidate description text is determined based on text length, word frequency and inverse text frequency index, the second candidate description text is determined based on the vector, and the existing description text is determined based on the ranking result of the first candidate description text and the second candidate description text, which is equivalent to comprehensively selecting existing description texts similar to the target description text based on text length, word frequency, inverse text frequency and vector, which can ensure the retrieval accuracy of the existing description text.

[0090] In a specific application scenario, in the process of determining an explanatory text knowledge base for storing explanatory texts, historical explanatory texts corresponding to the category can be obtained. This historical explanatory text can be the explanatory text of other objects with the same performance as the target object, or the explanatory text of an object obtained after modifying the target object, etc.; the historical explanatory text is segmented to obtain segmented texts, for example, the historical explanatory text can be segmented into chapters, sections, and subsections, etc.; the hierarchical annotations of the segmented texts and the reference relationships between the segmented texts are determined, such as adding hierarchical annotations before and after each paragraph of text, such as [Chapter: 1][Section: 1.1], etc., to clarify its position, and adding references or prompts to the previous and next segments in each segment, such as "See previous section for details", etc., to maintain the coherence of the content; hierarchical annotations and reference relationships are added to the segmented texts to obtain texts to be stored; the texts to be stored are grouped and stored in the explanatory text knowledge base according to the hierarchical annotations. In this way, the historical description text is stored in the description text knowledge base in the form of segmented text with hierarchical annotations and reference relationships. Later, it can be retrieved by hierarchical priority to quickly locate the text, thereby improving the efficiency of retrieving similar texts from the description text knowledge base. It should be noted that the description text knowledge base can be divided into a historical knowledge base and an adaptive knowledge base, wherein the historical knowledge base can be used to store historical description texts, while the adaptive knowledge base can store target description texts, and the target description texts can be found in the adaptive knowledge base through document identification, etc., to improve the manageability of the target description text.

[0091] In a specific application scenario, when an existing description text similar to the target description text is known, the existing description text can be directly obtained. However, when an existing description text similar to the target description text is not known, it is necessary to retrieve it. Therefore, in the process of retrieving the existing description text that meets the similarity rule with the target description text in the description text knowledge base based on the word segmentation table, it can be checked whether the existing description text that meets the similarity rule with the target description text is stored; in response to the existing description text being stored, the existing description text is read out; in response to the existing description text not being stored, the word segmentation table and the target description text are input into a large language model (LLM); the existing description text that meets the similarity rule with the target description text retrieved from the description text knowledge base based on the word segmentation table by the large language model is received, and the knowledge base of the present invention can be built based on the retrieval-augmented generation (RAG) technology, and this large language model can be combined with the retrieval-augmented generation technology to retrieve the existing description text, etc. Figure 2 As shown, the present invention is not specifically limited herein.

[0092] In specific application scenarios, in the process of determining the existing operation text corresponding to the existing description text, the knowledge base can also be used to search it, that is, the historical operation text corresponding to the category can be obtained; the historical operation text can be vectorized to obtain a third vector; the third vector can be stored in the operation text knowledge base; the vectorization result can be used to retrieve the existing operation text corresponding to the existing description text in the operation text knowledge base. In order to distinguish the operation texts, the operation texts in the operation text knowledge base can be classified, for example, the operation text knowledge base is divided into a first text knowledge base and a second text knowledge base, and the performance of the operation text in the second text knowledge base is better than that of the operation text in the first text knowledge base, etc. Correspondingly, in the process of storing the third vector in the operation text knowledge base, the performance of the historical operation text can be evaluated, such as evaluating the operability and operation information of the historical operation text to obtain the evaluation result of the historical operation text, the operability can be whether the required operation result can be obtained according to the historical operation text, and the operation information can be the operation time, the number of operation errors, etc.; the historical operation text is graded according to the evaluation result to obtain a grading result, for example, if the evaluation result is greater than or equal to the set value, the historical operation text can be classified into the second level, and if the evaluation result is less than the set value, the historical operation text can be classified into the first level, etc.; in response to the grading result indicating that the historical operation text belongs to the first level, the third vector is stored in the first text knowledge base; in response to the grading result indicating that the historical operation text belongs to the second level, the third vector is stored in the second text knowledge base.

[0093] Step S104: Generate a target operation text corresponding to the target description text according to the comparison result and the existing operation text, so as to operate the target object based on the target operation text; the comparison result includes difference information between the target description text and the existing description text.

[0094] In actual applications, after determining the existing description text and the existing operation text, the target operation text corresponding to the target description text can be generated based on the comparison result and the existing operation text, so as to operate the target object based on the target operation text, and the comparison result includes the difference information between the target description text and the existing description text. In other words, the existing operation text can be adjusted according to the difference information between the target description text and the existing description text to obtain the target operation text.

[0095] In practical applications, in the process of generating a target operation text corresponding to a target description text according to the comparison results and the existing operation text, the target description text, the existing description text and the existing operation text can be input into the large language model; the target operation text corresponding to the target description text generated by the large language model based on the comparison results and the existing operation text is received, so as to automatically compare the target description text with the existing description text with the help of the large language model, and generate the target operation text based on the existing operation text according to the comparison results. In this process, when the large language model is a large language model trained based on a word segmentation table, the target description text, the existing description text and the existing operation text can be directly input into the large language model to obtain the target description text, and when the large language model is not a large language model trained based on a word segmentation table, the target description text, the existing description text, the existing operation text and the word segmentation table can be input into the large language model, so that the large language model generates the target description text with the word segmentation table as a constraint, thereby improving the adaptability between the target description text and the target object.

[0096] In a specific application scenario, considering that in the process of operating the target object, it is limited by a specific scenario, the target operation text required only needs to be able to solve the operation problem in this specific scenario. In other words, a specific operation text needs to be generated. In order to meet this requirement, before receiving the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text, retrieval information can also be obtained. The retrieval information is used to retrieve the operation text of the target object. This retrieval information can be determined according to the operation requirements of the target object; the retrieval information is input into the large language model; accordingly, in the process of receiving the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text, the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text can be received. The comparison result also includes similarity information between the retrieval information and the existing operation text. In other words, the large language model can process the existing operation text according to the similarity information between the retrieval information and the existing operation text, and the difference information between the target description text and the existing description text, and generate a target operation text that is adapted to both the target description text and the retrieval information. In this way, after operating the target object according to the target description text, the specific operation requirements of the target object can be solved, and the accuracy of operating the target object can be improved.

[0097] Furthermore, the target operation text corresponding to the search information output by the large model can also be tested. If it fails the test, the failure factor is identified, and a search is performed to determine whether there is a text segment that meets the failure factor. The retrieved text segments are filtered and sorted based on keywords, tags, or other metadata to obtain candidate segments. The text segment in the target operation text corresponding to the search information is replaced with the candidate segment, and the replaced target operation text is tested and replaced until an operation text that passes the test is obtained. In this way, even if the target operation text output by the large model does not meet the test requirements, the target operation text can be optimized by continuing to search and replace text segments, and an operation text that meets the test can be obtained, thereby improving the fault tolerance rate of the operation text generation, and more accurately and effectively generating the operation text to operate the target object.

[0098] Of course, it is also possible to input only the target description text, existing description text and existing operation text into the large language model; receive the target operation text corresponding to the target description text generated by the large language model based on the comparison results and the existing operation text; then obtain retrieval information, which is used to retrieve the operation text of the target object, input the retrieval information and the target operation text into the large language model together, and receive the operation text corresponding to the retrieval information output by the large language model.

[0099] To facilitate understanding, taking the network adaptation process of the server as an example, the server can be connected to switches, servers, routers, etc. The operations required for each connection are different. The server's description text records each operation rule. However, if you only need to connect the server to the switch, you can use the server connection to the switch as the retrieval information, and input the retrieval information, target description text, existing description text and existing operation text into the large language model. Then, the large language model generates a target operation text that only describes how to connect the server to the switch based on the similarity information between the retrieval information and the existing operation text, and the difference information between the target description text and the existing description text, so that the target operation text can be applied to connect the server to the switch.

[0100] In practical applications, considering that there are multiple description texts stored in the description text knowledge base, there are multiple operation texts in the operation text knowledge base, and there may be differences in performance between the operation texts, that is, there may be operation texts with good performance and operation texts with poor performance. At this time, the operation text with poor performance can be optimized according to this difference to improve the overall performance of the operation text in the operation text knowledge base, that is, after generating the target operation text corresponding to the target description text according to the comparison results and the existing operation text, the operation text to be optimized and the corresponding description text to be optimized of the target object can also be obtained; in the description text knowledge base, it is searched whether there is a reference description text that meets the similarity rule with the description text to be optimized; in response to retrieving the reference description text in the description text knowledge base, the reference operation text of the reference description text is retrieved in the operation text knowledge base, and the operation text to be optimized is optimized based on the reference operation text.

[0101] In a specific application scenario, based on the above-mentioned first text knowledge base and the second text knowledge base, when optimizing the operation text to be optimized based on the reference operation text, it can be detected whether the reference operation text is stored in the second text knowledge base; in response to the reference operation text being stored in the second text knowledge base, the word segmentation table, the reference operation text and the operation text to be optimized are input into the large language model, and the optimization result of the large language model on the operation text to be optimized based on the word segmentation table and the reference operation text is received, such as Figure 3 In addition, the target description text and the target operation text can also be updated to the corresponding knowledge base so as to be used as reference objects to generate new operation texts and the like.

[0102] It should be noted that the large language model in the present invention is based on deep learning technology. Through training with large-scale text data, it can achieve the required language understanding and generation capabilities. It can handle the natural language tasks required by users, such as text generation, question-answering dialogues, etc., and has high intelligence and flexibility. Therefore, the large language model can be trained in a targeted manner according to the function of the large language model in the present invention to give the large language model the capabilities of text retrieval, text generation, and text optimization. The principle of the large language model performing corresponding text processing refers to the description of the corresponding text processing of the present invention.

[0103] The present invention provides a text processing method, which obtains a target description text of a target object; retrieves an existing description text that satisfies a similarity rule with the target description text; determines an existing operation text corresponding to the existing description text; generates a target operation text corresponding to the target description text according to a comparison result and the existing operation text, so as to operate the target object based on the target operation text; wherein the description text is used to record the operation rules of the target object; and the comparison result includes the difference information between the target description text and the existing description text. The present invention has the beneficial effect that the target operation text corresponding to the target description text can be generated by applying the existing operation text corresponding to the existing description text according to the difference information between the target description text and the existing description text, and the operation text can be automatically generated without the user having to understand and refine the description text, thereby reducing the difficulty of the user in operating the target object and realizing a simple operation on the target object.

[0104] In order to facilitate understanding of the text processing method provided by the present invention, the present invention is described by taking the network adaptation process of the server as an example. Figure 4 As shown, the server needs to be connected to the switch, and the operation text is specifically a code, then this process may include the following steps:

[0105] Constructing a historical knowledge base and an adaptation knowledge base of the server, and constructing a first text knowledge base and a second text knowledge base of the server, wherein the historical knowledge base is used to store historical description texts recording network adaptation operation rules between the server and the switch, and the first text knowledge base and the second text knowledge base are used to record historical codes corresponding to the historical description texts, and the code performance in the second text knowledge base is better than the code performance in the first text knowledge base;

[0106] Generate the word segmentation table corresponding to the server;

[0107] Determine the document ID of the operation rule for recording the connection between the server and the switch, and use the document ID to retrieve the corresponding target description text in the adaptation knowledge base;

[0108] Check whether there is any similar existing description text based on this document ID;

[0109] If yes, find the existing code corresponding to the existing description text, input the target description text, the existing description text, the existing code and the word list into the large language model, receive the target code output by the large language model, and input the target code into the server to complete the network connection between the server and the switch;

[0110] If not, search the historical knowledge base for existing description texts similar to the target description texts, search the second text knowledge base for existing codes first, and if not found, search the first text knowledge base for existing codes, input the target description texts, existing description texts, existing codes and word segmentation tables into the large language model, receive the target code output by the large language model, and input the target code into the server to complete the network connection between the server and the switch, such as Figure 5 shown.

[0111] The present invention also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the text processing method provided in the embodiment of the present invention. Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0112] An electronic device provided by an embodiment of the present invention includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the text processing method described in any of the above embodiments are implemented.

[0113] See also Figure 7 Another electronic device provided in an embodiment of the present invention may also include: an input port 203 connected to the processor 202, used to transmit commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, used to display the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, used to realize communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-Definition Multimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0114] An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the text processing method described in any of the above embodiments are implemented.

[0115] The computer-readable storage medium involved in the present invention includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0116] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented:

[0117] Get the target description text of the target object;

[0118] Retrieve existing description texts that meet similarity rules with the target description text;

[0119] Determine the existing operation text corresponding to the existing description text;

[0120] Generate a target operation text corresponding to the target description text according to the comparison result and the existing operation text, so as to operate the target object based on the target operation text;

[0121] The description text is used to record the operation rules of the target object; the comparison result includes the difference information between the target description text and the existing description text.

[0122] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: determining the category of a target object; extracting keywords in a description text corresponding to the category; generating a word segmentation table based on the keywords; determining a description text knowledge base for storing the description text; and based on the word segmentation table, retrieving existing description texts that meet similarity rules with the target description text in the description text knowledge base.

[0123] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: segmenting a target description text according to a word segmentation table to obtain a target word; for a candidate description text in a description text knowledge base, determining the length of the candidate description text, generating a word frequency of the target word in the candidate description text, generating an inverse text frequency index of the target word in the description text knowledge base, and generating a first similarity score between the target description text and the candidate description text according to the length, word frequency and inverse text frequency index; screening the candidate description text corresponding to the first similarity score greater than a first set value as a first candidate description text; and determining an existing description text according to the first candidate description text.

[0124] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: generating a first vector of a target description text; generating a second vector of a candidate description text for a candidate description text in a description text knowledge base, and generating a second similarity score between the target description text and the candidate description text based on the first vector and the second vector; selecting the candidate description text corresponding to the second similarity score greater than a second set value as the second candidate description text; sorting the first candidate description text and the second candidate description text to obtain a sorting result; and screening out the existing description text in the sorting result.

[0125] A computer program product provided by an embodiment of the present invention includes a computer program / instructions, which implement the following steps when executed by a processor: obtaining historical description text corresponding to a category; segmenting the historical description text to obtain segmented text; determining the hierarchical annotations of the segmented text and the reference relationship between the segmented texts; adding hierarchical annotations and reference relationships to the segmented texts to obtain texts to be stored; and grouping the texts to be stored according to the hierarchical annotations and storing them in a description text knowledge base.

[0126] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: checking whether there is an existing description text that meets a similarity rule with a target description text; in response to the existing description text being stored, reading the existing description text; in response to the existing description text not being stored, inputting a word segmentation table and the target description text into a large language model; and receiving the existing description text that meets the similarity rule with the target description text retrieved from a description text knowledge base by the large language model based on the word segmentation table.

[0127] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: obtaining historical operation text corresponding to a category; vectorizing the historical operation text to obtain a third vector; storing the third vector in an operation text knowledge base; and retrieving existing operation text corresponding to the existing description text in the operation text knowledge base.

[0128] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: performing performance evaluation on a historical operation text to obtain an evaluation result of the historical operation text; grading the historical operation text according to the evaluation result to obtain a grading result; in response to the grading result indicating that the historical operation text belongs to the first level, storing a third vector in a first text knowledge base; in response to the grading result indicating that the historical operation text belongs to the second level, storing the third vector in a second text knowledge base.

[0129] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: after generating a target operation text corresponding to a target description text based on a comparison result and an existing operation text, obtaining the operation text to be optimized and the corresponding description text to be optimized of the target object; searching in a description text knowledge base whether there is a reference description text that satisfies a similarity rule with the description text to be optimized; in response to retrieving the reference description text in the description text knowledge base, retrieving a reference operation text of the reference description text in the operation text knowledge base, and optimizing the operation text to be optimized based on the reference operation text.

[0130] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: detecting whether a reference operation text is stored in a second text knowledge base; in response to the reference operation text being stored in the second text knowledge base, inputting a word segmentation table, a reference operation text, and an operation text to be optimized into a large language model, and receiving an optimization result of the large language model on the operation text to be optimized based on the word segmentation table and the reference operation text.

[0131] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: inputting a target description text, an existing description text, and an existing operation text into a large language model; and receiving a target operation text corresponding to the target description text generated by the large language model based on a comparison result and the existing operation text.

[0132] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: before receiving a target operation text corresponding to a target description text generated by a large language model based on a comparison result and an existing operation text, obtaining retrieval information, the retrieval information being used to retrieve the operation text of the target object; inputting the retrieval information into the large language model; receiving a target operation text corresponding to a target description text generated by the large language model based on a comparison result and an existing operation text, the comparison result also including similarity information between the retrieval information and the existing operation text.

[0133] For the description of the relevant parts of a computer program product, an electronic device, and a computer-readable storage medium provided by an embodiment of the present invention, please refer to the detailed description of the corresponding parts in a text processing method provided by an embodiment of the present invention, which will not be repeated here. In addition, the parts of the above technical solutions provided by the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0134] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0135] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text processing method, characterized in that: include: Get the target description text of the target object; Retrieving existing description texts that satisfy similarity rules with the target description text; Determine an existing operation text corresponding to the existing description text; Generate a target operation text corresponding to the target description text according to the comparison result and the existing operation text, so as to operate the target object based on the target operation text; The description text is used to record the operation rules of the target object; and the comparison result includes the difference information between the target description text and the existing description text.

2. The text processing method according to claim 1, characterized in that: Retrieving existing description texts that meet similarity rules with the target description text includes: determining the category of the target object; Extracting keywords from the description text corresponding to the category; Generate a word segmentation table according to the keywords; determining a description text knowledge base for storing description texts; Based on the word segmentation table, existing description texts satisfying a similarity rule with the target description text are retrieved from the description text knowledge base.

3. The text processing method according to claim 2, characterized in that: Based on the word segmentation table, the existing description texts satisfying the similarity rule with the target description text are retrieved from the description text knowledge base, including: Segmenting the target description text according to the segmentation table to obtain target words; For a candidate explanatory text in the explanatory text knowledge base, determining the length of the candidate explanatory text, generating a word frequency of the target word in the candidate explanatory text, generating an inverse text frequency index of the target word in the explanatory text knowledge base, and generating a first similarity score between the target explanatory text and the candidate explanatory text according to the length, the word frequency and the inverse text frequency index; Selecting the description texts to be selected corresponding to the first similarity scores that are greater than a first set value as first candidate description texts; According to the first candidate description text, an existing description text is determined.

4. The text processing method according to claim 3, characterized in that: Determining an existing description text according to the first candidate description text includes: generating a first vector of the target description text; For the description text to be selected in the description text knowledge base, generating a second vector of the description text to be selected, and generating a second similarity score between the target description text and the description text to be selected according to the first vector and the second vector; Selecting the description texts to be selected corresponding to the second similarity scores that are greater than a second set value as second candidate description texts; Sorting the first candidate description text and the second candidate description text to obtain a sorting result; Existing description texts are screened out from the sorting results.

5. The text processing method according to claim 4, characterized in that: Determine the description text knowledge base used to store description texts, including: Obtain the historical description text corresponding to the category; Segmenting the historical description text to obtain segmented text; Determining the hierarchical annotations of the segmented texts and the reference relationships between the segmented texts; Adding the hierarchical annotation and the reference relationship to the segmented text to obtain the text to be stored; The texts to be stored are grouped and stored in a description text knowledge base according to the hierarchical annotations.

6. The text processing method according to claim 5, characterized in that: Based on the word segmentation table, the existing description texts satisfying the similarity rule with the target description text are retrieved from the description text knowledge base, including: Check whether there is an existing description text stored that meets the similarity rule with the target description text; In response to the existing description text being stored, reading out the existing description text; In response to the existing description text not being stored, the word segmentation table and the target description text are input into a large language model; and the large language model receives the existing description text that satisfies a similarity rule with the target description text and is retrieved from the description text knowledge base based on the word segmentation table.

7. The text processing method according to claim 6, characterized in that: Determining the existing operation text corresponding to the existing description text includes: Obtain the historical operation text corresponding to the category; Vectorizing the historical operation text to obtain a third vector; Storing the third vector in an operation text knowledge base; The existing operation text corresponding to the existing description text is retrieved from the operation text knowledge base.

8. The text processing method according to claim 7, characterized in that: The operation text knowledge base includes a first text knowledge base and a second text knowledge base, and storing the third vector in the operation text knowledge base includes: Performing a performance evaluation on the historical operation text to obtain an evaluation result of the historical operation text; Classifying the historical operation text according to the evaluation result to obtain a classification result; In response to the classification result indicating that the historical operation text belongs to the first level, storing the third vector into the first text knowledge base; In response to the classification result indicating that the historical operation text belongs to the second level, the third vector is stored in the second text knowledge base.

9. The text processing method according to claim 8, characterized in that: After generating a target operation text corresponding to the target description text according to the comparison result and the existing operation text, the method further includes: Obtain the operation text to be optimized and the corresponding description text to be optimized of the target object; In the description text knowledge base, searching whether there is a reference description text that satisfies a similarity rule with the description text to be optimized; In response to retrieving the reference description text from the description text knowledge base, the reference operation text of the reference description text is retrieved from the operation text knowledge base, and the operation text to be optimized is optimized based on the reference operation text.

10. The text processing method according to claim 9, characterized in that: Optimizing the operation text to be optimized based on the reference operation text includes: Detecting whether the reference operation text is stored in the second text knowledge base; In response to the reference operation text being stored in the second text knowledge base, the word segmentation table, the reference operation text and the operation text to be optimized are input into a large language model, and an optimization result of the operation text to be optimized by the large language model based on the word segmentation table and the reference operation text is received.

11. The text processing method according to any one of claims 1 to 10, characterized in that: Generating a target operation text corresponding to the target description text according to the comparison result and the existing operation text, including: Inputting the target description text, the existing description text and the existing operation text into a large language model; A target operation text corresponding to the target description text is received by the large language model based on the comparison result and the existing operation text.

12. The text processing method according to claim 11, characterized in that: Before receiving the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text, the method further includes: Acquire search information, where the search information is used to search the operation text of the target object; inputting the search information into a large language model; The receiving of the target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text includes: A target operation text corresponding to the target description text generated by the large language model based on the comparison result and the existing operation text is received, wherein the comparison result also includes similarity information between the search information and the existing operation text.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the text processing method according to any one of claims 1 to 12 are implemented.

14. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the text processing method according to any one of claims 1 to 12 when executing the computer program.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the text processing method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Diagnosis report automatic generation system, storage medium and electronic equipment

    CN112382360A

  • Case report form management method, device and equipment

    CN114242198A

  • Rail transit signal fault operation and maintenance method and device and electronic equipment

    CN114564947A

  • Object abstract determination method and device, electronic equipment and storage medium

    CN114817634A

  • Semantic similarity retrieval method based on medical equipment manual description

    CN115982320A