Enterprise abbreviation generation method and device

Using a large language model to perform named entity recognition and entity category processing on company names, prompt instruction data is generated, which solves the over-fitting problem in traditional methods and improves the accuracy and semantic coherence of company abbreviation generation.

CN118586394APending Publication Date: 2024-09-03SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410964786.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The traditional enterprise abbreviation generation method builds a binary annotation set based on a single Chinese character, which is prone to overfitting, resulting in low generation accuracy.

Method used

A large language model is used to perform named entity recognition of enterprise name data, construct entity recognition results under multiple entity categories, generate prompt instruction data, and generate enterprise abbreviations through the model, improving the data processing granularity and the interpretability of the generation task.

Benefits of technology

The accuracy of the enterprise abbreviation generation method is improved, making the generated abbreviation semantics more coherent and in line with business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_6
    Figure FT_6
  • Figure FT_1
    Figure FT_1
  • Figure FT_4
    Figure FT_4
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, in particular to an enterprise abbreviation generation method and device. The method comprises the following steps: acquiring to-be-processed enterprise name data; performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under a plurality of entity categories; according to the training corpus of the large-scale language model, adopting the entity recognition results under the plurality of entity categories to construct prompt instruction data corresponding to the large-scale language model; and inputting the prompt instruction data into the large-scale language model to obtain enterprise abbreviation data corresponding to the enterprise name data and generated by the large-scale language model. By adopting the method, the data processing granularity of the large-scale language model and the interpretability of the large-scale language model in processing the abbreviation generation task corresponding to the current enterprise name data can be improved by utilizing the prompt instruction data constructed by the entity recognition results under the plurality of entity categories, so that the accuracy of the enterprise abbreviation generation method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a method and device for generating a corporate abbreviation. Background Art

[0002] The name of an enterprise generally includes the enterprise's trade name, business attributes, region, organizational form, etc. In order to facilitate dissemination and publicity, a reasonable abbreviation that meets the needs of the enterprise is usually selected as a synonym for the enterprise based on the information content in the enterprise name.

[0003] In traditional technology, each Chinese character in the company name can be modeled to obtain the word vector corresponding to each Chinese character. The word vector is input into the long short-term memory network for prediction, and the hidden layer state vector corresponding to each Chinese character is output. The conditional random field network is used to score the hidden layer state vector corresponding to each Chinese character to obtain the binary annotation set corresponding to the company name. According to the binary annotation set, it is determined whether each Chinese character in the company name needs to be retained, thereby forming the corresponding company abbreviation.

[0004] However, when using the traditional method of generating corporate abbreviations, since the binary annotation set is constructed based on a single Chinese character, overfitting is prone to occur, resulting in low accuracy in generating corporate abbreviations. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product with higher accuracy for generating corporate abbreviations in response to the above-mentioned technical problems.

[0006] In a first aspect, the present application provides a method for generating an abbreviation of an enterprise, comprising:

[0007] Get the enterprise name data to be processed;

[0008] Performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories;

[0009] According to the training corpus of the large language model, entity recognition results under multiple entity categories are used to construct prompt instruction data corresponding to the large language model;

[0010] The prompt instruction data is input into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

[0011] In one embodiment, the pre-training method of the large language model includes:

[0012] Obtaining enterprise name samples, entity recognition samples of the enterprise name samples under the multiple entity categories, and enterprise abbreviation samples corresponding to the enterprise name samples;

[0013] Using the enterprise name samples, the entity recognition samples and the enterprise abbreviation samples, combined with the business requirement information of the abbreviation generation task, to construct the training corpus;

[0014] The training corpus is used to perform supervised fine-tuning training on the initial large language model to obtain a pre-trained large language model.

[0015] In one embodiment, the using of the enterprise name samples, the entity recognition samples and the enterprise abbreviation samples, combined with the business requirement information of the abbreviation generation task, to construct the training corpus includes:

[0016] Using the enterprise name sample, the entity recognition sample and the business requirement information, construct problem description information corresponding to the abbreviation generation task;

[0017] Using the enterprise abbreviation sample to construct reply description information corresponding to the abbreviation generation task;

[0018] The training corpus corresponding to the abbreviation generation task is constructed according to the question description information and the answer description information.

[0019] In one embodiment, the step of inputting the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model includes:

[0020] Performing word embedding processing on the prompt instruction data through the large language model to obtain a word vector sequence corresponding to the prompt instruction data;

[0021] The word vector sequence is processed by using the model parameters obtained by supervised fine-tuning in the pre-training stage of the large language model to generate a probability distribution corresponding to the enterprise abbreviation data;

[0022] The enterprise abbreviation data is determined by the large language model according to the probability distribution.

[0023] In one embodiment, the performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories includes:

[0024] Convert the enterprise name data into corresponding text sequence data, and input the text sequence data into a pre-trained entity extraction model;

[0025] The entity extraction model performs named entity recognition according to the context information of the text sequence data to obtain entity recognition results of the enterprise name data under multiple entity categories.

[0026] In one embodiment, the step of inputting the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model includes:

[0027] Inputting the prompt instruction data into the large language model to obtain a short name generation result generated by the large language model;

[0028] When it is determined that the abbreviation generation result exists in the enterprise name data, the abbreviation generation result is used as the enterprise abbreviation data.

[0029] In a second aspect, the present application also provides a device for generating an abbreviation of an enterprise, including:

[0030] A data acquisition module is used to acquire the enterprise name data to be processed;

[0031] An entity recognition module, used to perform named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories;

[0032] An instruction construction module, used to construct prompt instruction data corresponding to the large language model using entity recognition results under multiple entity categories according to the training corpus of the large language model;

[0033] The abbreviation generation module is used to input the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

[0034] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for generating a corporate abbreviation as described in any one of the embodiments of the first aspect is implemented.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a corporate abbreviation as described in any one of the embodiments of the first aspect above is implemented.

[0036] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for generating a corporate abbreviation described in any one of the embodiments of the first aspect above is implemented.

[0037] The above-mentioned enterprise abbreviation generation method, device, computer equipment, computer-readable storage medium and computer program product obtain the enterprise name data to be processed; perform named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories; according to the training corpus of the large language model, use the entity recognition results under multiple entity categories to construct prompt instruction data corresponding to the large language model; input the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model, and can use the prompt instruction data constructed by the entity recognition results under multiple entity categories to improve the data processing granularity of the large language model and the interpretability of the large language model in processing the abbreviation generation task corresponding to the current enterprise name data, thereby improving the accuracy of the enterprise abbreviation generation method. In addition, since the enterprise abbreviation data is generated by the large language model when the above-mentioned enterprise abbreviation generation method is adopted, the strong natural language understanding ability of the large language model can be used to make the semantics of the generated enterprise abbreviation data more coherent. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] 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.

[0039] FIG1 is an application environment diagram of a method for generating a corporate abbreviation in one embodiment;

[0040] FIG2 is a schematic diagram of a process for generating a corporate abbreviation in one embodiment;

[0041] Figure 3 A schematic diagram of a process of pre-training a large language model in one embodiment;

[0042] Figure 4 A flowchart of the steps of forming a training corpus in one embodiment;

[0043] Figure 5 A schematic diagram of a process for generating enterprise abbreviation data in an embodiment;

[0044] Figure 6 A schematic diagram of a process for generating a corporate abbreviation in another embodiment;

[0045] Figure 7 is a structural block diagram of a device 700 for generating a corporate abbreviation in one embodiment;

[0046] Figure 8FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] 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.

[0048] 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, and the collection, use and processing of relevant data must comply with relevant regulations.

[0049] In one embodiment, as shown in FIG1 , an application environment of a method for generating a corporate abbreviation is provided. In this embodiment, the application of the method in a server 100 is used as an example. Among them, a named entity recognition network 102, a prompt instruction generator 104, and a large language model 106 may be deployed in the server 100. It is understandable that the above-mentioned named entity recognition network 102, the prompt instruction generator 104, and the large language model 106 can all be integrated and run in the server 100 through corresponding software programs.

[0050] It can be understood by those skilled in the art that the method can also be applied to personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be terminals such as virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc., and can also be applied to systems including terminals and servers, and implemented through the interaction between terminals and servers.

[0051] Specifically, the server 100 can obtain the enterprise name data to be processed and input the enterprise name data into the named entity recognition network 102. The named entity recognition network 102 is used to perform named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories, and the entity recognition results are input into the prompt instruction generator 104. The prompt instruction generator 104 can be used to generate the training corpus required for the large language model 106 in the pre-training stage of the large language model 106. The training corpus can be used to perform supervised fine-tuning training on the large language model 106 so that the large language model 106 is more suitable for the abbreviation generation task of the enterprise name data. In the application stage of the large language model 106, the prompt instruction generator 104 can construct prompt instruction data corresponding to the large language model 106 based on the training corpus of the large language model 106 and the entity recognition results under multiple entity categories. The prompt instruction data is input into the large language model 106 through the prompt instruction generator 104, and the large language model 106 is used to execute the abbreviation generation task corresponding to the prompt instruction data, so as to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model 106.

[0052] In this embodiment, the server 100 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0053] In an exemplary embodiment, as shown in FIG2 , a method for generating an abbreviation of an enterprise is provided, and the method is applied to the server 100 in FIG1 as an example for description, and includes the following steps S202 to S208 . Among them:

[0054] Step S202, obtaining the enterprise name data to be processed.

[0055] The enterprise name data may include, but is not limited to, address data, organizational form data, business attribute data, trade name data, etc.

[0056] Optionally, in some embodiments, the server may read the enterprise name data to be processed from a local database. Alternatively, in other embodiments, the server may provide a client interaction interface to the user to receive the enterprise name data to be processed input by the user through the client interaction interface.

[0057] Step S204, performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories.

[0058] Among them, entity categories may include but are not limited to address categories, organizational form categories, business attribute categories, business name categories, etc.

[0059] Exemplarily, a named entity recognition algorithm may be run in the server, such as a joint algorithm of a bidirectional long short-term memory network (Bi-Long-short-term-memory, referred to as Bi-LSTM) and a conditional random field (Conditional Random Field, referred to as CRF), a joint algorithm of a bidirectional encoder representation network (Bidirectional Encoder Representationsfrom Transformers, referred to as BERT) and a normalized exponential function (Softmax), a joint algorithm of an Enhanced Representation through kNowledge Integration (ERNIE) and a normalized exponential function (Softmax), a named entity information extraction algorithm based on prompts, and the like.

[0060] The server can use a named entity recognition algorithm to perform word segmentation processing on the enterprise name data to obtain word segmentation results corresponding to the enterprise name data. The matching degree between each word segmentation result and a preset entity category is calculated, and the entity category label corresponding to each word segmentation result is determined according to the matching degree. The word segmentation result under the entity category label corresponding to each entity category is used as the entity recognition result of the enterprise name data under the entity category, thereby obtaining the entity recognition results of the enterprise name data under multiple entity categories.

[0061] Step S206, based on the training corpus of the large language model, entity recognition results under multiple entity categories are used to construct prompt instruction data corresponding to the large language model.

[0062] Among them, large language models, also known as Large Language Models, are referred to as LLM models. Large language models can include but are not limited to autoencoder models (such as the bidirectional encoder representation network model, referred to as the BERT model), autoregressive models (such as the generative pre-trained model Generative Pre-trained Transformer 3, referred to as the GPT-3 model), and sequence-to-sequence models (such as the T5 model used to treat natural language processing tasks as text conversion tasks).

[0063] The training corpus can refer to the training text dataset used in the pre-training process of a large language model.

[0064] Prompt instruction data refers to the prompt data used in a generative dialogue system or large language model to guide the model to generate the desired output text fragment. Prompt instruction data, as an input prompt, can refer to the model to generate relevant responses, explanations, or complete specific tasks. Using prompt instruction data in model training can enable users to better control and guide the content generated by the model, thereby obtaining more accurate and expected results.

[0065] Optionally, in some implementations, a large language model for performing the abbreviation generation task corresponding to the enterprise name data and a training corpus used by the large language model in the pre-training stage may be stored in the server. The entity recognition results under multiple entity categories in the current enterprise name data are used to replace the entity recognition samples under each entity category of the enterprise name samples in the training corpus to form new question description information, thereby obtaining prompt instruction data corresponding to the large language model.

[0066] Step S208: input the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

[0067] Among them, the enterprise abbreviation data can be used to represent the abbreviated data of the enterprise name data.

[0068] Exemplarily, the server may input the prompt instruction data into a large language model, and perform word embedding processing on the prompt instruction data through the large language model to obtain a text sequence corresponding to the prompt instruction data. The large language model performs inference prediction on the text sequence corresponding to the prompt instruction data based on the prior knowledge corresponding to the corporate abbreviation sample learned in the pre-training stage (e.g., the model parameters obtained by supervised fine-tuning in the pre-training stage), thereby generating a probability distribution corresponding to the corporate abbreviation data. The large language model outputs the corporate abbreviation data corresponding to the current corporate name data based on the probability distribution.

[0069] In the above-mentioned method for generating corporate abbreviations, by obtaining the corporate name data to be processed; performing named entity recognition on the corporate name data to obtain entity recognition results of the corporate name data under multiple entity categories; constructing prompt instruction data corresponding to the large language model using the entity recognition results under multiple entity categories according to the training corpus of the large language model; inputting the prompt instruction data into the large language model to obtain corporate abbreviation data corresponding to the corporate name data generated by the large language model, the prompt instruction data constructed by the entity recognition results under multiple entity categories can be used to improve the data processing granularity of the large language model and the interpretability of the large language model in processing the abbreviation generation task corresponding to the current corporate name data, thereby improving the accuracy of the corporate abbreviation generation method. In addition, since the corporate abbreviation data is generated by the large language model when the above-mentioned method for generating corporate abbreviations is adopted, the strong natural language understanding ability of the large language model can be utilized to make the semantics of the generated corporate abbreviation data more coherent.

[0070] In an exemplary embodiment, Figure 3 As shown, a pre-training method for a large language model is provided, including the following steps S302 to S306. Among them:

[0071] Step S302, obtaining enterprise name samples, entity recognition samples of the enterprise name samples under multiple entity categories, and enterprise abbreviation samples corresponding to the enterprise name samples.

[0072] Optionally, in some embodiments, the server may obtain enterprise name samples, entity recognition samples of enterprise name samples under multiple entity categories, and enterprise abbreviation samples corresponding to enterprise name samples from a local database or an open source website. Alternatively, in other embodiments, the server may also receive enterprise name samples manually annotated by users, entity recognition samples of enterprise name samples under multiple entity categories, and enterprise abbreviation samples corresponding to enterprise name samples from a client interaction interface.

[0073] Step S304, using the enterprise name samples, entity recognition samples and enterprise abbreviation samples, combined with the business requirement information of the abbreviation generation task, to construct a training corpus.

[0074] The business requirement information may be used to represent the user's expectations for the abbreviation generation task. For example, the business requirement information may include, but is not limited to, the expected value for the text length of the enterprise abbreviation data, the expected value for the entity categories contained in the enterprise abbreviation data, the expected value for the word order of the entity recognition results under different entity categories in the enterprise abbreviation data, etc.

[0075] Exemplarily, a training corpus template corresponding to the abbreviation generation task may be stored in the server. The server may read the business requirement information corresponding to the abbreviation generation task input by the user from the client interaction interface. The enterprise name sample, entity recognition sample, enterprise abbreviation sample and business requirement information are respectively filled into the corresponding positions in the training corpus template to form the training corpus.

[0076] Step S306: Use the training corpus to perform supervised fine-tuning training on the initial large language model to obtain a pre-trained large language model.

[0077] Among them, supervised fine-tuning training, referred to as SFT training, is a training method that uses labeled data as training data.

[0078] Optionally, in some embodiments, the server may input the training corpus into the initial large language model, and perform the abbreviation generation task according to the enterprise name samples and entity recognition samples in the training corpus through the initial large language model to generate an abbreviation generation result corresponding to the enterprise name sample. According to the loss value between the abbreviation generation result and the enterprise abbreviation sample corresponding to the enterprise name sample in the training corpus, a preset optimization algorithm (gradient descent algorithm, genetic algorithm, particle swarm algorithm, etc.) is used to fine-tune the model parameters related to the abbreviation generation task in the initial large language model to obtain a fine-tuned large language model. Repeat the above operation of inputting the training corpus into the large language model for abbreviation generation processing until the number of training times of the fine-tuned large language model reaches the preset number threshold, or the loss value of the fine-tuned large language model reaches the preset loss threshold, and then terminate the model training operation. The large language model at this time is used as a pre-trained large language model.

[0079] In this embodiment, the initial large language model is supervised and fine-tuned by using a training corpus constructed using company name samples, entity recognition samples, company abbreviation samples, and business demand information to obtain a pre-trained large language model. The pre-trained large language model can be adapted to the specific task of generating company abbreviations and the specific data sets of company name samples, entity recognition samples, company abbreviation samples, and business demand information, thereby helping to improve the performance of the pre-trained large language model in performing the task of generating company abbreviations, thereby presenting a faster abbreviation generation speed and a higher abbreviation generation accuracy.

[0080] Since the large language model is trained with question-answering sentences, it can better understand the context information and adapt to complex contexts, so as to generate text and answer questions more accurately. Therefore, in an exemplary embodiment, the training corpus can be constructed in the form of question-answering. Figure 4As shown, the above step S304 may include steps S402 to S406. Among them:

[0081] Step S402, using the enterprise name samples, entity recognition samples and business requirement information to construct problem description information corresponding to the abbreviation generation task.

[0082] Exemplarily, the server can use the business demand information to construct the category description information of the entity categories that the abbreviation generation task needs to focus on, and the length description information of the text length limit of the enterprise abbreviation data generated by the abbreviation generation task. The entity recognition samples under each entity category are used to construct the part-of-speech description information corresponding to the enterprise name sample. The category description information, length description information, and part-of-speech description information are respectively filled into the corresponding problem description template to form the problem description information corresponding to the abbreviation generation task.

[0083] Optionally, in an exemplary embodiment, the server may generate the following question description information: "query (indicating the question statement of the abbreviation generation task for training the pre-trained large model)": "Your task is to extract enterprise abbreviation data from enterprise name data, focusing on ( Category description information in business requirement information ), the maximum length of the text of the enterprise abbreviation data is ( Length description information in business requirement information ). ( Sample company name and sample company name in Entity recognition samples for each entity category ), what is its corporate abbreviation data? ".

[0084] Step S404, using the enterprise abbreviation sample to construct the reply description information corresponding to the abbreviation generation task.

[0085] Optionally, in an exemplary embodiment, the server may construct the following reply description information using the enterprise abbreviation sample: "response (indicating the result sentence of the abbreviation generation task for the expected pre-trained large model to answer)": "( Sample company name )".

[0086] Step S406: construct a training corpus corresponding to the abbreviation generation task based on the question description information and the answer description information.

[0087] Optionally, in an exemplary embodiment, the server may concatenate the question description information and the answer description information corresponding to the same enterprise name sample to obtain a training corpus corresponding to the abbreviation generation task of the enterprise name sample:

[0088] {"query (represents the question statement used to train the pre-trained large model for the abbreviation generation task)":"Your task is to summarize the company abbreviation data from a company name data, focusing on ( Category description letter in business requirement information interest ), the maximum length of the text of the enterprise abbreviation data is ( Length description information in business requirement information ). ( Company Name Sample And the entity recognition samples of the enterprise name samples under each entity category ), what is its enterprise abbreviation data? ", "response (indicates the result sentence that the abbreviation generation task expects the pre-trained large model to answer)" : "( Company name Book )"}.

[0089] In this embodiment, by utilizing company name samples, entity recognition samples, business demand information, and company abbreviation samples, a training corpus corresponding to the abbreviation generation task is constructed in the form of questions and answers. This allows the training corpus to include the task text characteristics in the specific field of company abbreviation generation, thereby helping the subsequent large-scale language model pre-trained using the training corpus to have a higher abbreviation generation accuracy in the field of company abbreviation generation.

[0090] In an exemplary embodiment, Figure 5 As shown, the above step S208 may include the following steps S502 to S506. Among them:

[0091] Step S502: perform word embedding processing on the prompt instruction data through a large language model to obtain a word vector sequence corresponding to the prompt instruction data.

[0092] Exemplarily, the server can perform word segmentation processing on the prompt instruction data through a large language model to obtain a word segmentation result corresponding to the prompt instruction data. The large language model is used to vectorize the word segmentation result corresponding to the prompt instruction data based on the mapping relationship between words and word vectors learned in the pre-training phase, and the word segmentation results are spliced ​​according to the original word order of each word segmentation result in the prompt instruction data to obtain a word vector sequence corresponding to the prompt instruction data.

[0093] Step S504, using a large language model to process the word vector sequence using the model parameters obtained by supervised fine-tuning in the pre-training phase, to generate a probability distribution corresponding to the enterprise abbreviation data.

[0094] Exemplarily, a large language model can be supervised and fine-tuned during the pre-training phase using a training corpus containing business requirement information on target entity categories and target text lengths, so that when the pre-trained large language model uses the model parameters obtained through supervised fine-tuning to generate abbreviations during the application phase, it can pay more attention to the impact of entity recognition results under the target entity category on corporate abbreviation data, and output corporate abbreviation data that meets the target text length.

[0095] Taking the large language model of the autoregressive language model as an example, the server can use the model parameters obtained by fine-tuning the supervision in the pre-training phase of the large language model to perform the following processing on the word vector sequence corresponding to the prompt instruction data:

[0096] According to the correlation between each word vector in the word vector sequence and the enterprise abbreviation data, the attention weight of each word vector in the word vector sequence is determined. The target word vector in the word vector sequence that matches the target entity category is subjected to attention weighting processing using the attention weight corresponding to the target entity category, thereby obtaining the current attention weight of the target word vector. For example, the current attention weight of the target word vector can be obtained by adding the attention weight corresponding to the target entity category on the basis of the original attention weight of the target word vector. Alternatively, the attention weight of the target word vector can be directly updated using the attention weight corresponding to the target entity category, thereby serving as the current attention weight of the target word vector. According to each word vector in the word vector sequence and the current attention weight of each word vector, a target word vector sequence is formed. According to each word vector in the target word vector sequence, candidate words for enterprise abbreviation data that meet the target text length are combined. According to the attention weight corresponding to each word vector and the model parameters obtained by supervised fine-tuning in the pre-training stage, the probability of each candidate word belonging to the enterprise abbreviation data is generated. Thus, a probability distribution corresponding to the enterprise abbreviation data is formed.

[0097] Step S506: determine the enterprise abbreviation data according to the probability distribution through a large language model.

[0098] Exemplarily, the server may output the candidate word with a probability value greater than a preset probability threshold in the probability distribution as the enterprise abbreviation data, or may output the candidate word with the largest probability value in the probability distribution as the enterprise abbreviation data.

[0099] In this embodiment, by using prompt instruction data to provide prompt information for the abbreviation generation task of the large language model, and using the large language model to generate enterprise abbreviation data, the enterprise abbreviation generation can be made more in line with the user's business needs, thereby improving the accuracy of the enterprise abbreviation data.

[0100] In an exemplary embodiment, the above step S204 may also include: converting the company name data into corresponding text sequence data, and inputting the text sequence data into a pre-trained entity extraction model; performing named entity recognition based on the context information of the text sequence data through the entity extraction model to obtain entity recognition results for the company name data under multiple entity categories.

[0101] Exemplarily, the server may store pre-trained entity extraction models, such as a bidirectional encoder representation network model (Bidirectional Encoder Representations from Transformers, referred to as a BERT model), an enhanced representation network model (Enhanced Representation through kNowledge Integration, referred to as an ERNIE model), etc. After obtaining the company name data, the company name data may be converted into text sequence data that can be recognized and processed by the entity extraction model. The text sequence data of the company name data is input into the pre-trained entity extraction model, and the text sequence data may be segmented by the entity extraction model, and the word data obtained after the segmentation process may be converted into corresponding word embedding vectors. The entity extraction model generates the category probability of the word embedding vector under each entity category according to the context information of the word embedding vector in the text sequence data. The entity category with the highest category probability is used as the entity category corresponding to the word embedding vector, thereby obtaining the entity recognition results of the company name data output by the entity extraction model under multiple entity categories.

[0102] In this embodiment, entity extraction models are used to extract entity recognition results of enterprise name data under multiple entity categories, and the extraction efficiency of entity recognition results can be improved by using entity extraction models with higher computing speeds.

[0103] In an exemplary embodiment, the above step S208 may also include: inputting the prompt instruction data into a large language model to obtain an abbreviation generation result generated by the large language model; when it is determined that the abbreviation generation result exists in the enterprise name data, using the abbreviation generation result as the enterprise abbreviation data.

[0104] Exemplarily, the server may input the prompt instruction data into the large language model, and refer to the abbreviation generation method provided in the above embodiment to obtain the abbreviation generation result generated by the large language model. String matching is performed on the abbreviation generation result and the enterprise name data. When it is determined that the abbreviation generation result exists in the enterprise name data, the abbreviation generation result is used as the enterprise abbreviation data.

[0105] Optionally, in some implementations, when it is determined that there is no abbreviation generation result in the enterprise name data, a prompt message indicating a model operation error may be returned to the client interaction interface. Alternatively, the model parameters of the abbreviation generation task in the large language model may be adjusted, and then the prompt instruction data may be input into the adjusted large language model to repeat the abbreviation generation operation.

[0106] In this embodiment, after the large language model outputs the generation result, it is detected whether the abbreviation generation result is in the enterprise name data, so as to determine the enterprise abbreviation data corresponding to the enterprise name data. This can avoid using text content that is not in the enterprise name data as enterprise abbreviation data, thereby improving the accuracy of the enterprise abbreviation data.

[0107] In an exemplary embodiment, Figure 6 As shown, a method for generating a corporate abbreviation is also provided, including the following steps S602 to S610. Among them:

[0108] Step S602, obtaining the enterprise name data to be processed.

[0109] Step S604, converting the company name data into corresponding text sequence data and inputting it into a pre-trained entity extraction model to obtain entity recognition results of the company name data under multiple entity categories.

[0110] Exemplarily, a pre-trained entity extraction model can be run in the server. The enterprise name data to be processed is obtained, and the enterprise name data is converted into text sequence data that can be recognized and processed by the entity extraction model. The text sequence data is input into the entity extraction model for named entity recognition, and entity recognition results of the enterprise name data under multiple entity categories are obtained. Among them, the operation steps of performing named entity recognition through the entity extraction model can be implemented by referring to the method of named entity recognition provided in the above embodiment, and will not be elaborated here.

[0111] Optionally, in some implementations, the entity extraction model may be trained using samples of corporate names annotated with entity identification tags under entity categories such as trade names, business attributes, regions, and organizational forms.

[0112] Step S606, based on the training corpus of the large language model, entity recognition results under multiple entity categories are used to construct prompt instruction data corresponding to the large language model.

[0113] Exemplarily, a pre-trained large language model may be run in the server. The entity recognition results under multiple entity categories in the current enterprise name data are used to replace the enterprise name samples and entity recognition samples of the problem description information in the training corpus of the large language model to form new problem description information, and obtain prompt instruction data corresponding to the large language model.

[0114] Among them, the pre-training method of the large language model may include: obtaining company name samples, entity recognition samples of the company name samples under multiple entity categories, and company abbreviation samples corresponding to the company name samples; using the company name samples, entity recognition samples and business demand information to construct question description information corresponding to the abbreviation generation task; using the company abbreviation samples to construct answer description information corresponding to the abbreviation generation task; constructing training corpus corresponding to the abbreviation generation task based on the question description information and the answer description information; and using the training corpus to perform supervised fine-tuning training on the initial large language model to obtain a pre-trained large language model.

[0115] Optionally, in some implementations, the enterprise name sample may include QQHEGX Catering Management Co., Ltd., where QQHE is the entity identification sample of the enterprise name sample under the region category, GX is the entity identification sample of the enterprise name sample under the trade name category, catering management is the entity identification sample of the enterprise name sample under the business attribute category, and Co., Ltd. is the entity identification sample of the enterprise name sample under the organizational form category. The enterprise abbreviation sample corresponding to the enterprise name sample may include GX Catering.

[0116] The business demand information may include information on entity recognition samples under entity category A, entity recognition samples under entity category B, and entity recognition samples under entity category C that need to be focused on, as well as information that the text length of the enterprise abbreviation data needs to be within 2n characters (that is, the length of n Chinese characters).

[0117] In this regard, the server can generate the corresponding training corpus:

[0118] {"query (represents the problem of the abbreviation generation task used to train the pre-trained large model)":"Your task is to extract the company's abbreviation from a company name, focusing on entity category A, entity category B and entity category C. The abbreviation is up to 2n characters. The company name data is: QQHEGX Catering Management Co., Ltd., where QQHE is the region, GX is the business name, catering management is the business attribute, and Co., Ltd. is the organizational form. What is its company abbreviation?","response (represents the result of the abbreviation generation task used to expect the pre-trained large model to answer)":"GX Catering"}.

[0119] Optionally, in some other embodiments, the enterprise name data may include SZSWC Tea Co., Ltd., where SZ is the entity recognition result of the enterprise name data under the region category, SWC is the entity recognition result of the enterprise name data under the trade name category, Tea is the entity recognition result of the enterprise name data under the business attribute category, and Co., Ltd. is the entity recognition result of the enterprise name data under the organizational form category. The server may generate the following prompt instruction data based on the above training corpus and the entity recognition result of the current enterprise name data:

[0120] {"query (represents the problem of the abbreviation generation task used to train the pre-trained large model)":"Your task is to extract the company's abbreviation from a company name, focusing on entity category A, entity category B and entity category C. The abbreviation is up to 2n characters. The company name data is: SZSWC Tea Co., Ltd., where SZ is the region, SWC is the trade name, tea is the business attribute, and Co., Ltd. is the organizational form. What is its company abbreviation?"}.

[0121] Step S608, input the prompt instruction data into the large language model, and generate a short name generation result corresponding to the prompt instruction data through the large language model according to the model parameters obtained by fine-tuning the supervision in the pre-training stage.

[0122] Step S610: When it is determined that there is an abbreviation generation result in the enterprise name data, the abbreviation generation result is used as the enterprise abbreviation data.

[0123] For example, the server may input the prompt instruction data into a large language model, and may process the prompt instruction data using the model parameters obtained by fine-tuning the supervision in the pre-training stage through the large language model to generate a short name generation result corresponding to the prompt instruction data. It is detected whether the short name generation result is in the enterprise name data. When it is determined that the short name generation result exists in the enterprise name data, the short name generation result is used as the enterprise short name data.

[0124] In this embodiment, the large language model is pre-trained by using training corpus constructed by using enterprise name samples, entity recognition samples, enterprise abbreviation samples and business demand information, and the entity extraction model is used to extract entity recognition results under multiple entity categories from the current enterprise name data to be processed. According to the training corpus of the large language model, the entity recognition results under multiple entity categories are used to form prompt instruction data, and the prompt instruction data is input into the pre-trained large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data. The entity recognition results under multiple entity categories can be used to increase the data processing granularity of the large language model, making the large language model more interpretable in the field of enterprise abbreviation generation, thereby improving the generation accuracy of enterprise abbreviation data. At the same time, the strong natural language processing capabilities of the large language model can also improve the semantic coherence of enterprise abbreviation data.

[0125] 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.

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

[0127] In an exemplary embodiment, Figure 7 As shown, a device 700 for generating an abbreviation of an enterprise is provided, comprising: a data acquisition module 702, an entity recognition module 704, an instruction construction module 706 and an abbreviation generation module 708, wherein:

[0128] The data acquisition module 702 is used to acquire the enterprise name data to be processed.

[0129] The entity recognition module 704 is used to perform named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories.

[0130] The instruction construction module 706 is used to construct prompt instruction data corresponding to the large language model based on the training corpus of the large language model and the entity recognition results under multiple entity categories.

[0131] The abbreviation generation module 708 is used to input the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

[0132] In an exemplary embodiment, the enterprise abbreviation generation device 700 further includes a model pre-training module. The model pre-training module includes: a sample acquisition unit, which is used to acquire enterprise name samples, entity recognition samples of enterprise name samples under multiple entity categories, and enterprise abbreviation samples corresponding to the enterprise name samples; a corpus construction unit, which is used to construct training corpus using enterprise name samples, entity recognition samples, and enterprise abbreviation samples in combination with business demand information of the abbreviation generation task; and a supervised fine-tuning unit, which is used to perform supervised fine-tuning training on the initial large language model using the training corpus to obtain a pre-trained large language model.

[0133] In an exemplary embodiment, the corpus construction unit is also used to construct question description information corresponding to the abbreviation generation task using company name samples, entity recognition samples and business demand information; to construct reply description information corresponding to the abbreviation generation task using company abbreviation samples; and to construct training corpus corresponding to the abbreviation generation task based on the question description information and the reply description information.

[0134] In an exemplary embodiment, the abbreviation generation module 708 includes: a word embedding unit, which is used to perform word embedding processing on the prompt instruction data through a large language model to obtain a word vector sequence corresponding to the prompt instruction data; a probability generation unit, which is used to process the word vector sequence through a large language model using model parameters obtained by supervised fine-tuning in the pre-training stage to generate a probability distribution corresponding to the enterprise abbreviation data; and a model inference unit, which is used to determine the enterprise abbreviation data according to the probability distribution through a large language model.

[0135] In an exemplary embodiment, the entity recognition module 704 is also used to convert the company name data into corresponding text sequence data, and input the text sequence data into a pre-trained entity extraction model; the entity extraction model performs named entity recognition based on the context information of the text sequence data to obtain entity recognition results for the company name data under multiple entity categories.

[0136] In an exemplary embodiment, the abbreviation generation module 708 is also used to input the prompt instruction data into the large language model to obtain the abbreviation generation result generated by the large language model; when it is determined that the abbreviation generation result exists in the enterprise name data, the abbreviation generation result is used as the enterprise abbreviation data.

[0137] Each module in the above-mentioned enterprise abbreviation generation device 700 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.

[0138] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. 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 data such as enterprise name data, entity recognition results, training corpus, prompt instruction data, enterprise abbreviation data, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating an enterprise abbreviation is implemented.

[0139] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0140] In an exemplary embodiment, a computer device is 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-mentioned method embodiments when executing the computer program.

[0141] In an exemplary 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.

[0142] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0143] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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 the present application can include at least one of non-volatile memory 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), magnetic 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, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0144] 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 application.

[0145] 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 method for generating a corporate abbreviation, It is characterized in that The method comprises: Get the enterprise name data to be processed; Performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories; According to the training corpus of the large language model, entity recognition results under multiple entity categories are used to construct prompt instruction data corresponding to the large language model; The prompt instruction data is input into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

2. The method according to claim 1, It is characterized in that The pre-training method of the large language model includes: Obtaining enterprise name samples, entity recognition samples of the enterprise name samples under the multiple entity categories, and enterprise abbreviation samples corresponding to the enterprise name samples; Using the enterprise name samples, the entity recognition samples and the enterprise abbreviation samples, combined with the business requirement information of the abbreviation generation task, to construct the training corpus; The training corpus is used to perform supervised fine-tuning training on the initial large language model to obtain a pre-trained large language model.

3. The method according to claim 2, It is characterized in that The using the enterprise name samples, the entity recognition samples and the enterprise abbreviation samples, combined with the business requirement information of the abbreviation generation task, to construct the training corpus includes: Using the enterprise name sample, the entity recognition sample and the business requirement information, construct problem description information corresponding to the abbreviation generation task; Using the enterprise abbreviation sample to construct reply description information corresponding to the abbreviation generation task; The training corpus corresponding to the abbreviation generation task is constructed according to the question description information and the answer description information.

4. The method according to claim 2, It is characterized in that The step of inputting the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model includes: Performing word embedding processing on the prompt instruction data through the large language model to obtain a word vector sequence corresponding to the prompt instruction data; The word vector sequence is processed by using the model parameters obtained by supervised fine-tuning in the pre-training stage of the large language model to generate a probability distribution corresponding to the enterprise abbreviation data; The enterprise abbreviation data is determined by the large language model according to the probability distribution.

5. The method according to claim 1, It is characterized in that The performing named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories includes: Convert the enterprise name data into corresponding text sequence data, and input the text sequence data into a pre-trained entity extraction model; The entity extraction model performs named entity recognition according to the context information of the text sequence data to obtain entity recognition results of the enterprise name data under multiple entity categories.

6. The method according to any one of claims 1 to 5, It is characterized in that The step of inputting the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model includes: Inputting the prompt instruction data into the large language model to obtain a short name generation result generated by the large language model; When it is determined that the abbreviation generation result exists in the enterprise name data, the abbreviation generation result is used as the enterprise abbreviation data.

7. A device for generating a corporate abbreviation, It is characterized in that The device comprises: A data acquisition module is used to acquire the enterprise name data to be processed; An entity recognition module, used to perform named entity recognition on the enterprise name data to obtain entity recognition results of the enterprise name data under multiple entity categories; An instruction construction module, used to construct prompt instruction data corresponding to the large language model using entity recognition results under multiple entity categories according to the training corpus of the large language model; The abbreviation generation module is used to input the prompt instruction data into the large language model to obtain the enterprise abbreviation data corresponding to the enterprise name data generated by the large language model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that 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, It is 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, It is 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

Cited By

  • Fund product name identification method and device, equipment, medium and product

    CN121391483A