Detailed Description
In the description of the embodiments of the present application, those skilled in the art will appreciate that the embodiments of the present application may be implemented as a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Thus, embodiments of the present application may be embodied in the following forms: complete hardware, complete software (including firmware, resident software, micro-code, etc.), a combination of hardware and software. Furthermore, in some embodiments, embodiments of the application may also be implemented in the form of a computer program product in one or more computer-readable storage media having computer program code embodied therein.
Any combination of one or more computer-readable storage media may be employed by the computer-readable storage media described above. The computer-readable storage medium includes: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer readable storage medium include the following: portable computer diskette, hard disk, random Access Memory (RAM), read-only Memory (ROM), erasable programmable read-only Memory (EPROM), flash Memory (Flash Memory), optical fiber, compact disc read-only Memory (CD-ROM), optical storage device, magnetic storage device, or any combination thereof. In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, device.
The computer program code embodied in the computer readable storage medium may be transmitted using any appropriate medium, including: wireless, wire, fiber optic cable, radio Frequency (RF), or any suitable combination thereof.
Computer program code for carrying out operations of embodiments of the present application may be written in assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages, including an object oriented programming language such as: java, smalltalk, C ++, also include conventional procedural programming languages, such as: c language or similar programming language. The computer program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computers may be connected via any sort of network, including: a Local Area Network (LAN) or a Wide Area Network (WAN), which may be connected to the user's computer or to an external computer.
The embodiment of the application describes a method, a device and electronic equipment through flowcharts and/or block diagrams.
It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions. These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer readable program instructions may also be stored in a computer readable storage medium that can cause a computer or other programmable data processing apparatus to function in a particular manner. Thus, instructions stored in a computer-readable storage medium produce an instruction means which implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
In view of the great amount of labor required for the existing enterprise legal risk assessment, related technologies attempt to introduce computer technology to relieve the pressure of manual review, thereby improving the working efficiency. Initially, the introduction of computer technology only enables the tedious document arrangement work to be light and cannot assist the decision of the evaluator. Large models (also known as base models) refer to a class of large machine learning models that are trained on large scale data (typically in a self-supervised or semi-supervised learning manner) to accommodate various downstream tasks. Accordingly, related art attempts have been made to assist the evaluator in making decisions by virtue of the predictive capabilities of large models. However, large models are difficult to make efficient predictions in the field of enterprise risk assessment.
The inventor of the present application found that a large model is difficult to make predictions that help decisions in enterprise risk assessment, because the panelist facing the enterprise risk assessment in the related art is an enterprise manager and employee, and thus has the following inherent drawbacks:
(1) In the related art, when a large model is used for enterprise risk assessment, in order to facilitate the surveyed object to accurately understand meaning expression of the problem and facilitate filling, the design of the problem is simpler, and excessive details cannot be involved in the preset problem or the depth of the problem cannot be increased;
(2) The risk assessment in the related art is too dependent on the answers of people (such as employees of an enterprise or organization to be assessed), but related people are related to the interests of the enterprise to be assessed, and subjective factors, memory deviation and the like when the related people answer preset questions can cause distortion of the assessment result.
Also, in performing risk assessment on an enterprise or organization, a review involving a large collection of manuscripts is also required. The manuscript collection refers to a large number of files (such as contract templates, regulations, various agreements and the like) capable of reflecting the fact conditions inside enterprises, and the files are wide in variety and huge in quantity. In order to understand the potential legal risk of an enterprise as comprehensively as possible, a great deal of manpower is required to review the manuscript collection of the enterprise. Thus, the efficiency of risk assessment of an enterprise or organization is greatly reduced.
In view of the foregoing problems that the related art fails to overcome, the present application provides a risk assessment method based on a large model. Embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Fig. 1 shows a flowchart of a risk assessment method based on a large model according to an embodiment of the present application. As shown in fig. 1, the method at least comprises the following steps:
The method comprises the steps of configuring a database, wherein the database is at least configured with a problem set, a rule set, a mapping relation set of the problem set and the rule set, association criteria and a prompt instruction set;
Inputting an object set to be evaluated, wherein the object set comprises a manuscript collection set;
vectorizing the problem set through a vector coding model so as to obtain a problem vector set;
vectorizing the object set through a vector coding model so as to obtain an object vector set;
Performing first search recall in a database to obtain at least one rule with a mapping relation with the problem;
performing second search recall in the database to obtain objects represented by a first number of object vectors with relevance to the problem vector meeting a relevance criterion;
combining the results of the first search recall and the second search recall with a preset prompt instruction to generate a prompt language;
And transmitting the prompt language to the large model, so that output data of the risk information corresponding to the object set is output through the large model.
Specifically, at least a problem set, a rule set, a mapping relation set of the problem set and the rule set, an association criterion and a prompt instruction set are configured in the database. It should be understood that other data, such as user information, may be configured in the database configured by the present application, in addition to the above data.
Optionally, the database provided by the embodiment of the application comprises at least one sub-database. Different data are configured in a plurality of sub-databases according to the personalized requirements of users. For N users, N sub-databases are correspondingly arranged, wherein each sub-database is configured with a problem set, a rule set, a mapping relation set of the problem set and the rule set, association criteria and a prompt instruction set. Therefore, business data of different users are isolated, so that the data security and privacy are ensured. It should be appreciated that the above-described users include businesses to be tested and third party assessment institutions. It should be understood that the sub-databases may be independent of each other or may be interrelated. The sub-database can be realized by establishing a plurality of sub-tables in the same database, or can be realized by establishing a plurality of new databases.
According to an embodiment of the present application, the set of questions in the database includes at least one question associated with an event and/or behavior of the enterprise or organization under test during operation. For example, the at least one problem relates to: pricing policies of enterprises for products and services, sales policies of enterprises, material purchasing policies of enterprises, etc. Illustratively, the question includes "do recruitment information and recruitment advertisements for the business under test contain inappropriate terms? ". As another example, the question also includes "is the production and/or qualification of the business under test matched the business actually operated? ". As another example, the question also includes "what are the stakeholders of the enterprise under test? ". According to an embodiment of the application, the set of rules in the database includes relevant legal and department regulations involved in the operation of the enterprise or organization. It will be appreciated that the laws and regulations faced by an enterprise or organization depend on the industry, scope of operation, place of registration, company size, and business activity involved. Optionally, the rule set includes laws and regulations of any one or more regions. Still alternatively, the rule set includes laws and regulations of any one or more industries. Still alternatively, the set of rules includes department regulations. The set of mappings of the set of questions to the set of rules in the database may take a variety of forms. For example, an association table is set, and the problem data with association and the identification field of the set data are stored in one piece of data, so that all rule data associated with the problem data can be obtained through searching and recall, and all problem data associated with the rule data can be obtained. For another example, the mapping is performed by means of keyword association, the keywords may be extracted by means of preset, intelligent extraction or other feasible methods, and then for each keyword, relevant data including the keyword is searched in the problem set and the rule set. Therefore, when searching the rule data mapped by the problem data, all keywords contained in the problem data can be searched first, and all rule data containing the keywords, namely all rule data associated with the problem data, can be searched in the rule set. It should be understood that the mapping relation set is not limited to the above-mentioned form, and other possible mapping manners may be used as the mapping manner of the present application.
An object set to be evaluated is input, the object set including a manuscript collection. The manuscript collection is a collection of files, records, data and the like generated by enterprises or organizations when carrying out certain specific activities, such as audit manuscripts, financial manuscripts, project manuscripts, labor contracts, company related operation rules and the like. These scripts may cover various information and data of a company and may be used to fully describe the operational status of an enterprise or organization. The existence mode of the manuscript collection can be in the forms of paper files, electronic files, databases and the like, and the manuscript collection can be converted into a format of the manuscript collection meeting the system requirement by the technical means commonly used in the field, such as optical character recognition and the like. It should be understood that various prior art ways of performing the conversion are within the scope of the present application.
According to an embodiment of the present application, a problem vector set is obtained by vectorizing the problem set by a vector coding model. According to an embodiment of the present application, an object vector set is obtained by vectorizing an object set by a vector coding model. In the embodiment of the application, the problem set and the object set can be used as input parameters, and the vector coding model is input to complete vectorization of the set data.
Vectorization refers to vectorization of natural language, which is a process of representing natural language text as a numerical vector. The goal of this process is to convert the text into a form that can be processed and analyzed by a computer for various natural language processing tasks such as classification, clustering, emotion analysis, machine translation, etc.
The main idea of vectorization is to map text to a low latitude vector space so that similar text has similar locations in the vector space. Thus, the computer can measure the relationship between the texts by calculating the distance or similarity between the vectors.
There are many vectorization methods, such as a Bag of Words model (Bag of Words), a word embedding model (Word Embedding), a statistical model, a deep learning model, etc., and different vectorization modes can be selected according to specific requirements.
Vector coding models are key techniques in the field of natural language processing (NLP, natural Language Processing) and other machine learning for converting text data into a numerical vector representation. The goal of the vector coding model is to capture the semantic and syntactic features of the vocabulary and convert it into a form that can be processed by machine learning algorithms. For example, the vector coding model includes BERT, GPT, roBERTa, etc. Of course, the selection of the large model is not limited to the above model, and a model capable of realizing natural language vectorization in the prior art can be used as the large model in the present application.
And carrying out first search recall in the database to obtain at least one rule with a mapping relation with the problems in the problem set. The first search recall may be a query in the database through an SQL statement, or may be performed in other manners, which specifically relate to the type of the database. Illustratively, for any one or more questions, the rules corresponding to the any one or more questions are recalled in the rule set according to the mapping relationship in the mapping relationship set of the question set and the rule set.
Performing second search recall in the database to obtain objects represented by a first number of object vectors with relevance to the problem vector meeting a relevance criterion; and the search condition of the second search recall is the association criterion, and the problem vector is compared with the object vector according to the association criterion. In the AI field, comparing two vectors typically involves calculating the similarity between them or their distance in vector space. After the comparison is completed, a first number of object vectors meeting the association criterion are selected, and the object mapped with the object vectors is found through the mapping relation between the object vectors and the objects. Optionally, a second search recall is performed in the database. Preferably, the set of object vectors and the set of problem vectors are configured in different sub-databases, respectively.
And combining the results of the first search recall and the second search recall with a preset prompt instruction to generate a prompt language. The method comprises the steps of determining a first search recall result and a second search recall result, wherein the first search recall result is a rule set related to a problem, the second search recall result is an object set meeting a related criterion based on a problem vector, and generating a prompt language by taking a preset format as a template in combination with the related problem. The structure of the prompt language may be to define the corresponding field of the relevant legal regulations, then define the corresponding field manuscript collection, and finally define the manuscript collection of the instruction (for example, whether the relevant manuscript collection meets the regulations of the legal regulations). It should be understood that the prompt language format is not limited to the above format, and other prompt language formats capable of acquiring risk assessment information are all within the scope of the present application.
In some alternative embodiments, the database configured with the problem set, the rule set, the set of mappings of the problem set to the rule set, the association criteria, and the hint instruction set is referred to as a first sub-database. Correspondingly, in some example implementations, the risk assessment method provided by the embodiment of the present application further includes:
after vectorizing the object set, configuring a second sub-database, wherein the second sub-database is at least configured with the object set, the object vector set, and a second mapping relation set of the object vector set and the object set;
And carrying out second search recall in a second sub-database to obtain objects represented by a first number of object vectors, wherein the association degree of the objects with the problem vector meets the association criterion.
The prompt language is transferred to a Large Model (Large Model), so that output data of risk information corresponding to the object set is output through the Large Model. And inputting the generated prompt language as an input parameter into a large model to obtain risk assessment information. The large model can be a general large model or other large models capable of supporting problem interaction. Preferably, the large model in embodiments of the present application is a large language model (LLM, large Language Model). The output result of the large model is evaluation result information of whether relevant manuscript information of a company violates specified legal regulations aiming at specified problems.
In order to facilitate understanding of the technical solutions in some embodiments of the present application, the implementation process of the present application will be further described with reference to specific embodiments, which illustrate implementation of a risk assessment method based on a large model:
Firstly, configuring a database, creating a problem set table, creating a rule set table, creating a mapping relation table between a problem set and the rule set, and storing data into a corresponding data table; creating a correlation criterion table, and presetting correlation parameters including the size of the vector, the distance between the vector, a similarity threshold value, a domain weight and the like; creating a prompt language table and setting a prompt language format.
And then, collecting and sorting all manuscript collection sets of enterprises or organizations to be evaluated, digitizing all manuscript collection sets through electronic scanning, optical character recognition and other modes, generating an object set and storing the object set into a database. Vectorizing the problem set through a vector coding model to generate a problem vector set; and vectorizing the object set through a vector coding model to generate the object vector set.
Traversing the problem set, and circularly processing each problem in the problem set. Using SQL sentences to query all rules with mapping relation with the problem data in the database according to the mapping relation table of the problem set and the rule set; inquiring a problem vector corresponding to the problem data in a database, comparing the object vector with the problem vector, judging to obtain at least one object vector meeting the association criterion by comparing the vector value, the distance between the vectors and the cosine similarity between the vectors, and finding an object corresponding to the object vector through the mapping relation.
And querying the problem set and all rule sets and object sets related to the problem set from the database, and generating a prompt language according to the prompt language format in the database. For example: the question is "whether the company rules violate the regulations of the laws related to labor laws". The corresponding rule data may be:
1. The labor law 41: the working time can be prolonged after negotiation with a congregation and a laborer due to production and operation requirements of a human unit, and the working time generally cannot exceed one hour every day; for special reasons it is necessary to extend the working time not more than three hours per day, but not more than thirty-six hours per month, under conditions that ensure the physical health of the workers.
2. "Labor law" 44: there are one of the following situations in which a person should pay a payroll higher than the worker's normal working time according to the following criteria; arranging workers to prolong working time, and paying payroll consideration which is not lower than one hundred fifty percent of payroll; the workers can not arrange for complementary work in the rest day, and pay payroll not less than two hundred percent of payroll; the legal holiday schedules the workers to work, paying a payroll of not less than three hundred percent of payroll.
The corresponding object data is:
if overtime is required for project reasons, staff needs to apply, overtime fees are not calculated within 2 hours of overtime every day, and the overtime fees are calculated by dividing daily wages by 8 every hour after the overtime is more than two hours.
According to the prompt language format, the finally generated prompt language is as follows:
The following are relevant manuscripts of the enterprise:
1. If overtime is required for project reasons, staff needs to apply, overtime fees are not calculated within 2 hours of overtime every day, and the overtime fees are calculated by dividing daily wages by 8 every hour after the overtime is more than two hours. It should be understood that the specific manuscript content is not limited to text input, but may be a corresponding file uploaded, and the file format includes, but is not limited to, pdf, word, and the like.
The following are relevant legal regulations:
1. The labor law 41: the working time can be prolonged after negotiation with a congregation and a laborer due to production and operation requirements of a human unit, and the working time generally cannot exceed one hour every day; for special reasons it is necessary to extend the working time not more than three hours per day, but not more than thirty-six hours per month, under conditions that ensure the physical health of the workers.
2. "Labor law" 44: there are one of the following situations in which a person should pay a payroll higher than the worker's normal working time according to the following criteria; arranging workers to prolong working time, and paying payroll consideration which is not lower than one hundred fifty percent of payroll; the workers can not arrange for complementary work in the rest day, and pay payroll not less than two hundred percent of payroll; the legal holiday schedules the workers to work, paying a payroll of not less than three hundred percent of payroll. It will be appreciated that the relevant legal regulations may also be uploaded in the form of files, including but not limited to pdf, word, excel, jpg, etc.
Please determine from the above facts that if the company rules violate the regulations of the work law related spring?
The prompt language is used as an input parameter to be input into a general large model, and the obtained output parameter is risk assessment information, as follows:
The enterprise regulations, if overtime is required for project reasons, staff needs to apply for, overtime fees are not calculated within 2 hours of overtime every day, and the regulations of daily wages divided by 8 calculation are calculated every hour after more than two hours, so that the regulations of the relevant laws of labor laws are violated.
According to the 41 st and 44 th of the labor law, the arrangement of overtime of a worker by a human unit should be based on negotiation of the worker, and the prolonging of working time should not exceed three hours per day and thirty-six hours per month. The relevant rules violate the rules of labor law on overtime and overtime fee calculation.
For another example, the prompt language is:
1. The uploaded file is [ manuscript file name (e.g. labor contract template) ];
2. The manuscript file is evaluated according to the related laws and regulations of the people's republic of China.
Traversing all questions in the question set, and generating corresponding prompt languages by referring to the prompt language templates (or formats). It should be understood that the above prompt language template is only an example, and can be flexibly adjusted according to requirements in practical application.
And inputting all prompt languages into the general large model, and obtaining corresponding risk assessment information. Optionally, the risk assessment information includes a summary of the enterprise risk information, scoring and ranking answers obtained for each question.
In some optional embodiments of the present application, the mapping relationship between the problem set and the rule set at least satisfies:
any question in the question set includes at least one feature field;
at least one feature field maps at least one rule in the rule set.
Redundant data can be effectively removed by limiting the limiting relation between the problem set and the rule set, and search recall efficiency is improved.
According to some optional embodiments of the application, the association criteria comprise: a combination of one or more of similarity ordering, similarity threshold, domain weight, frequency weight, vector direction similarity, vector value size.
Typically, the correlation criterion is the basis for comparing the two vectors. In a large natural language model, if the similarity of two fields needs to be compared, the corresponding result can be calculated by vectorizing the fields to be compared and then carrying out mathematical calculation and comparison on the raw vectors.
Vectors are an important data structure language that can be used to represent a variety of complex data such as text, images, etc. The vector typically contains a plurality of elements, and the value of the vector is ultimately calculated from the values of the individual elements. The element values of the vectors converted from natural language are usually numbers, which represent some characteristic or semantic information of the text. In particular, elements in natural language vectors can have a variety of meanings, depending on the vector representation method and application scenario used.
For example, if the sentence is expressed as a whole as a vector, the elements in the vector may represent semantic information, emotional tendency, topic, etc. of the sentence. By converting sentences into vectors, similarity calculation, classification tasks, emotion analysis and the like of sentences can be performed.
For example, the similarity of two vectors may be compared by using cosine similarity. The cosine similarity is obtained by measuring the included angle between two vectors, and the result is represented by the cosine value of the included angle, wherein the value range is (-1, 1), and the larger the value is, the more similar the value is.
Assume that there are two vectors: AndThe similarity of cosine can be calculated using the following calculation formula:
Where θ represents the angle between the two vectors, a·b represents the inner product of the two vectors, and |a| and |b| represent the modulus of the vectors a and b.
In the process of comparing vectors, the calculation result can be finely adjusted through the domain weight and the frequency domain weight, the influence of different factors on the calculation result is adjusted, and the accuracy of the comparison result is improved.
It should be understood that which one or a combination of several judgment methods is used in the judgment process needs to be adjusted according to the actual evaluation requirement, and a balance point is found between accuracy and efficiency. It should be noted that the weights of the associated criteria are not constant, and the weights can be adjusted in a self-defined manner according to different evaluation requirements.
Fig. 2 shows a signaling diagram of a risk assessment method based on a large model according to an embodiment of the present application. In some embodiments, as shown in fig. 2, the large model-based risk assessment method is performed by:
Firstly, a database is configured, and at least a problem set, a rule set, a mapping relation set of the problem set and the rule set, association criteria and a prompt instruction set are configured in the database.
And the user sorts the company manuscript collection, generates an object to be evaluated, and transmits the object to a vector coding model.
The vector coding model vectorizes the object to be evaluated, generates an object vector set, and sends the object vector set to the database for storage.
And querying the problem set through a database, and transmitting the queried problem set into a vector coding model.
The vector coding model vectors the problem set, generates a problem vector, and sends the problem vector to the database for storage.
The database executes a first search recall, and queries at least one rule having a mapping relationship with any one or more questions in the question set according to the mapping relationship of the question set and the rule set.
The database executes a second search recall to obtain objects characterized by a first number of object vectors having relevance to the problem vector satisfying the relevance criteria.
And acquiring data from the database, combining the problem set, the first search recall result and the second search recall result with a preset prompt instruction in the database, generating a prompt language, and sending the prompt language to the large model as an input parameter.
And the output parameters generated by the large model according to the input parameters are output data of risk information corresponding to the object set.
In some embodiments, as shown in fig. 3, optionally, performing a second search recall in the set of objects, the step of obtaining the object characterized by the first number of object vectors having relevance to the problem vector satisfying the relevance criterion further comprises:
inputting an object set to be evaluated;
vectorizing the object set through a vector coding model to obtain an object vector set;
Comparing the problem vectors with the object vectors through the association criteria to obtain a first number of object vectors meeting the association criteria;
An object characterized by the object vector is extracted.
Wherein, the object set can be a manuscript collection of the enterprise; after the problem vector and the object vector are compared and all the object vectors with the similarity meeting the similarity threshold are found, the object represented by the object vector is also found according to the corresponding relation between the object vector and the object data, because the object is the necessary data required for generating the prompt language.
Fig. 4 shows a flowchart of a training method for a large model according to an embodiment of the present application, where the method includes:
the method comprises the steps of configuring a database, wherein at least a problem set, association criteria and a loss function are configured in the database; the association criteria include: one or more combinations of similarity ordering, similarity threshold, domain weight and frequency weight, vector direction similarity, vector value size;
inputting training data, wherein the training data comprises a manuscript collection set;
Comparing the association degree of each question in the question set with the training data based on at least one of the association criteria, marking the features meeting the association criteria in the training data with a first mark, and marking the features not meeting the association criteria in the training data with a second mark, so as to obtain at least one training data set;
And calling the loss function to perform at least one time of optimization on the vector coding model based on at least one training data set to obtain an optimized vector coding model.
By fine tuning the vector coding model, the accuracy of the returned data of the vector coding model can be effectively improved.
Illustrating an embodiment of a training method for a large model:
Firstly, configuring a database, creating a problem set table, creating a rule set table, creating a mapping relation table between a problem set and the rule set, and storing related data into a corresponding data table; establishing a correlation criterion table, and presetting related parameters such as the size of a vector, the distance of the vector, a similarity threshold value, a domain weight and the like; creating a prompt language table and setting a prompt language format;
Collecting the manuscript collection of a plurality of users as training data, generating all the manuscript collection into an object collection by means of intelligent scanning, picture character recognition and the like, wherein the object collection takes sentences in natural language as minimum units.
Vectorizing all object sets through a vector coding model to generate object vectors; vectorizing the problem set through a vector coding model to generate a problem vector.
Aiming at each problem vector, comparing cosine similarity with all object vectors to inquire n object vectors with highest similarity; and comparing the similarity with a similarity threshold value in the related criteria, and marking '1' in the related field if the similarity is larger than the similarity threshold value, otherwise marking '0', and obtaining the marked query result as a training result set.
In an embodiment of the application, contrastive Loss loss functions may be selected and supervised fine tuning (SFT, supervised fine tune) may be performed on the vector coding model to obtain a trained vector coding model.
And re-vectorizing the object set, the problem set and the rule set by using the trained vector coding model, re-judging the similarity and marking the similarity characteristics, and finally completing the training of the vector coding model through multiple rounds of training.
The accuracy of the obtained object vector can be effectively improved through the trained vector coding model, and finally the accuracy of the risk assessment result is improved.
In some embodiments, the vector coding model is optionally a pre-trained language model, such as BERT, GPT, roBERTa, or the like, that is optimized for fine tuning by the training method of the large model described above.
The risk assessment method based on the large model provided by the embodiment of the present application is described in detail above with reference to fig. 1 to fig. 4, and the method may also be implemented by a corresponding device, and the device of the risk assessment method based on the large model provided by the embodiment of the present application will be described in detail below with reference to fig. 5.
Fig. 5 shows a schematic structural diagram of a risk assessment device based on a large model according to an embodiment of the present application. As shown in fig. 5, the apparatus includes:
A database 501 configured with a question set, a rule set, a mapping relation set of the question set and the rule set, association criteria, and a hint instruction set; optionally, the database 501 includes a first sub-database and a second sub-database, where the database in the first sub-database configured with a problem set, a rule set, a mapping relation set of the problem set and the rule set, an association criterion, and a prompt instruction set is referred to as a first sub-database; the second sub-database is configured with an object set, an object vector set, and a second mapping relation set of the object vector set and the object set;
a vector encoding model 503 configured to vector a set of objects and a set of problems;
a judging module 504 configured to judge whether the association degree of the object vector and the problem vector satisfies an association criterion;
A search module 502 configured to search for rules having a mapping relationship with the problem vector;
The large model 505 is configured to output data of risk information corresponding to the object set based on the prompt language.
The operation flow of the device is as follows:
Inputting object data to be evaluated, such as enterprise manuscripts;
In the database 501, searching and obtaining a rule set through a searching module 502 according to the mapping relation between the problem set and the rule set;
inputting the object set and the rule set obtained by searching by the searching module 502 into the vector coding model 503, converting the object set into an object vector set, and converting the problem set into a problem vector;
Inputting the problem vector and the object vector into a judging module 504 to obtain an object vector meeting the association criterion;
According to the mapping relation, obtaining the problem and the object corresponding to the object vector, generating a prompt language according to the prompt instruction format, inputting the prompt language as an input parameter into the large model 505, and obtaining the output parameter as risk assessment information.
In addition, the embodiment of the application also provides an electronic device, which comprises a bus, a transceiver, a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the transceiver, the memory and the processor are respectively connected through the bus, and when the computer program is executed by the processor, the processes of the embodiment of the risk assessment method based on the large model can be realized, and the same technical effects can be achieved, so that repetition is avoided and redundant description is omitted.
In particular, referring to FIG. 6, an embodiment of the application also provides an electronic device that includes a bus 1110, a processor 1120, a transceiver 1130, a bus interface 1140, a memory 1150, and a user interface 1160.
In an embodiment of the present application, the electronic device further includes: a computer program stored on the memory 1150 and executable on the processor 1120, which when executed by the processor 1120 performs the steps of:
The method comprises the steps of configuring a database, wherein the database is at least configured with a problem set, a rule set, a mapping relation set of the problem set and the rule set, association criteria and a prompt instruction set;
Inputting an object set to be evaluated, wherein the object set comprises a manuscript collection set;
vectorizing the problem set through a vector coding model so as to obtain a problem vector set;
vectorizing the object set through a vector coding model so as to obtain an object vector set;
performing first search recall in a database to obtain at least one rule with a mapping relation with the problems in the problem set;
performing second search recall in the database to obtain objects represented by a first number of object vectors with relevance to the problem vector meeting a relevance criterion;
combining the results of the first search recall and the second search recall with a preset prompt instruction to generate a prompt language;
The prompt language is transferred to the large model, so that output data comprising risk information corresponding to the object set is output through the large model.
Optionally, the computer program, when executed by the processor 1120 to perform the step of "perform a second search recall in the database, obtaining an object characterized by a first number of object vectors having relevance to the problem vector satisfying the relevance criterion, causes the processor to implement the steps of:
inputting an object set to be evaluated;
vectorizing the object set through a vector coding model to obtain an object vector;
comparing the problem vectors with the object vectors according to the association criteria to obtain a first number of object vectors meeting the association criteria;
An object characterized by the object vector is extracted.
A transceiver 1130 for receiving and transmitting data under the control of the processor 1120.
In an embodiment of the application, represented by bus 1110, bus 1110 may include any number of interconnected buses and bridges, with bus 1110 connecting various circuits, including one or more processors, represented by processor 1120, and memory, represented by memory 1150.
Bus 1110 represents one or more of any of several types of bus structures, including a memory bus and a memory controller, a peripheral bus, an accelerated graphics Port (ACCELERATE GRAPHICAL Port, AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such an architecture includes: industry standard architecture (Industry Standard Architecture, ISA) bus, micro channel architecture (Micro Channel Architecture, MCA) bus, enhanced ISA (ENHANCED ISA, EISA) bus, video electronics standards association (Video Electronics Standards Association, VESA), peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus.
Processor 1120 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments may be implemented by instructions in the form of integrated logic circuits in hardware or software in a processor. The processor includes: general purpose processors, central processing units (Central Processing Unit, CPU), network processors (Network Processor, NP), digital signal processors (DIGITAL SIGNAL processors, DSP), application specific integrated circuits (Application SPECIFIC INTEGRATED circuits, ASIC), field programmable gate arrays (Field Programmable GATE ARRAY, FPGA), complex programmable logic devices (Complex Programmable Logic Device, CPLD), programmable logic arrays (Programmable Logic Array, PLA), micro control units (Microcontroller Unit, MCU) or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components. The methods, steps and logic blocks disclosed in the embodiments of the present application may be implemented or performed. For example, the processor may be a single-core processor or a multi-core processor, and the processor may be integrated on a single chip or located on multiple different chips.
The processor 1120 may be a microprocessor or any conventional processor. The steps of the method disclosed in connection with the embodiments of the present application may be performed directly by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in a random access Memory (Random Access Memory, RAM), flash Memory (Flash Memory), read-Only Memory (ROM), programmable ROM (PROM), erasable Programmable ROM (EPROM), registers, and so forth, as are known in the art. The readable storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
Bus 1110 may also connect together various other circuits such as peripheral devices, voltage regulators, or power management circuits, bus interface 1140 providing an interface between bus 1110 and transceiver 1130, all of which are well known in the art. Accordingly, the embodiments of the present application will not be further described.
The transceiver 1130 may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. For example: the transceiver 1130 receives external data from other devices, and the transceiver 1130 is configured to transmit the data processed by the processor 1120 to the other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, for example: touch screen, physical keyboard, display, mouse, speaker, microphone, trackball, joystick, stylus.
It should be appreciated that in embodiments of the present application, the memory 1150 may further comprise memory located remotely from the processor 1120, such remotely located memory being connectable to a server through a network. One or more portions of the above-described networks may be an ad hoc network (ad hoc network), an intranet, an extranet (extranet), a Virtual Private Network (VPN), a Local Area Network (LAN), a Wireless Local Area Network (WLAN), a Wide Area Network (WAN), a Wireless Wide Area Network (WWAN), a Metropolitan Area Network (MAN), the Internet (Internet), a Public Switched Telephone Network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless fidelity (Wi-Fi) network, and a combination of two or more of the above-described networks. For example, the cellular telephone network and wireless network may be a global system for mobile communications (GSM) system, code Division Multiple Access (CDMA) system, worldwide Interoperability for Microwave Access (WiMAX) system, general Packet Radio Service (GPRS) system, wideband Code Division Multiple Access (WCDMA) system, long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD) system, long term evolution-advanced (LTE-a) system, universal Mobile Telecommunications (UMTS) system, enhanced mobile broadband (Enhance Mobile Broadband, eMBB) system, mass machine class Communication (MASSIVE MACHINE TYPE of Communication, mMTC) system, ultra-reliable low latency Communication (Ultra Reliable Low Latency Communications, uRLLC) system, and the like.
It should be appreciated that the memory 1150 in embodiments of the present application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. Wherein the nonvolatile memory includes: read-Only Memory (ROM), programmable ROM (PROM), erasable Programmable EPROM (EPROM), electrically Erasable EPROM (EEPROM), or Flash Memory (Flash Memory).
Volatile memory can include random access memory (Random Access Memory, RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as: static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDRSDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, SLDRAM) and Direct memory bus random access memory (DRRAM). The memory 1150 of the electronic device described in embodiments of the present application includes, but is not limited to, the above and any other suitable types of memory.
In an embodiment of the application, memory 1150 stores the following elements of operating system 1151 and application programs 1152: an executable module, a data structure, or a subset thereof, or an extended set thereof.
Specifically, the operating system 1151 includes various system programs, such as: a framework layer, a core library layer, a driving layer and the like, which are used for realizing various basic services and processing tasks based on hardware. The applications 1152 include various applications such as: a media player (MEDIA PLAYER), a Browser (Browser) for implementing various application services. A program for implementing the method of the embodiment of the present application may be included in the application 1152. The application 1152 includes: applets, objects, components, logic, data structures, and other computer system executable instructions that perform particular tasks or implement particular abstract data types.
In addition, the embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process of the foregoing embodiment of the risk assessment method based on the large model, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
The computer-readable storage medium includes: transitory and non-transitory, permanent and non-permanent, removable and non-removable media are tangible devices that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium includes: electronic storage, magnetic storage, optical storage, electromagnetic storage, semiconductor storage, and any suitable combination of the foregoing. The computer-readable storage medium includes: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), non-volatile random access memory (NVRAM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassette storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanical coding (e.g., punch cards or bump structures in grooves with instructions recorded thereon), or any other non-transmission medium that may be used to store information that may be accessed by a computing device. In accordance with the definition in the present embodiments, the computer-readable storage medium does not include a transitory signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a pulse of light passing through a fiber optic cable), or an electrical signal transmitted through a wire.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus, electronic device, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one position, or may be distributed over a plurality of network units. Some or all of the units can be selected according to actual needs to solve the problem to be solved by the scheme of the embodiment of the application.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application is essentially or partly contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (including a personal computer, a server, a data center or other network devices) to perform all or part of the steps of the method according to the embodiments of the present application. And the storage medium includes various media as exemplified above that can store program codes.
In addition, an embodiment of the present application provides a computer program product, which includes a computer program, where the computer program when executed by a processor implements each process of the foregoing embodiment of the risk assessment method based on a large model, and the same technical effects can be achieved, and for avoiding repetition, a description is omitted herein.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the embodiment of the present application, and the changes or substitutions are covered by the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.