Virtual resource processing request processing method and device, computer equipment and storage medium
By receiving virtual resource processing requests and using the models in the preset model library for processing, the problem of low processing efficiency of virtual resource is solved, and the automated processing of virtual resources is realized, and processing efficiency is improved.
Patent Information
- Application Number
- CN202411138385.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-27
AI Technical Summary
The processing efficiency of virtual resource in the prior art is mainly due to the inability of manual processing to effectively cope with the complexity and diversity of large amounts of data resources.
By receiving virtual resource processing requests input by users, the request type is determined, and processing is based on the question-answer model, summary extraction model, risk assessment model and investment advice generation model in the preset model library, the processing of different types of requests is automated.
It improves the efficiency of virtual resource processing, realizes the machine to automatically process different types of virtual resource requests, reduces manual intervention, and improves processing efficiency.
Smart Images

Figure CN119204392A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for processing a virtual resource processing request. Background Art
[0002] Virtual resources refer to data resources from banks, credit reporting agencies, or enterprises. These data resources have multiple dimensions and complex sources. Reasonable analysis and processing of virtual resources is a key research topic.
[0003] Currently, users often analyze and process virtual resources manually. However, as the number of virtual resources increases, the manual processing method has a very low efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for processing virtual resource processing requests that can improve the efficiency of virtual resource processing in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for processing a virtual resource processing request, the method comprising:
[0006] Receive a virtual resource processing request input by a user;
[0007] Determining a request type of the virtual resource processing request;
[0008] Based on the request type of the virtual resource processing request and the correspondence between the request type and the model, a target model matching the virtual resource processing request is obtained from a preset model library; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model;
[0009] The virtual resource processing request is processed based on the target model to obtain a processing result.
[0010] In one of the embodiments, determining the request type of the virtual resource processing request includes:
[0011] Obtaining user demand keywords from the virtual resource processing request, and determining the entity type and part of speech of the user demand keywords; determining the request type of the virtual resource processing request based on the entity type and part of speech of the user demand keywords; or,
[0012] A model selection instruction input by a user is determined based on the virtual resource processing request, and a request type of the virtual resource processing request is determined based on the model selection instruction.
[0013] In one embodiment, the method further comprises:
[0014] Get a sample set of virtual resource processing requests;
[0015] Based on the request type corresponding to the virtual resource processing request sample, the virtual resource processing request sample set is divided into at least two virtual resource processing request sample subsets;
[0016] For each virtual resource processing request sample subset, the current virtual resource processing request sample subset is used as training data to train and obtain a model corresponding to the virtual resource processing request sample subset;
[0017] Based on the models corresponding to each subset of virtual resource processing request samples, the question-answering model, summary extraction model, risk assessment model and investment advice model in the preset model library are obtained.
[0018] In one embodiment, the step of using the current virtual resource processing request sample subset as training data to obtain a model corresponding to the virtual resource processing request sample subset includes:
[0019] For each sample in the current virtual resource processing request sample subset, preprocess the current sample; perform word segmentation on the preprocessed sample to obtain multiple word segments; mark the part of speech, entity type and sentiment polarity for each word segment to obtain the marked word segment corresponding to the current sample;
[0020] The labeled segmented words corresponding to each sample are used as training data to train a model corresponding to the virtual resource processing request sample subset.
[0021] In one embodiment, the step of obtaining a sample set of virtual resource processing requests includes:
[0022] Determine sample sources, sample acquisition frequency, and the types of sample requests that virtual resources need to handle;
[0023] Based on the sample source, sample acquisition frequency, and type requirements of virtual resource processing request samples, virtual resource processing request samples are acquired, and based on the acquired virtual resource processing request samples, the virtual resource processing request sample set is constructed.
[0024] In one embodiment, the method of using the labeled segmented words corresponding to each sample as training data to obtain a model corresponding to the subset of virtual resource processing request samples includes:
[0025] If the current virtual resource processing request sample subset is a question and answer sample set, then determine the standard answer information corresponding to each sample; input the labeled word segmentation corresponding to each sample into the initial question and answer model to obtain the model output answer information corresponding to each sample; for each sample, compare the standard answer information corresponding to the sample and the model output answer information corresponding to the sample to obtain a comparison result, and adjust the parameters of the initial question model based on the comparison results corresponding to each sample until the accuracy of the initial question and answer model is within the preset accuracy range to obtain the question and answer model.
[0026] If the current virtual resource processing request sample subset is a risk assessment sample set, each sample is marked with a risk type; the labeled word segmentation corresponding to each sample is input into the risk assessment model to obtain the risk type corresponding to each sample; based on the risk type label corresponding to each sample and the risk type corresponding to each sample, the parameters of the initial risk classification model are adjusted until the classification accuracy of the initial risk classification model is within the preset classification accuracy range, thereby obtaining the risk assessment model.
[0027] In a second aspect, the present application further provides a processing device for a virtual resource processing request, the device comprising:
[0028] A receiving module, used for receiving a virtual resource processing request input by a user;
[0029] A determination module, used to determine the request type of the virtual resource processing request;
[0030] A first acquisition module is used to acquire a target model matching the virtual resource processing request from a preset model library based on the request type of the virtual resource processing request and the correspondence between the request type and the model; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model;
[0031] The processing module is used to process the virtual resource processing request based on the target model to obtain a processing result.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0033] 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 steps in the above-mentioned method embodiments are implemented.
[0034] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0035] The above-mentioned processing method, apparatus, computer equipment, storage medium and computer program product for virtual resource processing request, after receiving the virtual resource processing request input by the user, the present application determines the request type of the virtual resource processing request, and then obtains the target model matching the virtual resource processing request from the preset model library based on the request type of the virtual resource processing request and the correspondence between the request type and the model, the preset model library includes a question-answering model, a summary extraction model, a risk assessment model and an investment advice generation model, thereby processing the virtual resource processing request based on the target model to obtain a processing result. It can be seen that the present application can select the corresponding model to process the request based on different types of virtual resource processing requests, and different types of virtual resource processing requests can be processed by machine automation instead of manual processing, thereby improving the processing efficiency of virtual resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 A flowchart of a method for processing a virtual resource processing request in one embodiment;
[0038] Figure 2 A flowchart of a method for processing a virtual resource processing request in another embodiment;
[0039] Figure 3 This is a schematic diagram of the modules in the terminal;
[0040] Figure 4 is a structural block diagram of a processing device for processing virtual resource requests in one embodiment;
[0041] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] 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.
[0043] In one embodiment, Figure 1 As shown, a method for processing a virtual resource processing request is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0044] Step S101: receiving a virtual resource processing request input by a user;
[0045] The terminal receives a virtual resource processing request input by a user. The virtual resource processing request is used to request processing of the virtual resource to be processed. The virtual resource processing request includes the virtual resource to be processed.
[0046] Step S102: Determine the request type of the virtual resource processing request;
[0047] The terminal determines a request type of a virtual resource processing request, where the request type includes a question-and-answer request, a summary extraction request, a risk assessment request, and a request to generate an investment proposal.
[0048] If the request type of the virtual resource processing request is a question-and-answer request, the virtual resource to be processed is a question, for example, a financial-related question input by a user in the financial field, so that the target model in the present application can output the answer to the question.
[0049] If the request type of the virtual resource processing request is a summary extraction request, the virtual resource to be processed is text or voice information to be processed, such as a bank announcement or an analysis report, so that the target model in the present application scheme can perform summary extraction on this information.
[0050] If the request type of the virtual resource processing request is a risk assessment request, then the above-mentioned virtual resources to be processed are virtual resources to be risk assessed, for example, they may be the company's financial statements, the company's transaction information in the bank, and the company's credit status, so that the target model in the present application scheme can perform enterprise risk assessment based on this information.
[0051] If the request type of the virtual resource processing request is an investment advice request, then the above-mentioned virtual resources to be processed are virtual resources used to generate investment advice, for example, they may be the historical profitability, risk index, key product information, etc. of the invested product, so that the target module in the present application scheme can generate advice on whether to invest in the invested product based on this information; or, for example, it may be the current operating conditions of the enterprise, and the target module in the present application scheme can determine the investable products and investment directions of the enterprise based on the operating conditions of the enterprise.
[0052] Step S103: based on the request type of the virtual resource processing request and the correspondence between the request type and the model, a target model matching the virtual resource processing request is obtained from a preset model library; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model;
[0053] There is a one-to-one correspondence between the request type and the model. The preset model library stores models corresponding to all request types. Based on the request type of the virtual resource processing request, the target model matching the virtual resource processing request can be obtained from the preset model library.
[0054] The preset model library includes a question-answering model corresponding to a question-answering request, a summary extraction model corresponding to a summary extraction request, a risk assessment model corresponding to a risk assessment request, and an investment advice generation model corresponding to an investment advice request.
[0055] Step S104: Process the virtual resource processing request based on the target model to obtain a processing result.
[0056] The terminal processes the virtual resources in the virtual resource processing request accordingly based on the determined target model, and obtains the processing result of the virtual resources.
[0057] The virtual resource processing results include answers to user questions, summaries of virtual resources, risk assessment results, and investment recommendations.
[0058] After receiving the virtual resource processing request input by the user, the present application determines the request type of the virtual resource processing request, and then obtains the target model that matches the virtual resource processing request from the preset model library based on the request type of the virtual resource processing request and the correspondence between the request type and the model. The preset model library includes a question-answer model, a summary extraction model, a risk assessment model, and an investment advice generation model, thereby processing the virtual resource processing request based on the target model to obtain a processing result. It can be seen that the present application can select the corresponding model to process the request based on different types of virtual resource processing requests, and different types of virtual resource processing requests can be processed by machine automation instead of manual processing, thereby improving the processing efficiency of virtual resources.
[0059] In one of the embodiments, determining the request type of the virtual resource processing request includes: obtaining user demand keywords from the virtual resource processing request, and determining the entity type and part of speech of the user demand keywords; determining the request type of the virtual resource processing request based on the entity type and part of speech of the user demand keywords; or, determining a model selection instruction input by the user based on the virtual resource processing request, and determining the request type of the virtual resource processing request based on the model selection instruction.
[0060] One possible implementation method is: the user inputs the virtual resource processing request by inputting text or voice. If the virtual resource processing request is voice, it needs to be converted into text first. After the terminal obtains the virtual resource processing request, it performs text recognition to extract the user demand keywords;
[0061] For example, if the virtual resource processing request is a risk assessment request, then the virtual resource processing request must include user demand keywords such as "please conduct a risk assessment" or "what is the risk level"; for another example, if the virtual resource processing request is a question and answer request, then the questions in the question and answer request are user demand keywords; for another example, if the virtual resource processing request is a request to generate investment advice, then the virtual resource processing request includes user demand keywords such as "how to choose investment products" or "what is the investment direction"; for another example, if the virtual resource processing request is a summary extraction request, then the virtual resource processing request includes user demand keywords such as "what is the core idea of the announcement" or "what does the text mainly want to express".
[0062] The terminal determines the entity type and sentiment polarity of the user demand keyword, where the entity type refers to: for example, "risk", "investment advice", "summary", etc. are different entity types, and the part of speech refers to whether the word is a subject, subject, predicate, object, attributive, adverbial, or complement, etc. Therefore, the terminal determines the request type of the virtual resource processing request based on the entity type and part of speech.
[0063] Another possible implementation is that: while inputting the virtual resource, the user can select a button corresponding to the model on the terminal interface to input a model selection instruction, thereby generating a virtual resource processing request based on the virtual resource input by the user and the model selection instruction input by the user;
[0064] Therefore, the terminal can determine the model selection instruction input by the user based on the virtual resource processing request, thereby determining what kind of processing the user wants to perform on the virtual resource based on the model selection instruction, and obtain the request type of the virtual resource processing request.
[0065] In this embodiment, the request type can be quickly determined based on the model selection instruction input by the user, so as to quickly determine the corresponding model to process the virtual resource processing request, thereby accelerating the processing speed of the virtual resource processing request.
[0066] As mentioned above, the model library of this application contains multiple models, and the process of training multiple models is specifically as follows:
[0067] Reference Figure 2 In one embodiment, the method further comprises:
[0068] Step S201, obtaining a sample set of virtual resource processing requests;
[0069] Step S202: dividing the virtual resource processing request sample set into at least two virtual resource processing request sample subsets based on the request type corresponding to the virtual resource processing request sample;
[0070] Step S203: for each virtual resource processing request sample subset, use the current virtual resource processing request sample subset as training data to train and obtain a model corresponding to the virtual resource processing request sample subset;
[0071] Step S204: based on the models corresponding to each virtual resource processing request sample subset, obtain the question-answer model, summary extraction model, risk assessment model and investment advice model in the preset model library.
[0072] The terminal obtains a virtual resource processing request sample set, which includes virtual resource processing request samples of multiple request types, so that based on the request types corresponding to the virtual resource processing request samples, the virtual resource processing request samples corresponding to the same request type can be divided into a virtual resource processing request sample subset, and at least two virtual resource processing request sample subsets can be obtained by dividing in this way;
[0073] Similarly, the corresponding request types of the virtual resource processing request sample include question-answering request, summary extraction request, risk assessment request, and investment advice generation request.
[0074] For each virtual resource processing request sample subset, the current virtual resource processing request sample subset is used as training data to train a model corresponding to the current virtual resource processing request sample subset. Each virtual resource processing request sample subset can be trained to obtain a model, and ultimately a question-and-answer model, a summary extraction model, a risk assessment model, and an investment advice model are obtained through training.
[0075] In one of the embodiments, the current virtual resource processing request sample subset is used as training data to train a model corresponding to the virtual resource processing request sample subset, including: preprocessing the current sample for each sample in the current virtual resource processing request sample subset; performing word segmentation on the preprocessed sample to obtain multiple word segments; labeling part of speech, entity type and sentiment polarity for each word segment to obtain the labeled word segment corresponding to the current sample; and using the labeled word segment corresponding to each sample as training data to train a model corresponding to the virtual resource processing request sample subset.
[0076] Taking a model obtained by training a single virtual resource processing request sample subset as an example, the current virtual resource processing request sample subset includes multiple samples, and the terminal performs data cleaning, removal of blank characters, punctuation marks, stop words, noise words and other preprocessing on the current sample;
[0077] The terminal performs word segmentation on the preprocessed samples, dividing the samples into several words or phrases;
[0078] The terminal labels the words or phrases and assigns one or more labels to each word or phrase, such as part of speech, entity type, sentiment polarity, etc.
[0079] The entity type of the word segmentation in this embodiment is not equivalent to the entity type of the above-mentioned user demand keyword. In this embodiment, multiple entity types are preset in the terminal, which can analyze which entity type a word belongs to and mark the word. These entity types may include "person's name", "place name", "company name", "credit report", "loan amount", etc. The sentiment polarity can be positive sentiment, neutral sentiment or negative sentiment, and the interpretation of part of speech is similar to that in the above-mentioned embodiment.
[0080] The labeled word segments corresponding to each sample are input into the initial model, and the parameters of the initial model are adjusted, and finally the model corresponding to the subset of virtual resource processing request samples is adjusted.
[0081] In this embodiment, the model corresponding to the subset of virtual resource processing request samples obtained through training may be a generative pre-training (GPT) model or a bidirectional encoder representation from transformers (BERT) model.
[0082] Specifically, the training process of the question-answering model, summary extraction model, risk assessment model, and investment advice generation model is as follows, where the training process of the question-answering model is:
[0083] The method uses the labeled word segmentation corresponding to each sample as training data to train a model corresponding to the virtual resource processing request sample subset, including: if the current virtual resource processing request sample subset is a question and answer sample set, determining the standard answer information corresponding to each sample; inputting the labeled word segmentation corresponding to each sample into the initial question and answer model to obtain the model output answer information corresponding to each sample; for each sample, comparing the standard answer information corresponding to the sample and the model output answer information corresponding to the sample to obtain a comparison result, and adjusting the parameters of the initial question model based on the comparison results corresponding to each sample until the accuracy of the initial question and answer model is within a preset accuracy range to obtain the question and answer model.
[0084] A pre-trained initial question-answering model, such as GPT, BERT, etc., is loaded from a preset position. Each sample in the question-answering sample set is a question sample. In addition to the corresponding labeled segmented words, each sample is also labeled with standard answer information. After the labeled segmented words corresponding to each sample are input into the initial question-answering model, the initial question-answering model performs text recognition on the labeled segmented words through natural language processing technology, and determines the output answer information corresponding to the question sample based on the recognition result. Based on the difference between the output answer information of each question sample and the standard answer information, the initial question-answering model is parameter-adjusted to optimize the loss function. When the difference between the output answer information of the initial question-answering model and the standard answer information is within the preset difference range, it means that the accuracy of the initial question-answering model is within the preset accuracy range. The initial question-answering model after parameter adjustment is used as the question-answering model, and the question-answering model is saved in a preset position for subsequent call.
[0085] In this embodiment, a question-answering model can be trained to adapt to tasks in the financial field.
[0086] The training process of the risk assessment model is:
[0087] One possible scenario is that the risk assessment model may be a classification model, in which the labeled word segmentation corresponding to each sample is used as training data to train a model corresponding to the virtual resource processing request sample subset, including: if the current virtual resource processing request sample subset is a risk assessment sample set, each sample is marked with a risk type; the labeled word segmentation corresponding to each sample is input into the risk assessment model to obtain the risk type corresponding to each sample; based on the risk type label corresponding to each sample and the risk type corresponding to each sample, the parameters of the initial risk classification model are adjusted until the classification accuracy of the initial risk classification model is within a preset classification accuracy range, thereby obtaining the risk assessment model.
[0088] In this embodiment, the labeled segmented words corresponding to each risk assessment sample are input into the risk assessment model for classification to determine the categories to which the risk assessment samples belong, and each category corresponds to a risk type, so that the risk type corresponding to each risk assessment sample can be obtained. Similarly, the purpose of adjusting the parameters of the initial risk classification model is to optimize the loss function.
[0089] Another possible situation is that the risk assessment model is a neural network model, and the labeled word segmentations corresponding to each sample are used as training data to train a model corresponding to the virtual resource processing request sample subset, including: if the current virtual resource processing request sample subset is a risk assessment sample set, then the standard risk information of each sample is determined; the labeled word segmentations corresponding to each sample are input into the initial risk assessment model to obtain the model output risk information corresponding to each sample; the standard risk information corresponding to the sample and the model output risk information corresponding to the sample are compared to obtain a comparison result, and the parameters of the initial risk assessment model are adjusted based on the comparison results corresponding to each sample until the accuracy of the initial risk assessment model is within the corresponding preset accuracy range to obtain the risk assessment model.
[0090] In this embodiment, a risk assessment model can be trained to adapt to tasks in the financial field.
[0091] The training process of the summary extraction model is:
[0092] The method of using the labeled word segmentation corresponding to each sample as training data to train a model corresponding to the virtual resource processing request sample subset includes: if the current virtual resource processing request sample subset is a summary extraction sample set, determining the standard summary information corresponding to each sample; inputting the labeled word segmentation corresponding to each sample into the initial summary extraction model, extracting keywords of each sample through the initial summary extraction model, and obtaining summary information corresponding to each sample; for each sample, comparing the standard summary information corresponding to the sample with the summary information output by the model corresponding to the sample to obtain a comparison result, and adjusting the parameters of the initial summary extraction model based on the comparison results corresponding to each sample until the accuracy of the initial summary extraction model is within a preset accuracy range, thereby obtaining the summary extraction model.
[0093] The training process of the investment advice model is similar to the training method of the risk assessment model. Similarly, the investment advice model can be a classification model or a neural network model, and its specific training method is not described in detail. After the investment advice model is trained, the investment advice model is used to process virtual resource processing requests to obtain different types of investment advice, such as high-risk investment or stable investment; or different classifications of the investment advice model correspond to different financial products, and different classification results are obtained after the virtual resource processing request is input into the investment advice model, and the financial product corresponding to the classification result is determined. The determined financial product is the obtained investment advice.
[0094] In one embodiment, the step of obtaining a sample set of virtual resource processing requests includes:
[0095] Determine sample sources, sample acquisition frequency, and the types of sample requests that virtual resources need to handle;
[0096] Based on the sample source, sample acquisition frequency, and type requirements of virtual resource processing request samples, virtual resource processing request samples are acquired, and based on the acquired virtual resource processing request samples, the virtual resource processing request sample set is constructed.
[0097] The terminal can manage and update the sample source, sample acquisition frequency, and type requirements of virtual resource processing request samples. The sample source includes the webpage address for acquiring the sample. Thus, the terminal periodically acquires virtual resource processing request samples from the location indicated by the sample source according to the sample acquisition frequency, and acquires virtual resource processing request samples of corresponding types according to the type requirements of the required virtual resource processing request samples.
[0098] The type requirement of the virtual resource processing request sample includes the type of the required virtual resource processing request sample and the number of samples of the type.
[0099] Based on the acquired virtual resource processing request samples, a virtual resource processing request sample set is constructed.
[0100] In summary, refer to Figure 3 ,In this application, the terminal includes a data acquisition module, a data preprocessing module, a data storage module, a language model training module and an intelligent service module;
[0101] A data collection module, used to collect text data related to the financial field from multiple data sources, including but not limited to financial news, social media, research reports, company announcements, financial statements, etc.;
[0102] The data preprocessing module is used to perform preprocessing operations such as cleaning, word segmentation, and annotation on the collected text data to remove irrelevant information, extract key information, and add structured information;
[0103] A data storage module, used to store the preprocessed text data in a database for subsequent retrieval and analysis;
[0104] A language model training module, which is used to train a language model for tasks in the financial field based on a pre-trained general language model and pre-processed text data. The language model includes but is not limited to a question-answering model, a summary extraction model, a risk assessment model, and an investment advice model;
[0105] The intelligent service module is used to call the corresponding language model according to the user's input or request, generate and output intelligent service results, and the intelligent service results include but are not limited to answers to user questions, summaries of announcements, risk assessments, and investment recommendations.
[0106] The data acquisition module further includes:
[0107] The data source management submodule is used to manage and update the data source address, type requirements, frequency and other information of the text data;
[0108] A data capture submodule, used to capture text data from the data source regularly or in real time according to the information provided by the data source management submodule;
[0109] The data parsing submodule is used to parse the text data captured by the data capturing submodule and extract the required text content and metadata, such as title, author, time, source, etc.;
[0110] The data preprocessing module further includes:
[0111] A data cleaning submodule is used to clean the text content and metadata provided by the data parsing submodule to remove blank characters, punctuation marks, stop words, noise words, etc.;
[0112] A data segmentation submodule is used to segment the text content provided by the data cleaning submodule, and divide the text content into a number of words or phrases;
[0113] A data annotation submodule is used to annotate the words or phrases provided by the data segmentation submodule, and to assign one or more labels to each word or phrase, such as part of speech, entity type, sentiment polarity, etc.;
[0114] The language model training module further includes:
[0115] The pre-trained model loading submodule is used to load pre-trained general language models such as GPT, BERT, etc. from a preset location;
[0116] The financial field data loading submodule is used to obtain the text data annotated by the data annotation submodule from the database as training data;
[0117] The language model fine-tuning submodule is used to fine-tune the parameters of the pre-trained general language model based on the pre-trained general language model and training data by optimizing the loss function and other methods to adapt it to financial tasks;
[0118] The language model saving submodule is used to save the fine-tuned pre-trained general language model in a preset location for subsequent calls;
[0119] The intelligent service module further includes:
[0120] A user input receiving submodule, used to receive a virtual resource processing request input by a user via voice or text;
[0121] The user input processing submodule is used to process the virtual resource processing request received by the user input receiving submodule, such as converting to text format, word segmentation, and annotation;
[0122] The language model selection submodule is used to select a suitable language model for calling according to the request type of the virtual resource processing request processed by the user input processing submodule;
[0123] An intelligent service result generation submodule, used to generate a corresponding intelligent service result according to the virtual resource processing request processed by the user input processing submodule and the language model selected by the language model selection submodule;
[0124] The intelligent service result output submodule is used to output the intelligent service result generated by the intelligent service result generation submodule to the user in the form of voice or text.
[0125] This application has the following effects:
[0126] A pre-trained general language model is used as the basic model, which can use large-scale text data for unsupervised or semi-supervised learning to improve the generalization and expression capabilities of the model;
[0127] Based on the pre-trained general language model and financial text data, a language model for financial tasks is trained, which can adapt to different financial tasks, such as question answering, summarization, investment advice generation, risk classification, etc.
[0128] According to the user's virtual resource processing request, the appropriate language model is selected for calling, and the intelligent service results are generated and output, which can realize the natural language interaction between the user and the system and improve the user experience and satisfaction;
[0129] Different types of virtual resource processing requests can be processed automatically by machines instead of manually, which improves the processing efficiency of virtual resources.
[0130] 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.
[0131] Based on the same inventive concept, the embodiment of the present application also provides a processing device for virtual resource processing requests for implementing the processing method for virtual resource processing requests 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 embodiments of the processing device for one or more virtual resource processing requests provided below can refer to the limitations of the processing method for virtual resource processing requests above, and will not be repeated here.
[0132] In an exemplary embodiment, Figure 4 As shown, a processing device 400 for processing a virtual resource processing request is provided, comprising:
[0133] The receiving module 401 is used to receive a virtual resource processing request input by a user;
[0134] A determination module 402, configured to determine a request type of the virtual resource processing request;
[0135] The first acquisition module 403 is used to acquire a target model matching the virtual resource processing request from a preset model library based on the request type of the virtual resource processing request and the correspondence between the request type and the model; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model;
[0136] The processing module 404 is used to process the virtual resource processing request based on the target model to obtain a processing result.
[0137] In one embodiment, the determination module 402 is specifically configured to:
[0138] Obtaining user demand keywords from the virtual resource processing request, and determining the entity type and part of speech of the user demand keywords; determining the request type of the virtual resource processing request based on the entity type and part of speech of the user demand keywords; or,
[0139] A model selection instruction input by a user is determined based on the virtual resource processing request, and a request type of the virtual resource processing request is determined based on the model selection instruction.
[0140] In one embodiment, the device further comprises:
[0141] A second acquisition module is used to acquire a sample set of virtual resource processing requests;
[0142] A division module, used to divide the virtual resource processing request sample set into at least two virtual resource processing request sample subsets based on the request type corresponding to the virtual resource processing request sample;
[0143] A model training module, for each virtual resource processing request sample subset, using the current virtual resource processing request sample subset as training data, to train a model corresponding to the virtual resource processing request sample subset;
[0144] The model determination module is used to obtain the question-answering model, summary extraction model, risk assessment model and investment advice model in the preset model library based on the models corresponding to each virtual resource processing request sample subset.
[0145] In one embodiment, when the model training module uses the current virtual resource processing request sample subset as training data to train a model corresponding to the virtual resource processing request sample subset, it is specifically used to:
[0146] For each sample in the current virtual resource processing request sample subset, preprocess the current sample; perform word segmentation on the preprocessed sample to obtain multiple word segments; mark the part of speech, entity type and sentiment polarity for each word segment to obtain the marked word segment corresponding to the current sample;
[0147] The labeled segmented words corresponding to each sample are used as training data to train a model corresponding to the virtual resource processing request sample subset.
[0148] In one embodiment, the second acquisition module is specifically used for:
[0149] Determine sample sources, sample acquisition frequency, and the types of sample requests that virtual resources need to handle;
[0150] Based on the sample source, sample acquisition frequency, and type requirements of virtual resource processing request samples, virtual resource processing request samples are acquired, and based on the acquired virtual resource processing request samples, the virtual resource processing request sample set is constructed.
[0151] In one embodiment, when the model training module uses the labeled segmented words corresponding to each sample as training data to train the model corresponding to the virtual resource processing request sample subset, it is specifically used to:
[0152] If the current virtual resource processing request sample subset is a question and answer sample set, then determine the standard answer information corresponding to each sample; input the labeled word segmentation corresponding to each sample into the initial question and answer model to obtain the model output answer information corresponding to each sample; for each sample, compare the standard answer information corresponding to the sample and the model output answer information corresponding to the sample to obtain a comparison result, and adjust the parameters of the initial question model based on the comparison results corresponding to each sample until the accuracy of the initial question and answer model is within the preset accuracy range to obtain the question and answer model.
[0153] If the current virtual resource processing request sample subset is a risk assessment sample set, each sample is marked with a risk type; the labeled word segmentation corresponding to each sample is input into the risk assessment model to obtain the risk type corresponding to each sample; based on the risk type label corresponding to each sample and the risk type corresponding to each sample, the parameters of the initial risk classification model are adjusted until the classification accuracy of the initial risk classification model is within the preset classification accuracy range, thereby obtaining the risk assessment model.
[0154] Each module in the processing device for processing virtual resource processing requests 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 operations corresponding to each module.
[0155] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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 in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a processing method for a virtual resource processing request is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0156] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0157] 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.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0159] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0160] 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.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] 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 processing a virtual resource processing request, characterized in that: The method comprises: Receive a virtual resource processing request input by a user; Determining a request type of the virtual resource processing request; Based on the request type of the virtual resource processing request and the correspondence between the request type and the model, a target model matching the virtual resource processing request is obtained from a preset model library; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model; The virtual resource processing request is processed based on the target model to obtain a processing result.
2. The method according to claim 1, characterized in that The determining the request type of the virtual resource processing request comprises: Obtaining user demand keywords from the virtual resource processing request, and determining the entity type and part of speech of the user demand keywords; determining the request type of the virtual resource processing request based on the entity type and part of speech of the user demand keywords; or, A model selection instruction input by a user is determined based on the virtual resource processing request, and a request type of the virtual resource processing request is determined based on the model selection instruction.
3. The method according to claim 1, characterized in that The method further comprises: Get a sample set of virtual resource processing requests; Based on the request type corresponding to the virtual resource processing request sample, the virtual resource processing request sample set is divided into at least two virtual resource processing request sample subsets; For each virtual resource processing request sample subset, the current virtual resource processing request sample subset is used as training data to train and obtain a model corresponding to the virtual resource processing request sample subset; Based on the models corresponding to each subset of virtual resource processing request samples, the question-answering model, summary extraction model, risk assessment model and investment advice model in the preset model library are obtained.
4. The method according to claim 3, characterized in that The step of using the current virtual resource processing request sample subset as training data to train a model corresponding to the virtual resource processing request sample subset includes: For each sample in the current virtual resource processing request sample subset, preprocess the current sample; perform word segmentation on the preprocessed sample to obtain multiple word segments; mark the part of speech, entity type and sentiment polarity for each word segment to obtain the marked word segment corresponding to the current sample; The labeled segmented words corresponding to each sample are used as training data to train a model corresponding to the virtual resource processing request sample subset.
5. The method according to claim 3, characterized in that: The obtaining of a sample set of virtual resource processing requests includes: Determine sample sources, sample acquisition frequency, and the types of sample requests that virtual resources need to handle; Based on the sample source, sample acquisition frequency, and type requirements of virtual resource processing request samples, virtual resource processing request samples are acquired, and based on the acquired virtual resource processing request samples, the virtual resource processing request sample set is constructed.
6. The method according to claim 4, characterized in that The method of using the labeled segmented words corresponding to each sample as training data to train a model corresponding to the virtual resource processing request sample subset includes: If the current virtual resource processing request sample subset is a question-answering sample set, then determine the standard answer information corresponding to each sample; input the marked word segmentation corresponding to each sample into the initial question-answering model to obtain the model output answer information corresponding to each sample; for each sample, compare the standard answer information corresponding to the sample and the model output answer information corresponding to the sample to obtain a comparison result, and adjust the parameters of the initial question model based on the comparison results corresponding to each sample until the accuracy of the initial question-answering model is within a preset accuracy range, thereby obtaining the question-answering model; If the current virtual resource processing request sample subset is a risk assessment sample set, each sample is marked with a risk type; the labeled word segmentation corresponding to each sample is input into the risk assessment model to obtain the risk type corresponding to each sample; based on the risk type label corresponding to each sample and the risk type corresponding to each sample, the parameters of the initial risk classification model are adjusted until the classification accuracy of the initial risk classification model is within the preset classification accuracy range, thereby obtaining the risk assessment model.
7. A processing device for processing a virtual resource processing request, characterized in that: The device comprises: A receiving module, used for receiving a virtual resource processing request input by a user; A determination module, used to determine the request type of the virtual resource processing request; A first acquisition module is used to acquire a target model matching the virtual resource processing request from a preset model library based on the request type of the virtual resource processing request and the correspondence between the request type and the model; the preset model library includes a question-answering model, a summary extraction model, a risk assessment model, and an investment advice generation model; The processing module is used to process the virtual resource processing request based on the target model to obtain a processing result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
