Insurance task processing method and device for adaptive block gating, equipment and medium
By using an adaptive block gating method to screen Transformer blocks to process insurance tasks, the problems of high cost and low efficiency in existing technologies are solved, and efficient and accurate insurance task processing is achieved.
Patent Information
- Application Number
- CN202510852797.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-10
AI Technical Summary
In the financial insurance and health insurance fields, existing technologies rely on manual processing of insurance tasks, which is inefficient, error-prone, and costly. In particular, the fine-tuning of large language models relies on high-quality labeled data and computing resources, making training and deployment expensive and inflexible.
An adaptive block gating method is adopted to obtain the feature vector of insurance task data, and a gating controller is used to filter out the target block from multiple Transformer blocks of the Transformer model. The processing result is determined based on the feature vector, and the calculation path is optimized by combining the insurance domain embedding matrix and the back propagation algorithm, and the parameters are dynamically adjusted.
It significantly improves the processing efficiency of insurance tasks, reduces the amount of calculation, lowers the computing cost, and improves the accuracy and flexibility of processing results.
Smart Images

Figure CN120765393A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of financial insurance and medical insurance, and particularly relates to an adaptive block-gated insurance task processing method and device, equipment and a medium. BACKGROUND
[0002] In the field of financial insurance and medical insurance, with the continuous expansion of business scale and the increasing complexity of the market, various types of insurance core business tasks, such as premium accounting, risk assessment, claim processing, and policy management, have significantly increased in quantity and complexity. In the face of a large number of insurance tasks with variable rules, the traditional manual processing method is not only inefficient and prone to errors, but also difficult to meet the timeliness requirements, and the operating costs are high. Therefore, how to efficiently, accurately and automatically process these core insurance tasks has become a key challenge to improve the service level and operational efficiency of the industry, and is also the focus of current technical research.
[0003] To address this challenge, the industry actively explores the use of artificial intelligence technology to achieve process automation. In recent years, large language models (LLMs) have shown great application potential due to their excellent capabilities in natural language understanding, generation, and reasoning. In the insurance field, the application of LLMs is gradually penetrating from general dialogue and content generation scenarios to more professional and complex rule-based core business links such as underwriting, claims processing, and customer service. The goal is to use the semantic understanding and logical reasoning capabilities of the model to automatically process insurance texts, understand clauses, analyze cases, and generate reports, in order to significantly improve processing efficiency and accuracy.
[0004] Currently, the main technical path for applying LLMs to specific insurance tasks is to fine-tune the pre-trained general large language model for domain adaptation. This method continues to train the model on specific insurance task data (such as historical policy texts, underwriting rule sets, and claim case records) to enable it to learn and master the professional knowledge, terminology, and business logic of the insurance field, thereby improving the model's performance on the target task.
[0005] However, this fine-tuning paradigm faces two significant inherent flaws in practice: First, it relies heavily on high-quality labeled data. Effective fine-tuning requires a large amount of precisely manually labeled insurance-related sample data to supervise model learning. In the insurance industry, obtaining such data is extremely costly, involving complex business knowledge annotation, sensitive information desensitization, and strict compliance reviews. Data scarcity severely constrains the model's training effectiveness and scope of application. Second, it consumes enormous computing resources. Fine-tuning large language models is inherently computationally intensive, and its demand for hardware resources (especially GPU computing power and storage) typically increases linearly with the number of model parameters, or even more rapidly. As models continue to scale in pursuit of higher performance, the computational and time costs required for fine-tuning rise sharply, making model training, deployment, and iterative updates extremely expensive and inflexible, placing a heavy burden on many insurance institutions. Summary of the Invention
[0006] The embodiments of the present invention provide an adaptive block-gated insurance task processing method, apparatus, device and medium, aiming to solve the problem of large computational complexity in existing insurance task processing.
[0007] In a first aspect, an embodiment of the present invention provides a method for processing an insurance task with adaptive block gating, which includes:
[0008] Acquiring task data of the insurance task, and determining a feature vector based on the task data;
[0009] Filtering a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller;
[0010] The processing result of the insurance task is determined based on the feature vector by the target Transformer block.
[0011] A further technical solution is that the target Transformer block is selected from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gate controller, including:
[0012] Obtaining an input vector from the feature vector based on a preset sliding window;
[0013] Obtaining a hidden state vector of the input vector through the gate controller;
[0014] Determining an activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block;
[0015] filtering, from the plurality of Transformer blocks of the Transformer model, a Transformer block with an activation probability greater than a preset activation probability threshold as the target Transformer block.
[0016] Further, the method further comprises:
[0017] determining a decay factor based on the gradient loss of the Transformer block;
[0018] determining an evaluation period based on the decay factor, and performing the step of determining the activation probability of the Transformer block based on the hidden state vector and the projection parameter of the Transformer block every evaluation period.
[0019] Further, the method further comprises:
[0020] determining an initial processing result of the insurance task based on the feature vector by the target Transformer block.
[0021] determining the processing result of the insurance task based on the initial processing result and a preset insurance domain embedding matrix.
[0022] Further, the method further comprises:
[0023] determining the initial processing result of the insurance task based on the feature vector by the target Transformer block.
[0024] Further, the method further comprises:
[0025] obtaining a contrastive embedding alignment loss between the initial processing result and the insurance domain embedding matrix;
[0026] adjusting the parameters of the target Transformer block by a preset back propagation algorithm based on the contrastive embedding alignment loss, and outputting the processing result of the insurance task by the target Transformer block after adjusting the parameters.
[0027] Further, the method further comprises:
[0028] If a new sample is received, the insurance domain embedding matrix is momentum updated using the new sample.
[0029] In a second aspect, an embodiment of the present invention further provides an adaptive block-gated insurance task processing device, which includes a unit for executing the above method.
[0030] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.
[0032] The embodiments of the present invention provide an adaptive block-gated insurance task processing method, apparatus, device and medium. The method includes: obtaining task data of the insurance task, determining a feature vector based on the task data; filtering out a target Transformer block from multiple Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller; and determining the processing result of the insurance task based on the feature vector by the target Transformer block. This solution obtains the task data of the insurance task and converts it into a feature vector, dynamically filters the target Transformer block based on the gating controller, and finally generates the processing result by the target Transformer block. Since the above process only calls the target Transformer block that is highly relevant to the current insurance task, it eliminates the interference of irrelevant Transformer blocks, thereby greatly accelerating the inference efficiency and significantly improving the processing efficiency of the insurance task. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 A flowchart of an adaptive block-gated insurance task processing method provided by an embodiment of the present invention;
[0035] Figure 2 A schematic block diagram of an adaptive block-gated insurance task processing device provided by an embodiment of the present invention; Figure 3A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0037] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0038] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0039] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0040] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0041] The adaptive block-gated insurance task processing method provided in embodiments of the present invention can be applied to the financial and medical insurance fields. For example, it can achieve efficient and automated processing of insurance tasks such as auto insurance, life insurance, health insurance, and accident insurance. Insurance tasks can include, but are not limited to, premium calculation, risk assessment, claims processing, and policy management.
[0042] See also Figure 1 , the embodiment of the present invention provides an adaptive block gating insurance task processing method, such as Figure 1As shown, the method includes the following steps:
[0043] S1, obtaining task data of an insurance task, and determining a feature vector based on the task data.
[0044] In specific implementations, task data may include text data and image data, which is not specifically limited by the present invention. Task data may be uploaded by the user or obtained from a pre-defined insurance business system, such as medical report text, medical images, photos of vehicle damage, etc., which is not specifically limited by the present invention.
[0045] In an embodiment of the present invention, a feature vector is determined based on the task data. The feature vector of the task data can be obtained through a feature extraction module. For example, for text data, the feature extraction module is an LLaMA2 tokenizer; the LLaMA2 tokenizer can be used to convert the text data into a feature vector. For image data, the feature extraction module is ViT, which can be used to convert the image data into a feature vector.
[0046] It should be noted that LLaMA2 is a large language model, and tokenizer is a word segmenter designed for LLaMA2. Through tokenizer, text data can be converted into word vectors (i.e., feature vectors).
[0047] ViT is the abbreviation of Vision Transformer, which divides the image into fixed-size image blocks (Patch), converts them into vector sequences through linear projection, inputs them into the Transformer encoder for encoding, and obtains feature vectors.
[0048] For example, text data such as medical records and expense lists are converted into 768-dimensional word vectors through the tokenizer of LLaMA2.
[0049] CT scans and other imaging data are converted into 1024-dimensional image feature vectors through the ViT model.
[0050] The text and image feature vectors are further concatenated into a 1792-dimensional joint feature vector through feature fusion.
[0051] S2: Filtering out a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector through a preset gating controller.
[0052] In a specific implementation, the gate controller can be a bidirectional LSTM, which is not specifically limited by the present invention. The Transformer model includes multiple Transformer blocks that can be independently switched. A Transformer block is an independent computing unit in the Transformer model.
[0053] It should be noted that LSTM (Long Short-Term Memory) is a special recurrent neural network (RNN) designed to solve the long-term dependency problem of traditional RNN.
[0054] In an embodiment of the present invention, a preset gating controller is used to screen out a Transformer block with a high correlation with the feature vector from multiple Transformer blocks of the Transformer model as a target Transformer block. In subsequent calculations, Transformer blocks other than the target Transformer block are skipped, thereby greatly reducing the amount of calculation and improving processing efficiency.
[0055] For example, in some preferred embodiments, the above step of "filtering out a target Transformer block from multiple Transformer blocks of a preset Transformer model based on the feature vector through a preset gating controller" specifically includes the following steps: obtaining an input vector from the feature vector based on a preset sliding window; obtaining a hidden state vector of the input vector through the gating controller; determining the activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block; and filtering out a Transformer block whose activation probability is greater than a preset activation probability threshold from the multiple Transformer blocks of the Transformer model as the target Transformer block.
[0056] In a specific implementation, the sliding window can be understood as a sampling duration, the feature vector is a continuous input quantity, and part of the feature vectors within the sliding window are collected to obtain the input vector.
[0057] Furthermore, the hidden state vector of the input vector is obtained by the gate controller. For example, in some preferred embodiments, the hidden state vector can be specifically determined by the following formula:
[0058] h t =LSTM(m t ,h t-1 θ lstm )
[0059] Among them, ht is the hidden state vector at step t, h t-1 is the hidden state vector at step t-1, m t is the input vector, θ lstm are the parameters of the gate controller.
[0060] Furthermore, the activation probability of the Transformer block is determined based on the hidden state vector and the projection parameters of the Transformer block, where the projection parameters include a projection weight vector and a bias scalar. For example, in some preferred embodiments, the activation probability can be specifically determined by the following formula:
[0061]
[0062] Among them, g t,i is the activation probability of the i-th Transformer block, is the projection weight vector, b i is the bias scalar and σ refers to the Sigmoid activation function.
[0063] Furthermore, a Transformer block having an activation probability greater than a preset activation probability threshold is selected from the plurality of Transformer blocks in the Transformer model as the target Transformer block. The activation probability threshold can be set by those skilled in the art and is not specifically limited in the present invention. For example, the activation probability threshold can be set to 0.5.
[0064] In some preferred embodiments, the method further includes the steps of: determining an attenuation factor based on the gradient loss of the Transformer block; determining an evaluation period based on the attenuation factor, and performing the step of determining the activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block after each evaluation period.
[0065] In the specific implementation, the selection of the target Transformer block is dynamic, which can improve the accuracy of the calculation. Specifically, the attenuation factor is first determined based on the gradient loss of the Transformer block. For example, the attenuation factor can be calculated by the following formula:
[0066]
[0067] Among them, τ t is the decay factor of the t-th training step, is the gradient loss of the ith block, is the sum of the gradient losses of all blocks, t refers to the number of training steps, and T refers to the preset benchmark evaluation period.
[0068] Furthermore, an evaluation period is determined based on the attenuation factor, for example by establishing a mapping relationship between the attenuation factor and the evaluation period, thereby determining the evaluation period based on the attenuation factor. In this embodiment of the present invention, a larger attenuation factor indicates a higher importance of the Transformer block, and thus a corresponding longer evaluation period is obtained, thereby ensuring that important Transformer blocks are not mistakenly skipped.
[0069] S3: Determine a processing result of the insurance task based on the feature vector through the target Transformer block.
[0070] In specific implementations, the target Transformer block determines the processing result of the insurance task based on the feature vector, achieving real-time adaptive optimization of the calculation path. Compared to the traditional method of fully activating the Transformer model, this solution uses a gating mechanism to only call target blocks that are strongly related to the current insurance task (for example, only activating the medical history analysis block and risk assessment block in health insurance underwriting). At the same time, by eliminating the interference of irrelevant Transformer blocks, it greatly speeds up reasoning efficiency and significantly improves the processing efficiency of insurance tasks.
[0071] In some preferred embodiments, the above step of “determining the processing result of the insurance task based on the feature vector by the target Transformer block” specifically includes the following steps:
[0072] S31 , determining an initial processing result based on the feature vector through the target Transformer block.
[0073] In a specific implementation, the feature vector is first processed by the target Transformer block to obtain an initial processing result.
[0074] For example, in some preferred embodiments, the above step of "determining the initial processing result based on the feature vector through the target Transformer block" specifically includes the following steps: determining the initial processing result through the calculation function, activation probability and feature vector of the target Transformer block.
[0075] In specific implementations, incorporating activation probability as a weight into the calculation process of the target Transformer block can effectively improve the accuracy of the calculation. For example, the calculation process of the target Transformer block can be based on the following formula:
[0076] r i =g t,i Block i (x i)+(1-g t,i )·(x i +v i )
[0077] Among them, r i is the output of the i-th target Transformer block, Block i is the computation function of the i-th target Transformer block, x i is the input of the ith block, v i is a learnable skip connection vector with the same dimension as x i Same, v i The initial value of is a random quantity and is updated through training.
[0078] S32, determining the processing result of the insurance task through a preset insurance field embedding matrix and the initial processing result.
[0079] In practice, the insurance domain embedding matrix is the core component of this invention's solution to domain semantic drift. It is essentially a dynamically maintained vector of insurance terminology that conforms to insurance-related semantics, significantly improving output accuracy and addressing the problem of semantic drift in model output. In some scenarios, the insurance domain embedding matrix includes vectors for specialized terms such as "deductible," "reasonable medical expenses," and "pre-existing conditions."
[0080] For example, in some preferred embodiments, the above step of "determining the processing result of the insurance task through a preset insurance field embedding matrix and the initial processing result" specifically includes the following steps: obtaining the comparative embedding alignment loss between the initial processing result and the insurance field embedding matrix; based on the comparative embedding alignment loss, adjusting the parameters of the target Transformer block through a preset back-propagation algorithm, and outputting the processing result of the insurance task through the target Transformer block after adjusting the parameters.
[0081] In a specific implementation, firstly, the comparative embedding alignment loss between the initial processing result and the insurance field embedding matrix is obtained. For example, the comparative embedding alignment loss can be specifically calculated by the following formula:
[0082]
[0083] in, refers to the contrastive embedding alignment loss, N is the number of target Transformer blocks, s is the cosine similarity function, and r i is the output representation of the i-th target Transformer block, e + is the positive sample embedding, is the jth negative sample embedding, k is the number of negative samples, and τ is the sensitivity attenuation factor.
[0084] Furthermore, based on the contrast embedding alignment loss, the parameters of the target Transformer block are adjusted through a preset back-propagation algorithm, and the target Transformer block after the parameter adjustment is recalculated to obtain the processing result of the insurance task.
[0085] In some preferred embodiments, the method further comprises the following step: if a new sample is received, performing momentum update on the insurance domain embedding matrix using the new sample.
[0086] In a specific implementation, when a new sample is received, the insurance domain embedding matrix is momentum updated using the new sample. The new sample can be a new insurance term, such as "targeted therapy", etc., which is not specifically limited in the present invention.
[0087] Specifically, momentum updating of the insurance domain embedding matrix can be implemented based on the following formula:
[0088]
[0089] Where β is the momentum coefficient, e k is the value of the kth vector of the insurance domain embedding matrix before the update, e k is the updated value of the kth vector of the insurance domain embedding matrix, is the current batch data, f k is the feature extraction function.
[0090] For example, the output of claim processing results is as follows:
[0091] Approved: Compensation amount = (total expenses - deductible) × compensation ratio.
[0092] Claim denied. Reason: Triggered the "pre-existing condition exemption clause".
[0093] An embodiment of the present invention proposes an adaptive block-gated insurance task processing method, comprising: obtaining task data for the insurance task, and determining a feature vector based on the task data; filtering out a target Transformer block from multiple Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller; and determining the processing result of the insurance task based on the feature vector by the target Transformer block. This solution obtains the task data of the insurance task and converts it into a feature vector, dynamically filters the target Transformer block based on the gating controller, and finally generates the processing result by the target Transformer block. Since the above process only calls the target Transformer block that is highly relevant to the current insurance task, it eliminates the interference of irrelevant Transformer blocks, thereby greatly accelerating the inference efficiency and significantly improving the processing efficiency of the insurance task.
[0094] See also Figure 2 , Figure 2 This is a schematic block diagram of an adaptive block-gated insurance task processing device provided by an embodiment of the present invention. Corresponding to the above-described adaptive block-gated insurance task processing method, the present invention also provides an adaptive block-gated insurance task processing device. The adaptive block-gated insurance task processing device includes a unit for executing the above-described adaptive block-gated insurance task processing method. The adaptive block-gated insurance task processing device can be configured in a terminal such as a desktop computer, tablet computer, or laptop computer. Specifically, the adaptive block-gated insurance task processing device includes:
[0095] a first determining unit, configured to obtain task data of the insurance task and determine a feature vector based on the task data;
[0096] a screening unit, configured to screen out a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector through a preset gating controller;
[0097] A second determining unit is configured to determine a processing result of the insurance task based on the feature vector through the target Transformer block.
[0098] In some preferred embodiments, the filtering out a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller includes:
[0099] Obtaining an input vector from the feature vector based on a preset sliding window;
[0100] Obtaining a hidden state vector of the input vector through the gate controller;
[0101] Determining an activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block;
[0102] A Transformer block having an activation probability greater than a preset activation probability threshold is selected from the multiple Transformer blocks of the Transformer model as the target Transformer block.
[0103] In some preferred embodiments, the adaptive block-gated insurance task processing device further includes:
[0104] a third determining unit, configured to determine an attenuation factor based on the gradient loss of the Transformer block;
[0105] A fourth determination unit is used to determine an evaluation period based on the attenuation factor, and perform the step of determining the activation probability of the Transformer block according to the hidden state vector and the projection parameters of the Transformer block after each evaluation period.
[0106] In some preferred embodiments, determining the processing result of the insurance task based on the feature vector by the target Transformer block includes:
[0107] determining an initial processing result based on the feature vector by the target Transformer block;
[0108] The processing result of the insurance task is determined by using a preset insurance field embedding matrix and the initial processing result.
[0109] In some preferred embodiments, determining the initial processing result based on the feature vector by the target Transformer block includes:
[0110] The initial processing result is determined by the calculation function, activation probability and feature vector of the target Transformer block.
[0111] In some preferred embodiments, determining the processing result of the insurance task by using a preset insurance field embedding matrix and the initial processing result includes:
[0112] Obtaining a comparative embedding alignment loss between the initial processing result and the insurance domain embedding matrix;
[0113] Based on the contrast embedding alignment loss, the parameters of the target Transformer block are adjusted through a preset back-propagation algorithm, and the target Transformer block after adjusting the parameters outputs the processing result of the insurance task.
[0114] In some preferred embodiments, the adaptive block-gated insurance task processing device further includes:
[0115] An updating unit is configured to update the insurance domain embedding matrix with momentum using the new sample if a new sample is received.
[0116] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned adaptive block-gated insurance task processing device and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, it will not be repeated here.
[0117] The above-mentioned adaptive block gated insurance task processing device can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer equipment shown.
[0118] See also Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 can be a terminal or a server. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, personal digital assistant, wearable device, or other electronic device with communication capabilities. The server can be a standalone server or a server cluster consisting of multiple servers.
[0119] The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0120] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a safety task processing method with adaptive block gating.
[0121] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0122] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an adaptive block gating insurance task processing method.
[0123] The network interface 505 is used to communicate with other devices over the network. Those skilled in the art will appreciate that the above structure is merely a block diagram of a portion of the structure related to the present invention and does not limit the computer device 500 to which the present invention is applied. A specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0124] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the following steps:
[0125] Acquiring task data of the insurance task, and determining a feature vector based on the task data;
[0126] Filtering a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller;
[0127] The processing result of the insurance task is determined based on the feature vector by the target Transformer block.
[0128] In some preferred embodiments, the filtering out a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller includes:
[0129] Obtaining an input vector from the feature vector based on a preset sliding window;
[0130] Obtaining a hidden state vector of the input vector through the gate controller;
[0131] Determining an activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block;
[0132] A Transformer block having an activation probability greater than a preset activation probability threshold is selected from the multiple Transformer blocks of the Transformer model as the target Transformer block.
[0133] In some preferred embodiments, the method further comprises:
[0134] Determining a decay factor based on the gradient loss of the Transformer block;
[0135] An evaluation period is determined based on the attenuation factor, and each evaluation period is followed by performing the step of determining the activation probability of the Transformer block according to the hidden state vector and the projection parameters of the Transformer block.
[0136] In some preferred embodiments, determining the processing result of the insurance task based on the feature vector by the target Transformer block includes:
[0137] determining an initial processing result based on the feature vector by the target Transformer block;
[0138] The processing result of the insurance task is determined by using a preset insurance field embedding matrix and the initial processing result.
[0139] In some preferred embodiments, determining the initial processing result based on the feature vector by the target Transformer block includes:
[0140] The initial processing result is determined by the calculation function, activation probability and feature vector of the target Transformer block.
[0141] In some preferred embodiments, determining the processing result of the insurance task by using a preset insurance field embedding matrix and the initial processing result includes:
[0142] Obtaining a comparative embedding alignment loss between the initial processing result and the insurance domain embedding matrix;
[0143] Based on the contrast embedding alignment loss, the parameters of the target Transformer block are adjusted through a preset back-propagation algorithm, and the target Transformer block after adjusting the parameters outputs the processing result of the insurance task.
[0144] In some preferred embodiments, the method further comprises:
[0145] If a new sample is received, the insurance domain embedding matrix is momentum updated using the new sample.
[0146] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0147] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0148] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the processor performs the following steps:
[0149] Acquiring task data of the insurance task, and determining a feature vector based on the task data;
[0150] Filtering a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller;
[0151] The processing result of the insurance task is determined based on the feature vector by the target Transformer block.
[0152] In some preferred embodiments, the filtering out a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller includes:
[0153] Obtaining an input vector from the feature vector based on a preset sliding window;
[0154] Obtaining a hidden state vector of the input vector through the gate controller;
[0155] Determining an activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block;
[0156] A Transformer block having an activation probability greater than a preset activation probability threshold is selected from the multiple Transformer blocks of the Transformer model as the target Transformer block.
[0157] In some preferred embodiments, the method further comprises:
[0158] Determining a decay factor based on the gradient loss of the Transformer block;
[0159] An evaluation period is determined based on the attenuation factor, and each evaluation period is followed by performing the step of determining the activation probability of the Transformer block according to the hidden state vector and the projection parameters of the Transformer block.
[0160] In some preferred embodiments, determining the processing result of the insurance task based on the feature vector by the target Transformer block includes:
[0161] determining an initial processing result based on the feature vector by the target Transformer block;
[0162] The processing result of the insurance task is determined by using a preset insurance field embedding matrix and the initial processing result.
[0163] In some preferred embodiments, determining the initial processing result based on the feature vector by the target Transformer block includes:
[0164] The initial processing result is determined by the calculation function, activation probability and feature vector of the target Transformer block.
[0165] In some preferred embodiments, determining the processing result of the insurance task by using a preset insurance field embedding matrix and the initial processing result includes:
[0166] Obtaining a comparative embedding alignment loss between the initial processing result and the insurance domain embedding matrix;
[0167] Based on the contrast embedding alignment loss, the parameters of the target Transformer block are adjusted through a preset back-propagation algorithm, and the target Transformer block after adjusting the parameters outputs the processing result of the insurance task.
[0168] In some preferred embodiments, the method further comprises:
[0169] If a new sample is received, the insurance domain embedding matrix is momentum updated using the new sample.
[0170] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk, etc. Any physical storage medium capable of storing program code can be non-volatile or volatile.
[0171] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0172] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0173] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0174] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0175] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0176] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, to the extent such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to encompass such changes and modifications.
[0177] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for processing insurance tasks with adaptive block gating, characterized in that: include: Acquiring task data of the insurance task, and determining a feature vector based on the task data; Filtering a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gating controller; The processing result of the insurance task is determined based on the feature vector by the target Transformer block.
2. The adaptive block-gated insurance task processing method according to claim 1, characterized in that: The step of selecting a target Transformer block from a plurality of Transformer blocks of a preset Transformer model based on the feature vector by a preset gate controller includes: Obtaining an input vector from the feature vector based on a preset sliding window; Obtaining a hidden state vector of the input vector through the gate controller; Determining an activation probability of the Transformer block based on the hidden state vector and the projection parameters of the Transformer block; A Transformer block having an activation probability greater than a preset activation probability threshold is selected from the multiple Transformer blocks of the Transformer model as the target Transformer block.
3. The adaptive block-gated insurance task processing method according to claim 2, characterized in that: The method further comprises: Determining a decay factor based on the gradient loss of the Transformer block; An evaluation period is determined based on the attenuation factor, and each evaluation period is followed by performing the step of determining the activation probability of the Transformer block according to the hidden state vector and the projection parameters of the Transformer block.
4. The adaptive block-gated insurance task processing method according to claim 2, characterized in that: Determining a processing result of the insurance task based on the feature vector by the target Transformer block includes: determining an initial processing result based on the feature vector by the target Transformer block; The processing result of the insurance task is determined by using a preset insurance field embedding matrix and the initial processing result.
5. The adaptive block-gated insurance task processing method according to claim 4, characterized in that: Determining an initial processing result based on the feature vector by the target Transformer block includes: The initial processing result is determined by the calculation function, activation probability and feature vector of the target Transformer block.
6. The adaptive block-gated insurance task processing method according to claim 4, characterized in that: The determining of the processing result of the insurance task by using a preset insurance field embedding matrix and the initial processing result includes: Obtaining a comparative embedding alignment loss between the initial processing result and the insurance domain embedding matrix; Based on the contrast embedding alignment loss, the parameters of the target Transformer block are adjusted through a preset back-propagation algorithm, and the target Transformer block after adjusting the parameters outputs the processing result of the insurance task.
7. The adaptive block-gated insurance task processing method according to claim 4, characterized in that: The method further comprises: If a new sample is received, the insurance domain embedding matrix is momentum updated using the new sample.
8. An adaptive block-gated insurance task processing device, characterized in that: The method comprises a unit for executing the method according to any one of claims 1 to 7.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the computer program can implement the method according to any one of claims 1 to 7.