Low-rank adaptation parameter freezing method and system applied to domain large model
Patent Information
- Application Number
- CN202611478404.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-30
AI Technical Summary
然而,现有的低秩适配微调方案通常将金融交易凭证视为整体图像输入,对模型全部适配参数层进行统一的增量更新,这种方式存在以下突出问题:其一,金融交易凭证图像包含凭证头信息区、交易明细区、金额汇总区、印章签名区、二维码条形码区等多个语义差异显著的区域,统一更新策略导致不同语义区域对应的适配参数相互干扰,模型在特定语义区域上的判别能力被稀释;其二,全量适配参数的增量更新带来较大的计算资源消耗和存储开销,在面对高频次、多批次的金融凭证持续流入场景时,模型迭代效率低下且存在灾难性遗忘风险;其三,现有技术尚未建立将凭证图像按语义区域解构后与领域大模型适配参数层进行精细化拓扑对应的手段,无法在参数层面实现对不同凭证语义区域的差异化冻结与增量更新策略
首先通过获取带有采集时序编号和凭证来源渠道标识的金融交易凭证图像流,继而通过图像区域语义解构处理将每帧凭证图像按照语义区域划分规则拆解为多个具有语义类型标签和区域位置编码的图像语义区域单元,使得原本作为整体输入的非结构化凭证图像被转化为具有明确语义分类和空间定位信息的结构化表征单元,在此基础上,调用金融风控领域大模型对应于各语义类型标签的适配参数层,依据区域位置编码和语义类型标签构建参数冻结拓扑模板并投射至适配参数层中划定冻结参数区域,实现了在参数空间维度上将与特定凭证语义区域强关联的适配参数进行冻结,既保留了领域大模型已有的通用金融风控知识,又避免了不同语义区域适配参数之间的交叉干扰;最终仅对冻结参数区域以外的未冻结低秩适配参数区进行增量更新并生成适配参数增量数据包写入存储空间,使得模型在维持核心参数稳定性的同时以极低的计算和存储代价完成对新增凭证语义模式的快速适配,实现了在金融凭证高频持续流入场景下对领域大模型进行语义感知型差异化参数管控的能力,显著提升了金融风控领域大模型在多类型凭证识别任务中的适配效率、参数稳定性和泛化判别精度。
Smart Images

Figure CN123016436A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the interdisciplinary fields of financial technology and artificial intelligence, and more specifically, to a method and system for freezing low-rank adaptation parameters applied to large domain models. Background Technology
[0002] With the deepening of digital transformation in the financial industry, the automated identification and risk management of financial transaction documents have become core requirements in the fintech field. Financial transaction documents encompass various types, including bank transfer receipts, electronic invoices, drafts, checks, and insurance policies. Their layouts are complex, fonts diverse, and stamps and handwritten information intertwine. Traditional optical character recognition (OCR) technologies and rule-based template matching methods struggle to effectively address the high heterogeneity of document types and the unstructured nature of their formats. In recent years, domain adaptation technologies based on large-scale pre-trained models have been gradually introduced into financial risk control scenarios. By introducing low-rank adaptation parameters into general-purpose large language models or multimodal large models for domain fine-tuning, specialized capabilities for financial risk control tasks can be transferred with relatively low parameter update costs. However, existing low-rank adaptation fine-tuning schemes typically treat financial transaction vouchers as a whole image input, performing uniform incremental updates on all adaptation parameter layers of the model. This approach has the following prominent problems: First, financial transaction voucher images contain multiple semantically significantly different regions, such as the voucher header information area, transaction details area, amount summary area, seal and signature area, and QR code / barcode area. A uniform update strategy leads to mutual interference between adaptation parameters corresponding to different semantic regions, diluting the model's discriminative ability in specific semantic regions. Second, incremental updates of all adaptation parameters result in significant computational resource consumption and storage overhead. When facing scenarios with a continuous influx of financial vouchers in high frequency and multiple batches, the model iteration efficiency is low and there is a risk of catastrophic forgetting. Third, existing technologies have not yet established a means to deconstruct the voucher image according to semantic regions and perform fine-grained topological correspondence with the adaptation parameter layers of the domain-wide model, making it impossible to implement differentiated freezing and incremental update strategies for different semantic regions of vouchers at the parameter level. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a method and system for freezing low-rank adaptation parameters applied to large domain models.
[0004] According to a first aspect of this application, a method for freezing low-rank adaptation parameters applied to large domain models is provided, the method comprising: Acquire a financial transaction voucher image stream, which contains multiple frames of financial transaction voucher images arranged in the acquisition time sequence, with each frame of the financial transaction voucher image labeled with an acquisition time sequence number and a voucher source channel identifier; The image stream of the financial transaction certificate is subjected to image region semantic deconstruction processing. Each frame of the financial transaction certificate image is decomposed into multiple image semantic region units according to the semantic region division rules, and a semantic type label and region location code are assigned to each image semantic region unit. The adaptation parameter layer of the financial risk control domain big model corresponding to each semantic type label is called. Based on the regional position encoding and semantic type label of each image semantic region unit, a parameter freezing topology template is constructed, and the parameter freezing topology template is projected into the adaptation parameter layer of the financial risk control domain big model to delineate the frozen parameter region. Incremental update processing is performed on the unfrozen low-rank adaptation parameter area outside the frozen parameter area in the adaptation parameter layer of the large model of financial risk control, generating an incremental data packet of adaptation parameters, and writing the incremental data packet of adaptation parameters into the low-rank adaptation parameter storage space of the large model of financial risk control.
[0005] According to a second aspect of this application, a low-rank adaptation parameter freezing system for a large domain model is provided. The low-rank adaptation parameter freezing system for a large domain model includes a machine-readable storage medium and a processor. The machine-readable storage medium stores machine-executable instructions. When the processor executes the machine-executable instructions, the low-rank adaptation parameter freezing system for a large domain model implements the aforementioned low-rank adaptation parameter freezing method for a large domain model.
[0006] Based on any of the above aspects, the technical effect of this application is as follows: First, by acquiring image streams of financial transaction vouchers with acquisition time sequence numbers and voucher source channel identifiers, image region semantic deconstruction processing is used to decompose each frame of the voucher image into multiple image semantic region units with semantic type labels and region location codes according to semantic region division rules. This transforms the unstructured voucher image, originally a whole input, into a structured representation unit with clear semantic classification and spatial positioning information. Based on this, the adaptation parameter layer corresponding to each semantic type label of the large model in the financial risk control field is invoked. A parameter freezing topology template is constructed based on the region location code and semantic type label and projected into the adaptation parameter layer to delineate the frozen parameter region. This achieves the separation of specific vouchers in the parameter space dimension. Freezing the adaptation parameters of strongly correlated semantic regions preserves the general financial risk control knowledge already existing in the domain-wide model while avoiding cross-interference between adaptation parameters of different semantic regions. Finally, incremental updates are performed only on the unfrozen low-rank adaptation parameter regions outside the frozen parameter regions, and incremental data packets of adaptation parameters are generated and written to the storage space. This allows the model to quickly adapt to the semantic patterns of newly added vouchers while maintaining the stability of core parameters, with extremely low computational and storage costs. This enables the domain-wide model to perform semantically aware differentiated parameter control in scenarios with high-frequency and continuous inflow of financial vouchers, significantly improving the adaptation efficiency, parameter stability, and generalization discrimination accuracy of the domain-wide model in the financial risk control field in multi-type voucher recognition tasks. Attached Figure Description
[0007] Figure 1 The diagram shows a flowchart of a low-rank adaptation parameter freezing method for a large domain model provided in an embodiment of this application.
[0008] Figure 2 This is a schematic diagram of the semantic deconstruction and adaptation parameter layer freezing topology mapping scenario of the image stream region of financial transaction certificate provided in the embodiments of this application.
[0009] Figure 3 This is a schematic diagram of the scenario of incremental update of low-rank adaptation parameters, time-series version management, and parameter saturation control provided in the embodiments of this application.
[0010] Figure 4 This is a schematic diagram of the semantic tag co-occurrence clustering and parameter freezing cluster region long-term solidification and cross-version migration scenario provided in the embodiments of this application. Detailed Implementation
[0011] Figure 1This illustration shows a flowchart of a low-rank adaptation parameter freezing method for a large-scale domain model provided in this application embodiment. This embodiment is applied to a real-time monitoring scenario for financial risk control. The large-scale financial risk control model has been deployed on a bank's real-time risk control server. This large-scale financial risk control model is based on a Transformer decoder architecture, containing L layers of Transformer decoder layers. Each layer integrates a multi-head self-attention sublayer and a feedforward neural network sublayer. In each Transformer decoder layer, the query projection matrix, key projection matrix, value projection matrix, and output projection matrix of the multi-head self-attention sublayer, as well as the weight matrices of the first and second fully connected layers of the feedforward neural network sublayer, all additionally carry low-rank adaptation parameter matrices. The low-rank adaptation parameter matrix is composed of the product of a low-rank matrix A and a low-rank matrix B. The large-scale financial risk control model has a hierarchical structure, which includes multiple adaptation parameter layers; the large-scale financial risk control model is also configured with low-rank adaptation parameter storage space. This embodiment processes financial transaction voucher image streams from different business channels, including screenshots of mobile banking transfer vouchers, scanned copies of counter transactions, and receipts from third-party payment platforms. These voucher image streams are sent to the risk control server for abnormal transaction identification.
[0012] Step S110: Obtain a financial transaction voucher image stream, which contains multiple frames of financial transaction voucher images arranged in the acquisition time sequence. Each frame of the financial transaction voucher image is marked with an acquisition time sequence number and a voucher source channel identifier.
[0013] The risk control server receives financial transaction voucher images from various business channels via a message queue. Each message in the message queue contains one frame of financial transaction voucher image and its metadata. The risk control server consumes messages from the message queue in a first-in, first-out (FIFO) order, assembling each extracted frame of financial transaction voucher image and its metadata into an image stream data structure. The financial transaction voucher image stream consists of multiple frames of financial transaction voucher images, arranged according to their acquisition sequence. Each frame of financial transaction voucher image is a two-dimensional digital image matrix with a shape of H×W×C, where H is the number of pixel rows in the image height direction, W is the number of pixel columns in the image width direction, and C is the number of color channels. Each pixel location stores an integer value representing the brightness intensity of that location in the corresponding color channel. The acquisition sequence number is a monotonically increasing integer, marking the order in which the image frame entered the message queue. The voucher source channel identifier is an enumerated flag, taking the value of one of the mobile banking channel identifier, counter channel identifier, or third-party payment channel identifier. The risk control server records this voucher source channel identifier in the channel identifier field of the image stream data structure. All financial transaction voucher images arranged in ascending order according to their acquisition time sequence number constitute a financial transaction voucher image stream, denoted as E={E1, E2, ..., ET}, where Et is the financial transaction voucher image of frame t and T is the total number of frames.
[0014] Step S120: Perform image region semantic deconstruction processing on the financial transaction certificate image stream, decompose each frame of financial transaction certificate image into multiple image semantic region units according to the semantic region division rules, and assign a semantic type label and region location code to each image semantic region unit.
[0015] In the deconstruction processing module, each frame of financial transaction certificate image is decomposed into multiple image semantic region units. Each image semantic region unit is assigned semantic type labels such as amount information area label, counterparty information area label, time information area label, and certificate identification area label, and the position coordinate information of each image semantic region unit in the image space is marked with region location encoding.
[0016] Step S121: Perform layout primitive detection processing on each frame of the financial transaction certificate image stream to identify the layout structure primitives contained in each frame of the financial transaction certificate image. The layout structure primitives include text line primitives, table line primitives, seal graphic primitives, and handwriting primitives. Construct a layout structure adjacency graph based on the spatial adjacency relationship between the layout structure primitives. The nodes of the layout structure adjacency graph are each layout structure primitive, and the edges of the layout structure adjacency graph represent that any two layout structure primitives are adjacent in the image space and the distance is less than a preset proximity distance threshold. Traverse the layout structure adjacency graph and aggregate layout structure primitives with closed connections into candidate semantic regions. Each candidate semantic region consists of at least one layout structure primitive, and the candidate semantic regions do not overlap.
[0017] The risk control server performs layout primitive detection processing on the t-th frame of the financial transaction certificate image Et. First, Et is converted to grayscale. The pixel values of the C color channels are weighted and summed using preset weighting coefficients cr, cg, and cb, where cr + cg + cb = 1, resulting in a single-channel grayscale image. Next, the grayscale image undergoes Gaussian filtering preprocessing with a kernel size of Ksize × Ksize and a standard deviation of σpre. Then, a pre-trained layout primitive detection network is used to perform primitive detection on the filtered grayscale image. This network employs a convolutional neural network based on a feature pyramid structure, with a ResNet-50 residual convolutional neural network as the backbone. The network constructs a feature pyramid using the output feature maps from multiple downsampling stages. Anchor boxes are set at each level of the feature pyramid for primitive classification and bounding box regression. The classification branch outputs the probability distribution of each anchor box belonging to the text line primitive, table line primitive, seal graphic primitive, handwritten handwriting primitive, and background class. The regression branch outputs the center coordinate offset and width / height scaling factor of each anchor box. After removing duplicate detection boxes through non-maximum suppression processing, the set of all layout structure primitives {Pi} contained in the financial transaction certificate image of this frame is obtained. Each layout structure primitive Pi records its primitive type type(i), the coordinates of the upper left corner of the bounding rectangle x(i1) and y(i1), and the coordinates of the lower right corner of the bounding rectangle x(i2) and y(i2). Where x(i1) represents the x-coordinate of the upper left corner of the bounding rectangle of the i-th layout structure primitive in the image coordinate system, y(i1) represents the y-coordinate of the upper left corner of the bounding rectangle of the i-th layout structure primitive in the image coordinate system, x(i2) represents the x-coordinate of the lower right corner of the bounding rectangle of the i-th layout structure primitive in the image coordinate system, and y(i2) represents the y-coordinate of the lower right corner of the bounding rectangle of the i-th layout structure primitive in the image coordinate system.
[0018] For each pair of Pi and Pj in the set of layout structure primitives {Pi}, calculate the shortest distance between the bounding rectangles of the two layout structure primitives. Take the minimum Euclidean distance between any two points on each side of the two rectangles. If this minimum value is less than the preset neighbor distance threshold D(neighbor), add an undirected edge connecting nodes Pi and Pj in the layout structure adjacency graph. After traversing all layout structure primitive pairs, construct a complete layout structure adjacency graph G(base). Perform a depth-first search traversal on G(base), visiting nodes only along the edges that exist in the graph. The visited nodes form a connected subgraph. If the number of nodes in the connected subgraph is greater than or equal to 1, perform a union operation on the bounding rectangles of the layout structure primitives corresponding to all nodes in the connected subgraph. Take the smallest bounding rectangle of the union as the boundary of a candidate semantic region, generating a candidate semantic region R(k). Repeat the depth-first search until all nodes are partitioned, resulting in a set of candidate semantic regions {R1, R2, ..., RK}, where K is the total number of candidate semantic regions, and all candidate semantic regions do not overlap.
[0019] Step S122: Extract the type combination features and spatial proportion features of the layout structure primitives in each candidate semantic region, and input the type combination features and spatial proportion features into a preset regional semantic classifier to obtain the semantic type label corresponding to each candidate semantic region. The semantic type label includes the amount information area label, the counterparty information area label, the time information area label, and the voucher identification area label.
[0020] For each candidate semantic region R(k), the type distribution of the layout structure primitives contained within the candidate semantic region is statistically analyzed. The proportions of text line primitives, table line primitives, stamp graphic primitives, and handwritten handwriting primitives within the candidate semantic region are calculated. These four proportions form a type combination feature vector F(type,k) of length 4, where F represents the feature vector, type indicates that the feature is a type combination feature, and k indicates that the feature vector corresponds to the k-th candidate semantic region. The proportion of the area of the union of the bounding rectangles of all layout structure primitives within R(k) to the area of the bounding rectangle of R(k) itself is calculated as the spatial proportion feature F(area,k), where area indicates that the feature is a spatial proportion feature. F(type,k) and F(area,k) are concatenated along the dimension to form a candidate region feature vector F(R,k) of length 5, where R represents the candidate region. The vector is input into a preset region semantic classifier, which is a fully connected neural network containing two fully connected layers and a softmax output layer. The weight matrix of the first fully connected layer is W1, the bias vector is b1, and the output is h1=ReLU(W1×F(R,k)+b1), with a length of 128. The weight matrix of the second fully connected layer is W2, the bias vector is b2, and the output is h2=W2×h1+b2, with a length equal to the total number of semantic type labels. The semantic type label corresponding to the maximum value in h2 is taken as the semantic type label of the candidate semantic region R(k).
[0021] Step S123: Using the top left corner of each frame of financial transaction certificate image as the origin, calculate the normalized abscissa and ordinate values of the center point of the bounding rectangle of each image semantic region unit in the image coordinate system, and combine the normalized abscissa and ordinate values to form the regional position code of the image semantic region unit.
[0022] For the k-th semantic region unit U(k) in the t-th frame of the financial transaction certificate image Et, the coordinates of its upper-left corner of the bounding rectangle are x(k1) and y(k1), and the coordinates of its lower-right corner are x(k2) and y(k2). Here, x(k1) represents the x-coordinate of the upper-left corner of the bounding rectangle of the k-th semantic region unit in the image coordinate system, y(k1) represents the y-coordinate of the upper-left corner of the bounding rectangle of the k-th semantic region unit in the image coordinate system, x(k2) represents the x-coordinate of the lower-right corner of the bounding rectangle of the k-th semantic region unit in the image coordinate system, and y(k2) represents the y-coordinate of the lower-right corner of the bounding rectangle of the k-th semantic region unit in the image coordinate system. The x-coordinate of the center point of the bounding rectangle is cx = (x(k1) + x(k2)) / 2, and the y-coordinate is cy = (y(k1) + y(k2)) / 2. Dividing cx by the image width W yields the normalized x-coordinate value ux, which is between 0 and 1. Dividing cy by the image height H yields the normalized ordinate value vy, which is between 0 and 1. The region location is encoded as a tuple (ux, vy). All semantic region units are arranged according to their spatial positions in the image based on their region location codes (ux, vy), forming the set of semantic region units for that frame.
[0023] Step S124: Based on the semantic type label of each image semantic region unit, retrieve the set of adaptation parameter layers in the financial risk control domain big model that has a preset mapping relationship with the semantic type label. The set of adaptation parameter layers contains at least one adaptation parameter layer. Extract the layer index number and parameter matrix dimension information of each adaptation parameter layer in the set of adaptation parameter layers in the hierarchical structure of the financial risk control domain big model. Perform proportional transformation and index mapping processing on the regional position encoding of each image semantic region unit according to the parameter matrix dimension information to generate a parameter region index range that matches the parameter matrix dimension.
[0024] The risk control server maintains a mapping table between semantic type labels and adaptive parameter layers. This mapping table is established through sensitivity analysis after the large-scale model in the financial risk control field is trained, recording which parameter regions of which adaptive parameter layers have the most significant gradient response for each semantic type label. For the monetary information area label in this mapping table, the index range of the Transformer decoder layer responsible for numerical information encoding in the large-scale financial risk control model is from layer L(start1) to layer L(end1). For the counterparty information area label, the index range of the Transformer decoder layer responsible for entity relationship encoding is from layer L(start2) to layer L(end2). For the time information area label, the index range of the Transformer decoder layer responsible for time-series feature encoding is from layer L(start3) to layer L(end3). For the certificate identification area label, the index range of the Transformer decoder layer responsible for global semantic encoding is from layer L(start4) to layer L(end4). Each adaptation parameter layer contains a low-rank matrix A and a low-rank matrix B. The shape of low-rank matrix A is d(model)×r, and the shape of low-rank matrix B is r×d(model). d(model) is the dimension of the hidden state of the model, and r is the rank of the low-rank decomposition. The total parameter matrix dimension information is denoted as (d(model), r).
[0025] For an image semantic region unit U(k), let its region location encoding be (ux, vy), and its semantic type label corresponding to the mapping of the adaptation parameter layer be the l-th layer. The parameter matrix dimension of the low-rank matrix A of this layer is d(model) rows and r columns. Multiply ux and vy by (d(model)-1) and (r-1) respectively and round down to obtain the row starting index of the parameter region index range as round(ux×(d(model)-1)), the row ending index is the row starting index plus the preset window width W(window), the column starting index is round(vy×(r-1)), and the column ending index is the column starting index plus the preset window height H(window). The row starting index, row ending index, column starting index, and column ending index together constitute the parameter region index range. If the row ending index exceeds d(model)-1, it is truncated to d(model)-1; if the column ending index exceeds r-1, it is truncated to r-1.
[0026] Step S130: Call the adaptation parameter layer of the financial risk control domain big model corresponding to each semantic type label, construct a parameter freezing topology template based on the regional position encoding and semantic type label of each image semantic region unit, and project the parameter freezing topology template into the adaptation parameter layer of the financial risk control domain big model to delineate the frozen parameter region.
[0027] During the construction of the parameter-frozen topology template, the adaptation parameter layer structure of the large model in the financial risk control field is invoked. Each adaptation parameter layer has a layer index number, and the parameter sub-regions corresponding to the semantic regions are projected into the adaptation parameter layers to form frozen parameter regions. The mapping path of the frozen parameter regions, the coverage of the parameter-frozen topology template in the adaptation parameter layers, the operation mechanism of the parameter-frozen isolation boundary layer and the forced zeroing of the gradient update signal are implemented according to the following steps.
[0028] Step S131: Obtain the topology of the adaptation parameter layer of the large-scale financial risk control model. The topology records the layer index position and inter-layer connection relationship of each adaptation parameter layer in the model hierarchy. Based on the semantic type label of each image semantic region unit, retrieve a set of adaptation parameter layers that have a preset correspondence with the semantic type label in the topology of the adaptation parameter layer. Each semantic type label is mapped to at least one adaptation parameter layer.
[0029] The risk control server reads the adaptation parameter layer topology from the model configuration file of the large-scale financial risk control model. This adaptation parameter layer topology is a directed acyclic graph, where each node represents a Transformer decoder layer and its attached adaptation parameter layer. The node number is the layer index l, with l ranging from 1 to L. Directed edges between nodes connect along the direction of increasing layer indices, indicating that information flows from layer l to layer (l+1) during the forward propagation of the model. For each semantic type label appearing in the financial transaction certificate image stream, the corresponding adaptation parameter layer index range is retrieved from the mapping table established in step S124, forming the adaptation parameter layer set corresponding to that semantic type label.
[0030] Step S132: The parameter region index range obtained by scaling the region position encoding of each image semantic region unit is used as the spatial constraint condition for generating the parameter freezing topology template. Based on the spatial constraint condition, parameter sub-regions corresponding to the parameter region index range are divided within each adaptation parameter layer in the adaptation parameter layer set. The parameter sub-regions divided within each adaptation parameter layer are aligned between layers according to the spatial adjacency relationship of the region position encoding. Spatially adjacent parameter sub-regions in different adaptation parameter layers are connected in the inter-layer direction to form parameter freezing links. A frozen state marker is generated for each parameter sub-region in the parameter freezing link, and the set of all parameter sub-regions carrying frozen state markers is used as the parameter freezing topology template. The parameter freezing topology template is projected onto the adaptation parameter layer of the large model in the financial risk control domain. The parameter positions covered by the parameter freezing topology template in the adaptation parameter layer are marked as frozen parameter regions.
[0031] For each image semantic region unit U(k), its region location is encoded as (ux, vy), and the range of the adaptation parameter layer index corresponding to its semantic type label is from layer L(start) to layer L(end). Within each adaptation parameter layer within this index range, the parameter region index range of U(k) in that layer is calculated according to the method in step S124, and the parameter positions covered within this range are divided into a parameter sub-region. Between layers L(start) and L(end), parameter sub-regions with adjacent layer indices and spatially adjacent parameter sub-regions are connected in the inter-layer direction. The connection method is to establish a parameter freezing link between the output end of the parameter sub-region of layer l and the input end of the corresponding parameter sub-region of layer l+1. For all parameter sub-regions in the parameter freezing link, a freeze status flag bit is set at each parameter position within each parameter sub-region. The freeze status flag bit takes a binary value, where 1 indicates frozen and 0 indicates unfrozen, initially all bits are set to 1. The set of all parameter sub-regions carrying frozen state markers corresponding to all image semantic region units constitutes the parameter freezing topology template. The frozen state markers of each parameter sub-region in the parameter freezing topology template are written into the adaptation parameter layer of the large-scale model in the financial risk control field according to the parameter coordinates, corresponding one-to-one with each parameter position in the adaptation parameter layer. The parameter positions covered by the parameter freezing topology template are marked as frozen parameter regions in the adaptation parameter layer.
[0032] Step S133: Intercept the gradient update signal of the parameters within the frozen parameter region in the gradient backpropagation path of the large model in the financial risk control domain, and force the gradient update signal of the parameters within the frozen parameter region to zero. Detect the boundary line between the frozen parameter region and the unfrozen low-rank adaptation parameter region, and generate a parameter freezing isolation boundary layer along the boundary line. The parameters in the parameter freezing isolation boundary layer maintain numerical transmission during forward propagation, and block gradient inflow into the frozen parameter region during backpropagation.
[0033] In the automatic differentiation engine of a large model in the financial risk control field, gradient hook functions are registered and bound to each frozen parameter position in the adaptation parameter layer. During backpropagation, when the gradient signal flows through a frozen parameter position, the hook function multiplies the gradient tensor at that position by 0.0, forcing it to zero. Simultaneously, along the boundary line between the frozen parameter region and the unfrozen low-rank adaptation parameter region, a preset shrinkage width B is shrunk into the frozen parameter region, and a preset expansion width B is expanded into the unfrozen low-rank adaptation parameter region, forming a parameter freezing isolation boundary layer. The parameters in the parameter freezing isolation boundary layer retain their original weight values during forward propagation and participate in matrix multiplication and addition operations. During backpropagation, the hook function also forces the gradient tensor of the parameters within this boundary layer to zero, blocking the gradient from flowing from the unfrozen low-rank adaptation parameter region into the frozen parameter region.
[0034] Step S140: Perform incremental update processing on the unfrozen low-rank adaptation parameter area outside the frozen parameter area in the adaptation parameter layer of the financial risk control domain big model, generate an adaptation parameter incremental data packet, and write the adaptation parameter incremental data packet into the low-rank adaptation parameter storage space of the financial risk control domain big model.
[0035] In the incremental update processing of adaptation parameters, the unfrozen low-rank adaptation parameter region and the frozen parameter region are distinguished, and the frozen parameter link extends in the adaptation parameter layer. The parameter freezing isolation boundary layer is located at the boundary of the frozen parameter region.
[0036] Step S141: In the adaptation parameter layer of the large model in the financial risk control field, the parameter positions covered by the frozen parameter region are removed from the updatable parameter set to obtain the unfrozen low-rank adaptation parameter region. The unfrozen low-rank adaptation parameter region contains all adaptation parameter positions not covered by the frozen parameter region.
[0037] The risk control server iterates through every element of the adaptation parameter matrix in all L-layer Transformer decoder layers of the large-scale financial risk control model, checking the frozen state flag bit of each element. Parameters with a frozen state flag bit of 1 are logically removed from the set of updatable parameters. The set of updatable parameters is recorded as a Boolean mask matrix, where 1 indicates updatable and 0 indicates non-updatable. The set of elements in the mask matrix with a value of 1 represents the unfrozen low-rank adaptation parameter region, denoted as Ω (unfrozen).
[0038] Step S142: Input each frame of the financial transaction certificate image in the financial transaction certificate image stream into the financial risk control domain big model, calculate the gradient response tensor of each adaptation parameter layer corresponding to each frame of the financial transaction certificate image through the forward propagation path of the financial risk control domain big model, set the gradient response position belonging to the frozen parameter region to zero value in the gradient response tensor, retain the gradient response value corresponding to the unfrozen low-rank adaptation parameter region, and generate the gradient response tensor after mask filtering.
[0039] The risk control server inputs each frame of the financial transaction certificate image stream (Et) into the large-scale financial risk control model frame by frame. During forward propagation, each frame is converted into a tensor representation through an embedding layer, and then sequentially passes through the self-attention and feedforward neural network operations of the L-layer Transformer decoder layer. In each adaptation parameter layer, the low-rank matrix A and low-rank matrix B participate in the forward calculation. Using the cross-entropy loss of the risk control binary classification for normal and abnormal transactions as the loss function, the gradient of the loss function with respect to each parameter position in each adaptation parameter layer is calculated through the backpropagation algorithm, forming the gradient response tensor G. The gradient response tensor G is then multiplied element-wise with the updatable parameter mask matrix from step S141. The position corresponding to the frozen parameter region in the mask matrix is set to 0. After multiplication, the gradient of the frozen parameter region is set to 0, while the gradient of the unfrozen low-rank adaptation parameter region retains its original value, resulting in the masked gradient response tensor G(masked).
[0040] Step S143: Based on the gradient response tensor after masking, perform gradient descent update processing on the adaptation parameters in the unfrozen low-rank adaptation parameter region to generate updated unfrozen low-rank adaptation parameter values. Calculate the parameter difference between the updated unfrozen low-rank adaptation parameter values and the unfrozen low-rank adaptation parameter values before the update. Serialize and encode the parameter difference according to the layer index position and parameter position of the adaptation parameter layer to generate an incremental data packet of adaptation parameters.
[0041] The AdamW optimizer is used to update the parameters of Ω (unfrozen), and the update formula is as follows: θ(new)=θ(old)-η×(m(hat) / (sqrt(v(hat))+ε)+λ×θ(old)) Where η is the learning rate, m(hat) and v(hat) are the first and second moments estimated after bias correction, respectively, ε is a small constant to prevent division by zero, and λ is the weight decay coefficient; θ(old) represents the unfrozen low-rank adaptation parameter value before the update, and θ(new) represents the unfrozen low-rank adaptation parameter value after the update. After the update, for each parameter position, the parameter difference Δθ = θ(new) - θ(old) is calculated. The Δθ at each parameter position is serialized and encoded according to the layer index l and the parameter coordinate (i, j). The encoding format is a 5-tuple sequence consisting of the layer index l, the parameter matrix identifier, the row index i, the column index j, and the 32-bit floating-point value of the parameter difference Δθ. The serialized byte stream constitutes the adaptation parameter incremental data packet Δ(pkg).
[0042] Step S144: Write the incremental data packet of the adaptation parameter into the low-rank adaptation parameter storage space of the large model in the financial risk control field. The low-rank adaptation parameter storage space is divided into storage sectors according to the layer index position of the adaptation parameter layer. When writing the incremental data packet of the adaptation parameter, the parameter difference of each parameter position in the incremental data packet of the adaptation parameter is added to the existing parameter value of the corresponding storage sector in the low-rank adaptation parameter storage space element by element. After the addition operation is completed, the collection time sequence number and voucher source channel identifier corresponding to the incremental data packet of the adaptation parameter are written as metadata into the metadata index area of the low-rank adaptation parameter storage space.
[0043] The low-rank adaptation parameter storage space is a contiguous virtual address space in the risk control server's memory. It is divided into L storage sectors according to layer index l, from 1 to L. Within each storage sector, parameter values are stored in row-major order according to the adaptation parameter matrix. When writing Δ(pkg), the corresponding storage sector is located using layer index l, the offset address is calculated based on the parameter coordinates (i, j), and the existing parameter value θ(old) is added element-wise to Δθ. The result is then written back to this offset address. After writing, a metadata record is appended to the metadata index area. The record includes the globally unique identifier of the current adaptation parameter incremental data packet, the collection time sequence number, and the credential source channel identifier.
[0044] Step S210: Perform time-series binding processing on the acquisition time sequence number sequence corresponding to the financial transaction certificate image stream and the adaptation parameter incremental data packet to generate an adaptation parameter incremental version chain with time-series version tags. Detect the parameter update amplitude between the adaptation parameter incremental data packets corresponding to adjacent time-series version tags in the adaptation parameter incremental version chain. Mark adjacent adaptation parameter incremental data packets with parameter update amplitude less than a preset update amplitude threshold as mergeable incremental data packets.
[0045] The risk control server generates a time-series version tag for each adaptation parameter incremental data packet Δ(pkg). The time-series version tag is the arithmetic mean of all acquisition time-series numbers in the financial transaction certificate image stream corresponding to that Δ(pkg). Each Δ(pkg) is arranged in ascending order of its time-series version tag value, and adjacent Δ(pkg) are linked by pointers. Each node stores the memory address of the current Δ(pkg) and the memory address of the next node, forming a singly linked list of adaptation parameter incremental version chains. For the m-th and (m+1)-th adjacent Δ(pkg) in the version chain, the set of parameter positions they both contain is extracted. That is, parameter positions in both Δ(pkg) that have parameter difference records and whose layer index l, parameter matrix identifier, row index i, and column index j are all the same. For each common parameter position, the absolute value of the difference between Δθ(m) and Δθ(m+1) is taken. The absolute values of the differences of all common parameter positions are summed, and the sum is divided by the total number of common parameter positions to obtain the parameter update magnitude D(update). If D(update) is less than the preset update magnitude threshold δ(merge), then the two adjacent Δ(pkg) are marked as mergeable incremental data packets.
[0046] In the gradient descent update process, the gradient response processing module outputs a masked gradient response tensor, which flows to the gradient descent update processing module. The parameter difference between the parameter values before and after the update is written as an adaptation parameter increment data packet to the low-rank adaptation parameter storage space. The low-rank adaptation parameter storage space includes storage sector partitioning and a metadata index area.
[0047] Step S220: Perform parameter difference merging processing on the mergeable incremental data packets. Calculate the parameter differences of each adaptation parameter layer in the mergeable incremental data packets by weighted averaging according to parameter position to generate merged adaptation parameter incremental data packets. Remove the merged adaptation parameter incremental data packets and replace the merged adaptation parameter incremental data packets in the adaptation parameter incremental version chain. Rearrange the time-series version tag sequence of the adaptation parameter incremental version chain.
[0048] For a pair of mergeable incremental data packets Δ(pkgA) and Δ(pkgB), let the mean of the acquisition time sequence number corresponding to Δ(pkgA) be T(A), and the mean of the acquisition time sequence number corresponding to Δ(pkgB) be T(B). For the common parameter positions of the two, the weights w(A) = T(B) / (T(A) + T(B)) and w(B) = T(A) / (T(A) + T(B)). The parameter difference after merging is Δθ(merge) = w(A) × Δθ(A) + w(B) × Δθ(B), where Δθ(A) represents the parameter difference in the mergeable incremental data packet Δ(pkgA), and Δθ(B) represents the parameter difference in the mergeable incremental data packet Δ(pkgB). For parameter positions that exist only in Δ(pkgA) but not in Δ(pkgB), Δθ(A) is directly retained as Δθ(merge); for parameter positions that exist only in Δ(pkgB) but not in Δ(pkgA), Δθ(B) is directly retained as Δθ(merge). The merged parameter difference is reserialized according to the layer index l, parameter matrix identifier, row index i, and column index j to generate the merged adapted parameter incremental data packet Δ(pkgmerged). The nodes corresponding to Δ(pkgA) and Δ(pkgB) are deleted in the version chain, and the Δ(pkgmerged) node is inserted into the original node position. The predecessor pointer of Δ(pkgmerged) points to the predecessor node of Δ(pkgA), and the successor pointer points to the successor node of Δ(pkgB). The time-series version tag of Δ(pkgmerged) is recalculated, and its value is the arithmetic mean of T(A) and T(B). If the time-series version label of subsequent nodes in the version chain is no longer strictly increasing due to merging, then the time-series version label of subsequent nodes will be incremented by an offset to maintain strict increment.
[0049] Step S230: In the low-rank adaptation parameter storage space of the large model in the financial risk control field, delete the storage sector occupied by the removed adaptation parameter incremental data packet and release the corresponding storage space resources.
[0050] The low-rank adaptation parameter storage space is divided into L storage sectors in physical memory according to the layer index l from 1 to L. Within each storage sector, parameter values are stored consecutively as 32-bit floating-point numbers in row-major order of the parameter matrix. The starting physical address of the sector is recorded by the sector base address register. After deleting nodes Δ(pkgA) and Δ(pkgB) in the version chain, the risk control server traverses the parameter positions recorded in these two Δ(pkg) nodes, locates the physical address of the parameter position in the corresponding storage sector, and marks the memory page containing that physical address as a reclaimable page. If the number of reclaimable pages in a storage sector exceeds half of the total number of pages in that sector, a storage sector compression operation is triggered. The still valid parameter values in that sector are continuously moved to the lower address segment of the sector. After the movement is complete, the valid data tail address in the sector base address register is updated, and the high address segment pages released after the movement are marked as free. After marking all reclaimable pages, the free page reclamation function of the memory allocator is called to return the marked free physical pages to the free page pool.
[0051] In the time-series management and merging process of adaptation parameter incremental data packets, the adaptation parameter incremental data packets are arranged in a version chain and have a time-series version label. Adjacent adaptation parameter incremental data packets with parameter update magnitude less than a preset update magnitude threshold are marked as mergeable incremental data packets. The new data packet generated after merging replaces the merged data packet on the version chain.
[0052] Step S240: Obtain the current adaptation parameter incremental data packet generated by the large model in the financial risk control field when processing the new input financial transaction certificate image stream. Perform difference comparison processing on the current adaptation parameter incremental data packet and the adaptation parameter incremental data packet corresponding to the latest time-series version tag in the adaptation parameter incremental version chain. Based on the difference distribution characteristics obtained from the difference comparison processing, adjust the value of the preset update amplitude threshold so that the preset update amplitude threshold matches the dispersion of the difference distribution characteristics.
[0053] Let Δ(pkgnew) be the current adaptation parameter increment data packet generated from the newly input financial transaction certificate image stream, and Δ(pkglatest) be the adaptation parameter increment data packet corresponding to the most recent time-series version tag in the adaptation parameter increment version chain. Extract the set of common parameter positions for both, and calculate the difference between Δθ(new) and Δθ(latest) for each common parameter position. Here, Δθ(new) represents the parameter difference in the current adaptation parameter increment data packet Δ(pkgnew), and Δθ(latest) represents the parameter difference in the most recent time-series version tag corresponding to the adaptation parameter increment data packet Δ(pkglatest). Construct a difference distribution sequence from these differences for all common parameter positions. Calculate the mean μ(diff) and standard deviation σ(diff) of the difference distribution sequence using the following formula: σ(diff)=sqrt(sum((|Δθ(new)-Δθ(latest)|-μ(diff))^2) / N(diff)) Where sqrt represents the square root, sum represents the summation, ^2 represents the square, and N(diff) is the total number of common parameter positions. The summation iterates through all common parameter positions. The preset update amplitude threshold is adjusted to δ(merge) = μ(diff) + α × σ(diff), where α is the preset matching coefficient. If the adjusted δ(merge) is less than the preset lower limit δ(min), then δ(merge) = δ(min); if it is greater than the preset upper limit δ(max), then δ(merge) = δ(max).
[0054] During the update process of the time-series version tag, the time-series version tags of the merged adaptation parameter incremental data packets are rearranged, and the data packets corresponding to the updated version tags are distributed on the version chain.
[0055] Step S310: Obtain the set of historical adaptation parameter incremental data packets stored in the low-rank adaptation parameter storage space of the large model in the financial risk control field. The set of historical adaptation parameter incremental data packets contains multiple sets of historical adaptation parameter incremental data packets corresponding to different financial transaction certificate image streams. Extract the semantic type label distribution features corresponding to each historical adaptation parameter incremental data packet in the set of historical adaptation parameter incremental data packets. The semantic type label distribution features record the spatial distribution range of the parameter increment corresponding to each semantic type label in the adaptation parameter layer.
[0056] The risk control server reads the metadata records of all historical adaptation parameter incremental data packets from the metadata index area of the low-rank adaptation parameter storage space. The metadata index area is a hash table, where the key is the globally unique identifier of the adaptation parameter incremental data packet, and the value is a metadata structure containing a semantic type label distribution feature field corresponding to that Δ(pkg). The semantic type label distribution feature is a mapping table, where the key is the semantic type label, and the value is the spatial distribution range of the parameter increment corresponding to that semantic type label in the adaptation parameter layer. The spatial distribution range consists of the layer index range interval and the parameter region index range within each layer. By traversing all entries in the metadata index area, the globally unique identifier of each historical Δ(pkg) and the corresponding semantic type label distribution feature are extracted to form a historical adaptation parameter incremental data packet set HS={Δ(pkg)} and a corresponding semantic type label distribution feature set F={F(h)}, where h is the historical data packet index.
[0057] Step S320: Construct an incremental parameter sharing topology graph based on the semantic type label distribution characteristics. The nodes of the incremental parameter sharing topology graph are each historical adaptation parameter incremental data packet. The edges of the incremental parameter sharing topology graph represent that the overlap of the parameter increment spatial distribution range of each pair of historical adaptation parameter incremental data packets under the same semantic type label exceeds a preset overlap threshold.
[0058] Construct an undirected graph as an incremental parameter sharing topology G(share), with a node set V = {v(h)}, where each node v(h) corresponds to a history Δ(pkg). For any two nodes v(A) and v(B) in V, extract their corresponding semantic type label distribution features F(A) and F(B), and find the set of semantic type labels C(common) that coexist in F(A) and F(B). For each semantic type label c in C(common), extract the spatial distribution range corresponding to c from F(A) and F(B), respectively, and calculate the intersection area and union area of the parameter region index ranges of the two at the same layer index. The area is calculated based on the number of parameter positions covered by the parameter region index range. Dividing the intersection area by the union area yields the overlap degree r(c) under semantic type label c. The arithmetic mean of the overlap of all semantic type tags in C(common) is taken to obtain the average overlap r(avg). If r(avg) is greater than the preset overlap threshold t(share), then an undirected edge is added between v(A) and v(B).
[0059] In the process of sharing and managing incremental data packets of historical adaptation parameters, the semantic type label distribution of financial transaction certificates is used to construct a semantic type label co-occurrence matrix, and semantic type label clusters are generated through spectral clustering decomposition. The node connection relationships of the clusters are recorded.
[0060] Step S330: Extract connected subgraphs from the incremental parameter sharing topology graph, perform mean fusion processing on the parameter differences corresponding to the historical adaptation parameter incremental data packets within the same connected subgraph to generate shared adaptation parameter incremental templates, and match the semantic type label distribution features corresponding to the shared adaptation parameter incremental templates with the semantic type labels of the image semantic region units in the financial transaction certificate image stream to obtain the label distribution overlap ratio.
[0061] Perform a depth-first search on G(share), starting from any unvisited node and traversing all reachable nodes along the edges. The set of nodes visited during this traversal is considered a connected subgraph. Repeat this process until all nodes are visited, resulting in Z connected subgraphs {G1, G2, ..., GZ}. For the z-th connected subgraph G(z), extract the historical Δ(pkg) corresponding to all its nodes. The union of all parameter positions that appear in these historical Δ(pkg) is used as the complete set of parameter positions for the shared template. For each parameter position in the shared template, take the arithmetic mean of the parameter differences in each historical Δ(pkg) within G(z). If a parameter position does not exist in a historical Δ(pkg), skip that historical Δ(pkg) and generate a shared adaptation parameter increment template Δ(shared,z), where Δ(shared,z) represents the shared adaptation parameter increment template corresponding to the z-th connected subgraph. The semantic type label distribution feature of Δ(shared,z) is taken as the union of the semantic type label distribution features of each historical Δ(pkg) in G(z), that is, the maximum range union of the spatial distribution range of all semantic type labels that have appeared in G(z).
[0062] Extract the semantic type label set C(current) corresponding to all semantic region units in the current financial transaction certificate image stream. Take the intersection of C(current) and the semantic type label set C(shared) recorded in the semantic type label distribution features of Δ(shared,z). Divide the number of elements in the intersection by the number of elements in C(current) to obtain the label distribution overlap ratio R(overlap,z), where R(overlap,z) represents the label distribution overlap ratio corresponding to the z-th connected subgraph. Calculate R(overlap,z) for each connected subgraph, and take the Δ(shared,z) corresponding to the largest R(overlap,z) as the candidate shared template.
[0063] Step S340: When the overlap ratio of label distribution exceeds the preset template reuse threshold, the shared adaptation parameter incremental template is directly loaded into the low-rank adaptation parameter storage space of the large model in the financial risk control field, replacing the adaptation parameter incremental data packet generated for the financial transaction certificate image stream.
[0064] If the largest R(overlap,z) in step S330 exceeds the preset template reuse threshold t(reuse), then the candidate shared template Δ(shared,z) is used as the reuse template. The risk control server skips the incremental update calculation process from steps S142 to S144, and no longer performs forward propagation, backward propagation, and gradient update operations on the current financial transaction certificate image stream. It directly locates Δ(shared,z) to the corresponding storage sector of the low-rank adaptation parameter storage space by layer index l, performs element-wise addition on the parameter difference at each parameter position in Δ(shared,z) with the existing parameter values in the corresponding storage sector, and writes the result back to the storage sector. A new record is added to the metadata index area, recording the acquisition time sequence number, certificate source channel identifier, and reuse template identifier corresponding to this write operation.
[0065] During the generation of the shared adaptation parameter incremental template, the parameter freezing cluster region is formed by fully connected freezing links, and the connection relationship between independent freezing units is recorded. When the freezing duration exceeds the preset duration threshold, a long-term freezing path is formed, the erasable and writable storage areas are distinguished, and the frozen status flag is fixed in the read-only storage area.
[0066] Step S350: After loading the shared adaptation parameter increment template, adjust the boundary range of the frozen parameter region so that the boundary range of the frozen parameter region and the parameter increment spatial distribution range in the shared adaptation parameter increment template form a complementary coverage relationship.
[0067] Take the set P(nonzero) of all parameter positions in Δ(shared,z) where the parameter difference is not zero. In the adaptation parameter layer, the region formed by these parameter positions is the parameter increment space distribution range. For each adaptation parameter layer, perform an XOR comparison between the frozen parameter region F(frozen) and the region corresponding to P(nonzero) within that layer: remove parameter positions that belong to both the frozen parameter region and the parameter increment space distribution range from the frozen parameter region, as these positions have been effectively updated by the shared template and do not need to be frozen further; retain parameter positions that belong to the frozen parameter region but not to the parameter increment space distribution range within the frozen parameter region; and also retain parameter positions that do not belong to the frozen parameter region but belong to the parameter increment space distribution range outside the frozen parameter region. The adjusted frozen parameter region F(frozen,adj) and the parameter increment space distribution range form a complementary coverage relationship within the adaptation parameter layer, with an empty intersection and a union covering all adaptation parameter positions in that layer.
[0068] Step S360: Regenerate the parameter freezing isolation boundary layer for the frozen parameter region after adjusting the boundary range, so that the regenerated parameter freezing isolation boundary layer extends along the boundary line of the adjusted frozen parameter region.
[0069] For the adjusted frozen parameter region F(frozen,adj), the boundary line between it and the unfrozen low-rank adaptation parameter region is re-detected. Along this boundary line, the region is shrunk by a predetermined width B (shrink) parameter positions into the frozen parameter region, and expanded by a predetermined width B (expand) parameter positions into the unfrozen low-rank adaptation parameter region, forming a newly generated parameter freezing isolation boundary layer. In this newly generated isolation boundary layer, a gradient hook function is registered at each parameter position. During backpropagation, the hook function multiplies the gradient tensor flowing through that parameter position by 0.0, preventing the gradient from flowing from the unfrozen low-rank adaptation parameter region into the adjusted frozen parameter region.
[0070] During the boundary adjustment and template reuse process of the frozen parameter region, the parameter value overwrite skip operation is performed, and the model version identifier and bound storage address play a guiding role in the frozen state migration.
[0071] Step S410: The adaptation parameter incremental version chain with time version tags is segmented according to the order of the time version tags. The adaptation parameter incremental data packets with time version tags within a preset time window are grouped into the same time zone adaptation parameter data segment. The parameter change trend of all adaptation parameter incremental data packets in the same time zone adaptation parameter data segment is statistically processed for each parameter position. The direction and rate of parameter value change of each parameter position in the time zone adaptation parameter data segment are calculated.
[0072] The risk control server reads the time-series version tags of each Δ(pkg) in the incremental version chain of adaptation parameters in node order. Starting from the first tag, adjacent Δ(pkg) with tag differences less than a preset time window T(win) are grouped into the same time zone adaptation parameter data segment. When the tag difference between a certain Δ(pkg) and the first Δ(pkg) in the segment exceeds T(win), that Δ(pkg) becomes the first node of the new data segment. This process is repeated until all Δ(pkg) are segmented. For the s-th time zone adaptation parameter data segment Seg(s), which contains a sequence of Δ(pkg) arranged in chronological order, let the sequence length be N(s). For each parameter position commonly covered by all Δ(pkg) in Seg(s), the parameter difference sequence {Δθ1, Δθ2, ..., ΔθN(s)} of that parameter position in the N(s) Δ(pkg) is extracted. The sequence is considered as a time series varying with time t = 1, 2, ..., N(s). A linear trend Δθ = a × t + b is fitted using the least squares method, where a is the slope of the linear trend and b is the intercept, representing the baseline value of the parameter difference at t = 0. The slope a of the linear trend is the rate of change of the parameter value at that position. If a > 0, the direction of parameter change is positive; if a < 0, it is negative; and if a = 0, there is no direction.
[0073] Step S420: Based on the direction and rate of change of parameter values at each parameter position, predict the parameter values of the incremental data packets corresponding to the next time series version label in the time zone adaptation parameter data segment, generate predicted adaptation parameter incremental data packets, and calculate the deviation of the predicted adaptation parameter incremental data packets from the actual generated incremental data packets corresponding to the next time series version label at each parameter position to obtain the prediction deviation distribution.
[0074] For each parameter position in Seg(s), the predicted parameter difference Δθ(pred) is obtained by substituting the fitted linear trend Δθ=a×t+b and taking t=N(s)+1. The predicted parameter differences for all parameter positions are serialized according to the layer index l and parameter coordinates (i, j) to generate the prediction adaptation parameter incremental data packet Δ(pkgpred). When the adaptation parameter incremental data packet Δ(pkgnext) corresponding to the next time-series version tag is actually generated, the deviation D(dev)=|Δθ(pred)-Δθ(next)| is calculated for each parameter position in the common parameter position set of both. The D(dev) of all common parameter positions constitutes the prediction deviation distribution.
[0075] Step S430: Extract the parameter locations in the prediction deviation distribution where the deviation value exceeds the preset deviation tolerance upper limit, mark the parameter locations as parameter mutation locations, and record the layer index number and parameter coordinates of the parameter mutation locations in the adaptation parameter layer.
[0076] Calculate the mean μ(dev) and standard deviation σ(dev) of the prediction deviation distribution, and set a preset upper limit for deviation tolerance τ(dev) = μ(dev) + γ × σ(dev), where γ is the preset tolerance coefficient. For each common parameter location, if its D(dev) is greater than τ(dev), then the parameter location is marked as a parameter mutation location. For each parameter mutation location, record its adaptation parameter layer index number l and parameter coordinates (i, j), forming a parameter mutation location record.
[0077] Step S440: Backtrack the image semantic region unit corresponding to the parameter mutation location in the financial transaction certificate image stream, extract the semantic type label of the image semantic region unit, and establish a mutation association mapping table between the parameter mutation location and the semantic type label.
[0078] For each parameter mutation location, a search is performed within the parameter region index range generated for each image semantic region unit in step S124, centered on its parameter coordinates (i, j). The search checks which image semantic region unit's parameter region index range (i, j) falls into. Since the parameter region index ranges of different image semantic region units may overlap spatially, if (i, j) falls into the parameter region index ranges of multiple image semantic region units simultaneously, the image semantic region unit with the smallest parameter region index range area is selected as the corresponding unit. After finding the corresponding image semantic region unit, its semantic type label is extracted, and this semantic type label is bound to the layer index number and parameter coordinates of the parameter mutation location to form a mapping record. All mapping records for parameter mutation locations are summarized, and a mutation association mapping table is established using the semantic type label as the primary key. Each semantic type label in the table corresponds to a list of parameter mutation locations, and the list elements are triples of (layer index l, row index i, column index j).
[0079] Step S450: When a semantic type label recorded in the mutation association mapping table appears in the subsequent financial transaction certificate image stream, the parameter sub-region corresponding to the semantic type label is temporarily removed from the frozen parameter region during the parameter freezing topology template construction stage, so that the parameter sub-region participates in the incremental update process.
[0080] When the risk control server performs step S130 to construct the parameter freezing topology template for the subsequent financial transaction certificate image stream, it checks whether the semantic type label of each image semantic region unit in the current financial transaction certificate image stream exists in the mutation association mapping table. If the semantic type label of a certain image semantic region unit matches the mutation association mapping table, after generating the parameter sub-region corresponding to the image semantic region unit in the manner of step S132, the frozen state flag of the parameter sub-region is not set to 1, but is kept at 0, so that it is classified into the unfrozen low-rank adaptation parameter region in this incremental update and participates in the gradient calculation and parameter update of steps S142 to S144.
[0081] During the cross-task maintenance of the parameter freeze cluster region, if the freeze maintenance duration exceeds a preset duration threshold, the processing logic is executed, the freeze state flag is migrated to the read-only storage area, and the processing path for migrating the frozen state to the upgraded model is executed. The read-only storage area does not support modification of the regular parameter update process.
[0082] Step S510: Use the shared adaptation parameter incremental template as the initial low-rank adaptation parameter configuration of the financial risk control domain big model. When the financial risk control domain big model receives a newly collected financial transaction certificate image stream, the shared adaptation parameter incremental template is directly loaded into the low-rank adaptation parameter storage space of the financial risk control domain big model.
[0083] When the risk control server starts or resets the large model in the financial risk control field, it selects the shared adaptation parameter incremental template Δ(shared) with the highest overlap ratio of label distribution from the historical adaptation parameter incremental data packet set as the initial low-rank adaptation parameter configuration. This Δ(shared) is then loaded into the low-rank adaptation parameter storage space as described in step S340, serving as the baseline state of parameter values in the adaptation parameter layer.
[0084] Step S520: Based on the shared adaptation parameter incremental template, the frozen parameter region is fine-tuned to obtain the fine-tuned frozen parameter region by taking into account the difference between the semantic type label distribution of each semantic region unit in the newly acquired financial transaction certificate image stream and the semantic type label distribution characteristics of the shared adaptation parameter incremental template.
[0085] Take the semantic type label set C(new) of the semantic region units in the newly acquired financial transaction certificate image stream, and take the semantic type label set C(shared) recorded in the semantic type label distribution features of Δ(shared). For semantic type labels that belong to C(shared) but not to C(new), in the frozen parameter region corresponding to Δ(shared), shrink the boundary of the parameter sub-region corresponding to the semantic type label inward by a fine-tuning step D(fine) parameter positions to reduce unnecessary frozen coverage. For semantic type labels that belong to both C(new) and C(shared), keep their frozen parameter region boundaries unchanged. The fine-tuned frozen parameter region is F(frozen,fine), where F(frozen,fine) represents the fine-tuned frozen parameter region.
[0086] Step S530: Extract newly added semantic type labels from the newly acquired financial transaction voucher image stream that do not match the semantic type label distribution features of the shared adaptation parameter incremental template, and obtain the regional location code of the image semantic region unit corresponding to the newly added semantic type label.
[0087] Semantic type labels belonging to C(new) but not to C(shared) are taken as new semantic type labels C(add). From the image semantic region units of the newly acquired financial transaction certificate image stream, image semantic region units whose semantic type labels belong to C(add) are selected, and the region location codes (ux, vy) of these image semantic region units are extracted.
[0088] Step S540: Based on the newly added semantic type label and regional location code, define the newly added frozen parameter sub-region in the adaptation parameter layer of the large model in the financial risk control field, and merge the newly added frozen parameter sub-region into the fine-tuned frozen parameter region. For the frozen parameter region that has merged the newly added frozen parameter sub-region, re-execute the freezing operation and determine the updated unfrozen low-rank adaptation parameter region.
[0089] For each newly added semantic type label corresponding to an image semantic region unit, a new frozen parameter sub-region is defined in the adaptation parameter layer as in step S132. The union of the new frozen parameter sub-region and the frozen parameter region F(frozen, fine) fined in step S520 is taken to obtain the merged frozen parameter region F(frozen, merged). The gradient hook registration operation of step S133 is re-executed on F(frozen, merged), marking the parameter positions in F(frozen, merged) as frozen, and determining that the updated unfrozen low-rank adaptation parameter region is all parameter positions other than F(frozen, merged) in the adaptation parameter layer.
[0090] Step S550: Perform incremental update processing on the updated unfrozen low-rank adaptation parameter area to generate a supplementary adaptation parameter incremental data package for the newly added semantic type label. Merge and store the supplementary adaptation parameter incremental data package with the shared adaptation parameter incremental template to generate a new shared adaptation parameter incremental template for the newly acquired financial transaction certificate image stream.
[0091] Steps S142 to S144 are executed on the updated, unfrozen low-rank adaptation parameter region determined in step S540 to generate a supplementary adaptation parameter incremental data packet Δ(pkgsupp). Δ(pkgsupp) and Δ(shared) are merged according to parameter position: for parameter positions that exist in both, the merged parameter difference is the sum of the original value in Δ(shared) and the corresponding value in Δ(pkgsupp); for parameter positions that exist only in Δ(shared), the original value of Δ(shared) is retained; for parameter positions that exist only in Δ(pkgsupp), the corresponding value in Δ(pkgsupp) is taken. The merged parameter difference is serialized according to the layer index l and parameter coordinates (i, j) to generate a new shared adaptation parameter incremental template Δ(shared,new).
[0092] Step S560: Write the new shared adaptation parameter incremental template and its corresponding semantic type label distribution features back to the historical adaptation parameter incremental data packet set, and update the node and edge connection relationships of the incremental parameter shared topology graph.
[0093] Δ(shared,new) is appended as a new historical data packet to the historical adaptation parameter incremental data packet set HS. Its semantic type label distribution feature is taken as the range of the parameter incremental space distribution of each semantic type label in C(new). A new node v(new) corresponding to Δ(shared,new) is added to the incremental parameter sharing topology graph G(share). For each existing node v(old) in G(share), the semantic type label overlap between v(new) and v(old) is calculated in the manner of step S320. If it exceeds t(share), an undirected edge is added.
[0094] Step S610: After acquiring the financial transaction certificate image stream, perform image quality assessment processing on each frame of the financial transaction certificate image stream to generate an image quality score for each frame of the financial transaction certificate image.
[0095] The risk control server performs image quality assessment on the t-th frame image Et in the financial transaction certificate image stream E={E1, E2, ..., ET}. First, Et is converted to grayscale using the following formula: I(gray)(i,j)=cr×R(i,j)+cg×G(i,j)+cb×B(i,j) Where R(i,j), G(i,j), and B(i,j) are the red, green, and blue channel brightness values of Et at pixel position (i,j), respectively, and cr, cg, and cb are preset weighting coefficients, with cr+cg+cb=1. Then, three quality metrics are calculated on I(gray). The first is the image sharpness metric, which is obtained by convolving I(gray) with the Laplacian operator L to obtain the Laplacian response map L(resp) = I(gray)convolution L, where L is a 3×3 Laplacian convolution kernel with a center element of 4, adjacent elements of -1, and corner elements of 0. The variance of all pixel values in L(resp) is calculated as the sharpness metric Q(lap). The second term is the image contrast index, calculated as the standard deviation of all pixel values in I(gray), which is Q(con). Q(con) is the square root of the sum of squares of the differences between all pixel values in I(gray) and the mean pixel value μ(gray) of the entire I(gray) image, divided by H×W. The third term is the image information integrity index, calculated as the proportion of the number of non-zero pixels N(nonzero) in I(gray) to the total number of pixels H×W in the entire image, which is Q(inf) = N(nonzero) / (H×W). The three indices are weighted and summed to obtain the image quality score Q(score) = α1×Q(lap) + α2×Q(con) + α3×Q(inf), where α1, α2, and α3 are preset weight coefficients and α1 + α2 + α3 = 1.
[0096] Step S620: Mark financial transaction voucher images with image quality scores lower than the preset quality threshold as low-quality voucher images, and eliminate the low-quality voucher images from the financial transaction voucher image stream to obtain a quality-filtered financial transaction voucher image stream.
[0097] Compare Q(score) with the preset quality threshold Q(min). If Q(score) < Q(min), mark the current frame of financial transaction voucher image Et as a low-quality voucher image. After traversing all T frames of images in the financial transaction voucher image stream E, logically delete all frames marked as low-quality voucher images from the image stream. The logical deletion method is to retain the index position of the frame in the original image stream sequence but set the image data pointer to a null pointer, and subsequent processing steps skip the null pointer position. After the elimination is completed, the remaining valid frames are rearranged according to the original acquisition timing number order to form the quality-filtered financial transaction voucher image stream E(filtered).
[0098] Step S630: Perform image geometric correction processing on the quality-filtered financial transaction voucher image stream, correct the inclined layout in each frame of the financial transaction voucher image to a horizontal posture, unify the image size specifications of each frame of the financial transaction voucher image, generate a standardized financial transaction voucher image stream, perform image enhancement processing on each frame of the financial transaction voucher image in the standardized financial transaction voucher image stream, and improve the contrast between the layout structural primitives and the background area in each frame of the financial transaction voucher image, so as to obtain an enhanced financial transaction voucher image stream.
[0099] For each frame in E(filtered), edge detection is first performed using the Canny edge detection algorithm. After Gaussian smoothing of the grayscale image, the gradient magnitude and direction are calculated. Non-maximum suppression and double thresholding are then applied to obtain a binary edge map. Hough transform line detection is performed on the binary edge map. The number of collinear edge points is counted in the parameter space (p, θ), and the angle θ corresponding to the line with the highest number of votes is taken as the page tilt angle. An affine rotation transformation matrix is constructed with the image center as the rotation center, and the rotation angle is a negative θ angle. Bilinear interpolation is used to map the original image pixels to the rotated image pixel positions, completing the tilt correction. After correction, the image is scaled to a preset standard size H(std) × W(std) using a bilinear interpolation algorithm. Adaptive histogram equalization is performed on each scaled frame of the image, dividing the image into several grid sub-blocks. The cumulative distribution function of the grayscale histogram for each sub-block is calculated. This cumulative distribution function is used as a mapping function to equalize the pixel values within the sub-block. Pixel values at the boundaries of adjacent sub-blocks are fused using bilinear interpolation to obtain the enhanced financial transaction certificate image stream E(enhanced). E(enhanced) is then used as the updated financial transaction certificate image stream, replacing the original E, to continue with step S120 and all subsequent processing.
[0100] Step S640: Extract the image texture complexity parameters of each frame of the financial transaction certificate image in the enhanced financial transaction certificate image stream, perform association mapping processing between the image texture complexity parameters and the preset quality threshold, establish the correspondence between image texture complexity and the strictness of quality screening, and dynamically adjust the value of the preset quality threshold according to the image texture complexity parameters of the new financial transaction certificate image stream when acquiring a new financial transaction certificate image stream in the future.
[0101] For each frame of image E(enhanced), calculate its gray-level co-occurrence matrix (GLCM). The GLCM is an Ng×Ng matrix, where Ng is the gray-level quantization level. The element G(p,q) in the p-th row and q-th column of the matrix represents the frequency of occurrence of pixel pairs with gray values p and q at a distance d and direction φ, where d is 1 and φ represents four directions: 0 degrees, 45 degrees, 90 degrees, and 135 degrees. Calculate the entropy value H(glcm) for each direction of the GLCM. H(glcm) is a negative summation G(p,q)×log2(G(p,q)+ε), iterating through p and q. ε is a small positive constant to prevent errors in logarithm calculation. G(p,q) is the element value in the p-th row and q-th column of the GLCM. The average of the entropy values in the four directions is taken as the image texture complexity parameter C(tex) for that frame. The arithmetic mean of C(tex) for all frames in E(enhanced) is calculated as the representative value of the texture complexity of the financial transaction document image stream. A mapping relationship is established between a preset quality threshold Q(min) and the texture complexity C(tex): Q(min) = β0 + β1 × C(tex), where β0 and β1 are coefficients pre-fitted onto historical data using linear regression. When acquiring a new financial transaction document image stream, the mean of C(tex) for its sampled frames is calculated first, and then substituted into the mapping relationship to obtain a dynamically adjusted Q(min). This dynamic Q(min) is then applied to perform the quality screening processing in steps S610 and S620.
[0102] Step S650: Apply the dynamically adjusted preset quality threshold to the quality screening process of the new financial transaction certificate image stream to generate a quality screening result that is adapted to the image texture complexity of the new financial transaction certificate image stream.
[0103] For the financial transaction certificate image stream, calculate the texture complexity representative value C(tex,new) according to step S640, and substitute it into the mapping relationship Q(min)=β0+β1×C(tex,new) to calculate the dynamic quality threshold. Calculate Q(score) for each frame in the new image stream in the manner of step S610, and use the dynamic quality threshold to replace the fixed Q(min) for low-quality frame marking and removal, generating quality screening results.
[0104] Step S710: After writing the incremental data packet of adaptation parameters into the low-rank adaptation parameter storage space of the large model in the financial risk control field, monitor the risk control prediction output of the large model in the financial risk control field when processing the newly input financial transaction certificate image, and obtain the risk control classification confidence distribution vector in the risk control prediction output. The risk control classification confidence distribution vector contains the confidence value of the normal transaction category and the confidence value of the abnormal transaction category.
[0105] After completing the writing of the incremental data packet for the adaptation parameters in step S144, the risk control server switches the large-scale financial risk control model to inference mode and inputs the newly collected financial transaction certificate images into the model for risk control prediction. During the forward propagation process of the large-scale financial risk control model, the output of the last Transformer decoder layer is fed into the classification head after layer normalization. The classification head is a fully connected layer with a weight matrix of W(cls) and a bias vector of b(cls). The output is a classification score vector of length 2. After being normalized by the softmax function, the risk control classification confidence distribution vector [P(nomal), P(anomaly)] is obtained, where P(nomal) is the confidence value of the normal transaction category, P(anomaly) is the confidence value of the abnormal transaction category, and P(nomal) + P(anomaly) = 1.
[0106] Step S720: Generate a model adaptation effect evaluation index based on the ratio between the confidence values of the normal transaction category and the confidence values of the abnormal transaction category. When the model adaptation effect evaluation index is lower than the preset effect threshold, trigger the re-delineation of the frozen parameter area.
[0107] The model adaptation performance evaluation index E(adapt) is calculated as follows: if the true label of the newly input financial transaction certificate image is a normal transaction, then E(adapt) = P(nomalous) / P(anomaly); if the true label is an abnormal transaction, then E(adapt) = P(anomaly) / P(nomalous). True labels are obtained through subsequent manual review or offline annotation. A higher E(adapt) indicates a more significant advantage in the model's confidence level for the correct category relative to the confidence level for the incorrect category, resulting in a better adaptation performance. When E(adapt) falls below the preset performance threshold E(min), it indicates that the current frozen parameter region delineation scheme has led to a decrease in model adaptation performance, triggering a re-delineation of the frozen parameter region.
[0108] Step S730: The re-delineation operation includes the semantic type labels and region location codes of each image semantic region unit generated during the image region semantic deconstruction process of the backtracking financial transaction certificate image stream.
[0109] The risk control server reads the semantic type labels and region location codes of all image semantic region units generated in step S120 from the processing log of the current financial transaction certificate image stream. If the log has been cleaned up, step S120 is re-executed to perform image region semantic deconstruction processing on the original financial transaction certificate image stream, and semantic type labels and region location codes are regenerated.
[0110] Step S740: Based on the semantic type labels and region location codes of each image semantic region unit obtained by backtracking, reconstruct the parameter freezing topology template. The reconstructed parameter freezing topology template adopts a different spatial division granularity than the parameter freezing topology template used before triggering the re-delineation operation.
[0111] When rebuilding the parameter-frozen topology template, the values of the preset window width W(window) and preset window height H(window) in step S124 are modified. W(window) is replaced with W(window,new), and H(window) is replaced with H(window,new). W(window,new) is taken as a preset multiple factor f(scale) of W(window), and H(window,new) is taken as a multiple of H(window) of f(scale). f(scale) is not equal to 1, so that the granularity of the re-divided parameter region index range is different from before. When the granularity is coarser, each parameter sub-region covers a larger parameter space range, and when the granularity is finer, each parameter sub-region covers a smaller parameter space range. The complete processing flow of step S130 is re-executed according to the modified granularity parameters to rebuild the parameter-frozen topology template.
[0112] Step S750: Project the reconstructed parameter freezing topology template onto the adaptation parameter layer of the large model in the financial risk control field, replace the frozen parameter region defined before the triggering of the re-delineation operation, obtain the updated frozen parameter region, re-execute the freezing operation on the updated frozen parameter region, and redetermine the unfrozen low-rank adaptation parameter region outside the updated frozen parameter region in the adaptation parameter layer of the large model in the financial risk control field.
[0113] The reconstructed parameter-frozen topology template is projected onto the adaptor parameter layer as in step S132, overwriting the original frozen region markers before the triggering of the reclassification operation. The parameter positions covered by the reconstructed template are marked as frozen, resulting in the updated frozen parameter region F(frozen,new). The gradient hook registration operation of step S133 is re-executed on F(frozen,new), and the unfrozen low-rank adaptor parameter region is redefined as all parameter positions in the adaptor parameter layer other than F(frozen,new).
[0114] Step S760: For the newly determined unfrozen low-rank adaptation parameter area, perform incremental update processing again to generate a supplementary adaptation parameter incremental data package, and include the supplementary adaptation parameter incremental data into the low-rank adaptation parameter storage space of the large model in the financial risk control field.
[0115] Steps S142 to S144 are re-executed on the unfrozen low-rank adaptation parameter area redefined in step S750 to generate a supplementary adaptation parameter incremental data packet Δ(pkgsupp2). The parameter differences at each parameter position in Δ(pkgsupp2) are added element-wise with the existing parameter values in the corresponding storage sectors of the low-rank adaptation parameter storage space to complete the merge and write operation.
[0116] Step S810: Extract semantic type labels from the semantic region units of each image in the financial transaction certificate image stream, and construct a semantic type label co-occurrence matrix for the financial transaction certificate image stream. The rows and columns of the semantic type label co-occurrence matrix are the semantic type labels that appear in the financial transaction certificate image stream. The element values of the semantic type label co-occurrence matrix represent the frequency of the corresponding row semantic type label and column semantic type label co-occurring in the same frame of the financial transaction certificate image.
[0117] The risk control server extracts all unique semantic type tags from the financial transaction certificate image stream. Assuming there are C(type) semantic type tags, a C(type) × C(type) semantic type tag co-occurrence matrix M(co) is constructed. For each frame of the financial transaction certificate image stream, the set of semantic type tags corresponding to all semantic region units contained in that frame is obtained. For any two different semantic type tags c(A) and c(B) in this set, the positions of c(A) at row index and c(B) at column index, and the positions of c(B) at row index and c(A) at column index, are incremented by 1 respectively in M(co). After traversing all frames, M(co) is a symmetric matrix, with the diagonal elements representing the total number of frames in which the semantic type tag appears.
[0118] Step S820: Perform spectral clustering decomposition on the semantic type label co-occurrence matrix to obtain semantic type label clusters. Each semantic type label cluster contains a subset of semantic type labels that exhibit high-frequency co-occurrence relationships in the financial transaction certificate image stream.
[0119] Perform spectral clustering decomposition on M(co). First, calculate the degree matrix D, a diagonal matrix, where the diagonal element D(c,c) is the sum of all elements in the c-th row of M(co). Calculate the Laplacian matrix L(ap) = DM(co). Perform eigenvalue decomposition on L(ap), taking the eigenvectors corresponding to the smallest K(cluster) eigenvalues. Arrange the C(type) eigenvectors row-wise to form a C(type) × K(cluster) matrix. Treat each row of this matrix as a vector of length K(cluster) and perform K-means clustering, with the number of clusters set to K(cluster). Here, K(cluster) is the preset number of clusters, and taking the smallest K(cluster) eigenvalues means selecting the top K(cluster) eigenvalues after sorting them from smallest to largest. The clustering results divide the C(type) semantic type labels into K(cluster) semantic type label clusters, where the semantic type labels within each cluster have a high-frequency co-occurrence relationship in the financial transaction certificate image stream.
[0120] Step S830: Aggregate the image semantic region units corresponding to the semantic type labels belonging to the same semantic type label cluster in the corresponding parameter sub-regions of the adaptation parameter layer of the large model in the financial risk control field across layers to generate parameter frozen cluster regions.
[0121] For the k-th semantic type label cluster, extract the image semantic region units corresponding to all semantic type labels within the cluster, and obtain the parameter sub-regions generated in step S132 for these image semantic region units. The union of these parameter sub-regions is taken as the parameter-frozen cluster region, where the original frozen state flag bits of each parameter sub-region are kept at 1. Within the parameter-frozen cluster region, a fully connected relationship is established between the parameter sub-regions corresponding to different semantic type labels within the cluster; that is, a parameter-frozen link is established between any two parameter sub-regions corresponding to any two different semantic type labels within the cluster at each adaptation parameter layer.
[0122] Step S840: Within the parameter-frozen cluster region, upgrade the inter-layer connection relationship between parameter sub-regions corresponding to different semantic type labels to fully connected frozen links within the parameter-frozen cluster region, so that each parameter sub-region within the parameter-frozen cluster region establishes a parameter-frozen link with the remaining parameter sub-regions within the parameter-frozen cluster region. Detect the parameter-frozen links between the parameter-frozen cluster region and other parameter sub-regions outside the parameter-frozen cluster region, disconnect the parameter-frozen links established in the parameter-frozen topology template between the parameter-frozen cluster region and other parameter sub-regions outside the parameter-frozen cluster region, and make the parameter-frozen cluster region an independent frozen unit.
[0123] Iterate through all established parameter-frozen links in the parameter-frozen topology template, checking whether the parameter sub-regions connected to each link belong to the same parameter-frozen cluster. If the parameter sub-regions at both ends of the link belong to different parameter-frozen clusters, or one end belongs to a parameter-frozen cluster while the other end does not belong to any parameter-frozen cluster, then delete the parameter-frozen link from the parameter-frozen topology template. After deletion, each parameter-frozen cluster is only connected to its own internal parameter sub-regions by parameter-frozen links, becoming an independent frozen unit, and has no parameter-frozen links with other parameter-frozen clusters or other non-clustered parameter sub-regions.
[0124] Step S850: When the large model in the financial risk control field receives a new financial transaction certificate image carrying any semantic type label in the semantic type label cluster, the parameter frozen cluster region corresponding to the semantic type label cluster is kept frozen as a whole. The non-corresponding parameter sub-regions in the parameter frozen cluster region are not unfrozen because the new financial transaction certificate image does not contain other semantic type labels in the semantic type label cluster.
[0125] When inputting a new financial transaction certificate image, if its semantic region unit contains some semantic type labels from a certain semantic type label cluster, but not all semantic type labels from that cluster, according to the original processing logic, the parameter sub-regions within the cluster where no semantic type label appears should be removed from the frozen parameter region. This step modifies this logic, uniformly maintaining the frozen state flag bit of all parameter sub-regions within the frozen parameter cluster region at 1, and preventing unfreezing due to the absence of individual semantic type labels.
[0126] Step S860: Record the duration of freezing of the parameter frozen cluster region in each adaptation task, mark the parameter frozen cluster region whose freezing duration exceeds the preset duration threshold as a long-term frozen cluster region, and migrate the frozen status flag bit of the long-term frozen cluster region from the erasable storage area to the read-only storage area. The frozen status flag bit in the read-only storage area cannot be modified through the regular parameter update process.
[0127] The risk control server maintains a freeze duration counter for each parameter freeze cluster region. The counter increments by 1 if the cluster region remains frozen during each adaptation task, and resets to zero if it is thawed. When the counter value exceeds a preset duration threshold T(long), the parameter freeze cluster region is marked as a long-term frozen cluster region. The freeze status flag of the long-term frozen cluster region, originally stored in the erasable memory area, is now copied to the read-only memory area. The read-only memory area corresponds to a write-protected page in memory, and its access permission is set to read-only. Any write operation to this page triggers a hardware exception and is intercepted. In subsequent parameter update processes, when writing parameter differences, the write operation is skipped directly for parameter positions in the read-only memory area where the freeze status flag is 1.
[0128] Step S870: In the parameter initialization or reset operation of the large model in the financial risk control field, skip the parameter value overwrite operation of the parameter sub-region corresponding to the frozen status flag bit in the read-only storage area, and retain the historical adapted parameter values in the long-term frozen cluster area.
[0129] When a large model in the financial risk control field needs to undergo parameter initialization or reset due to version upgrades, model structure adjustments, or fault recovery, the initialization program iterates through all parameter positions in the adaptation parameter layer and resets the parameter values to their pre-training initial values. During the iteration, it checks whether each parameter position belongs to a long-term frozen cluster region in the read-only storage area where the frozen state flag is set to 1. If it does, the reset operation for that parameter position is skipped, and its current parameter value remains unchanged.
[0130] Step S880: Bind the storage address of the frozen status flag bit in the read-only storage area to the model version identifier of the financial risk control domain big model. When the financial risk control domain big model is upgraded or the model structure is changed, the frozen status of the long-term frozen cluster area is migrated to the corresponding adaptation parameter layer position of the upgraded financial risk control domain big model according to the storage address.
[0131] The risk control server maintains an address mapping record for each long-term frozen cluster region in the read-only storage area. This record includes the layer index range, parameter matrix identifier, row index range, and column index range of the cluster region in the adaptation parameter layer, as well as the model version identifier of the current large-scale financial risk control model. When a model version upgrade causes changes in the adaptation parameter layer structure, such as an increase or decrease in the number of layers or a change in the parameter matrix dimension, the original address mapping of the long-term frozen cluster region is converted to a new address mapping based on the layer index mapping relationship and parameter matrix dimension mapping relationship between the old and new models. A corresponding read-only storage area page is allocated in the adaptation parameter layer of the new model, the frozen status flag is copied to the new page, and the model version identifier in the address mapping record is updated to the new version identifier.
[0132] Step S910: After the financial transaction certificate image stream is updated with incremental adaptation parameters in the large model of financial risk control, a snapshot of the parameter value distribution in the unfrozen low-rank adaptation parameter area in the adaptation parameter layer of the large model of financial risk control is obtained. The parameter value distribution snapshot records the parameter value of each parameter position in the unfrozen low-rank adaptation parameter area after the incremental update.
[0133] After step S144 is completed, the risk control server traverses each parameter position in the unfrozen low-rank adaptation parameter area of all adaptation parameter layers in the large model of financial risk control, reads the currently stored 32-bit floating-point parameter value at that parameter position, and records it as a snapshot entry in the format of a five-tuple of layer index l, parameter matrix identifier, row index i, column index j, and parameter value. The snapshot entries of all parameter positions in the unfrozen low-rank adaptation parameter area are summarized to form the parameter value distribution snapshot S0, which is stored as a linear list structure.
[0134] Step S920: According to the preset sampling interval, during the process of processing the subsequent financial transaction certificate image stream in the large model of financial risk control, continuously collect parameter value distribution snapshots of the unfrozen low-rank adaptation parameter area, generate parameter value distribution snapshot time series, and perform parameter position drift vector calculation on the parameter value distribution snapshots of adjacent time points in the parameter value distribution snapshot time series to obtain the parameter drift vector of each parameter position. The parameter drift vector includes the parameter value change direction and parameter value change magnitude.
[0135] After processing each batch of new financial transaction certificate image streams and completing incremental updates, the risk control server collects a parameter value distribution snapshot according to step S910. Let the q-th snapshot be S(q), q=0, 1, 2, ... Between snapshots S(q) and S(q+1) at adjacent time points, for each parameter position that exists in both snapshots, calculate the parameter drift vector D(drift)=(Δθ,|Δθ|), where Δθ=θ(S(q+1))-θ(S(q)) represents the direction and magnitude of parameter value change, with positive values indicating positive drift and negative values indicating negative drift, and |Δθ| representing the magnitude of parameter value change. The parameter drift vectors for all parameter positions constitute the drift vector set.
[0136] Step S930: Project the parameter drift vector of each parameter position to the polar coordinate system, calculate the polar angle value of the parameter drift vector, and mark the parameter position corresponding to the parameter drift vector whose polar angle value falls within the preset polar angle interval as the directional drift parameter position. The preset polar angle interval corresponds to the direction range of the parameter value that is monotonically increasing or monotonically decreasing.
[0137] For the parameter drift vector at the p-th parameter position, let its coordinates in the rectangular coordinate system be (Δθ,|Δθ|). Since |Δθ| is always greater than or equal to 0, the drift vector is always located in the first or fourth quadrant. Converting to polar coordinates, the polar radius r = sqrt((Δθ)^2 + (|Δθ|)^2), and the polar angle φ = arctan(|Δθ| / Δθ). When Δθ > 0, φ is in the interval (0, π / 2); when Δθ < 0, φ is in the interval (-π / 2, 0). Two polar angle intervals are preset: the positively increasing interval [φ1, φ2] corresponds to 0 < φ1 < φ2 < π / 2, and the negatively decreasing interval [-φ2, -φ1] corresponds to -π / 2 < -φ2 < -φ1 < 0. For each parameter position, if its φ falls within the positively increasing interval, it is marked as a positive directional drift parameter position; if its φ falls within the negatively decreasing interval, it is marked as a negative directional drift parameter position. The positive and negative directional drift parameter positions are collectively referred to as directional drift parameter positions. Other parameter positions whose φ does not fall within the preset polar angle interval are not marked.
[0138] Step S940: In the unfrozen low-rank adaptation parameter region, perform contour tracking processing along the spatial distribution boundary of the directional drift parameter position in the adaptation parameter layer to generate the directional drift region contour line. The area enclosed by the directional drift region contour line is the directional drift cluster region. The directional drift cluster region is peeled out from the unfrozen low-rank adaptation parameter region and merged into the frozen parameter region, updating the coverage of the frozen parameter region.
[0139] The positions of directional drift parameters of the same orientation type (positive or negative) are binary-marked on the parameter matrix plane of the adaptation parameter layer. Positions marked as 1 represent directional drift parameter positions, and positions marked as 0 represent non-directional drift parameter positions. A boundary tracing algorithm is used to generate the contour line of the directional drift region on this binary-marked map: Each pixel in the binary map is traversed; if a pixel is 1 and there are 0 pixels in its 8-neighborhood, it is marked as a contour point. The contour points are connected in adjacent order to form a closed contour line of the directional drift region. All 1-valued pixel positions within the contour line constitute the directional drift cluster region. All parameter positions within the directional drift cluster region are removed from the unfrozen low-rank adaptation parameter region by changing the corresponding position in the updatable parameter mask matrix from 1 to 0. These parameter positions are then merged into the frozen parameter region by changing the corresponding position of the frozen state marker from 0 to 1, and updating the coverage area F(frozen, updated) of the frozen parameter region.
[0140] Step S950: Re-execute the freeze operation on the updated frozen parameter region to block the subsequent gradient backpropagation update path of parameters within the directional drift cluster region.
[0141] For all parameter positions newly added to the directional drift cluster region in step S940, a gradient hook function is registered for each one. During backpropagation, the hook function multiplies the gradient tensor of the parameter position by 0.0, blocking its subsequent gradient update path. The gradient hooks of the original frozen parameter regions outside the directional drift cluster region remain unchanged.
[0142] Step S960: After merging the directional drift cluster region into the frozen parameter region, redetermine the reduced unfrozen low-rank adaptation parameter region, perform low-rank decomposition processing on the reduced unfrozen low-rank adaptation parameter region, and decompose the parameter matrix of the reduced unfrozen low-rank adaptation parameter region into a superposition of low-rank matrix and residual matrix.
[0143] The unfrozen low-rank adaptation parameter region is redefined as all parameter positions outside the updated frozen parameter region in the adaptation parameter layer. The parameter matrix of this frozen parameter region is denoted as W(unfrozen). Singular value decomposition is performed on W(unfrozen), where W(unfrozen) = U × Σ × V, and U and V are the left and right singular vector matrices, respectively. Σ is the singular value diagonal matrix, and the singular values are arranged in descending order. The first r(low) largest singular values and their corresponding left and right singular vectors are taken to construct the low-rank matrix W(low). The residual matrix W(res) = W(unfrozen) - W(low). r(low) is the preset low-rank decomposition rank parameter, and W(low) represents the low-rank matrix reconstructed from the first r(low) largest singular values and their left and right singular vectors.
[0144] Step S970: Compare the absolute value of each element in the residual matrix with the preset residual threshold. Mark the parameter positions where the absolute value of the element in the residual matrix is less than the preset residual threshold as low contribution parameter positions. Remove the low contribution parameter positions from the reduced unfrozen low-rank adaptation parameter region and merge them into the frozen parameter region. After completing the removal and merging operation of low contribution parameter positions, perform incremental update processing of adaptation parameters on the finally determined unfrozen low-rank adaptation parameter region to generate a simplified adaptation parameter incremental data package.
[0145] Traverse each parameter position in the residual matrix W(res) and calculate the absolute value of its element |w(res)|. If |w(res)| is less than the preset residual threshold t(res), mark the parameter position as a low-contribution parameter position. Remove the low-contribution parameter positions from the reduced unfrozen low-rank adaptation parameter region and merge them into the frozen parameter region, updating the updatable parameter mask matrix and the frozen state flag bit. After removal and merging, the final determined unfrozen low-rank adaptation parameter region is obtained. Perform the incremental update processing of steps S142 to S144 on the final determined unfrozen low-rank adaptation parameter region to generate a simplified adaptation parameter incremental data packet Δ(pkglean).
[0146] Step S1010: During the process of writing the incremental data packet of adaptation parameters into the low-rank adaptation parameter storage space of the large model in the financial risk control field, intercept the intermediate result of the superposition operation between the parameter difference at each parameter position in the incremental data packet of adaptation parameters and the existing parameter value in the corresponding storage sector in the low-rank adaptation parameter storage space. Compare the intermediate result with the preset parameter value overflow upper limit and the preset parameter value overflow lower limit. When the intermediate result exceeds the preset parameter value overflow upper limit or is lower than the preset parameter value overflow lower limit, mark the parameter position as the parameter saturation position.
[0147] During the element-by-element superposition operation in step S144, the risk control server sets data breakpoints before the superposition operation is executed. For each parameter position, the existing parameter value is θ(old), the parameter difference is Δθ, and the intermediate superposition result θ(mid) = θ(old) + Δθ. It is checked whether θ(mid) satisfies θ(lower) ≤ θ(mid) ≤ θ(upper), where θ(upper) is the preset upper limit of parameter value overflow, and θ(lower) is the preset lower limit of parameter value overflow. If θ(mid) > θ(upper) or θ(mid) < θ(lower), the parameter position is marked as a parameter saturation position, and its layer index l, parameter matrix identifier, row index i, and column index j are recorded. If θ(mid) is within the safe range, the superposition operation is executed normally and written back to the storage sector.
[0148] Step S1020: Extract the layer index number and parameter coordinates of the parameter saturation position in the adaptation parameter layer, trace back the image semantic region unit corresponding to the parameter saturation position in the financial transaction certificate image stream, and establish the mapping relationship between the parameter saturation position and the image semantic region unit.
[0149] For each parameter saturation position, using its parameter coordinates (i, j) as the center, search within the parameter region index range generated for each image semantic region unit in step S124, and find the image semantic region unit whose parameter region index range covers (i, j) and has the smallest area as the corresponding image semantic region unit. Establish a mapping relationship between the parameter saturation position and the image semantic region unit, and record the mapping relationship as (layer index l, row index i, column index j, image semantic region unit identifier U(k)).
[0150] Step S1030: Add the semantic type label of the image semantic region unit corresponding to the parameter saturation position to the parameter saturation semantic label set. The parameter saturation semantic label set records the semantic type labels that triggered parameter value overflow during the adaptation parameter incremental update process.
[0151] The risk control server maintains a set of parameter-saturated semantic labels S(sat), initially empty. For each parameter-saturated position, the corresponding image semantic region unit is queried through the mapping relationship established in step S1020, its semantic type label is extracted, and the semantic type label is added to S(sat). If the semantic type label already exists in S(sat), it is not added again. S(sat) is continuously accumulated and updated as the adaptation task is executed.
[0152] Step S1040: When the large model in the financial risk control field processes the image stream of new financial transaction certificates, identify whether the semantic type label of each semantic region unit in the image stream of new financial transaction certificates is included in the parameter saturated semantic label set.
[0153] After performing step S120 on the image stream of the new financial transaction certificate, each image semantic region unit and its semantic type label are obtained. Each image semantic region unit is traversed, and its semantic type label is checked to see if it belongs to the parameter saturated semantic label set S(sat). The set of image semantic region units U(sat) that match S(sat) is recorded.
[0154] Step S1050: For image semantic region units whose semantic type labels are included in the parameter saturated semantic label set, during the parameter freezing topology template construction stage, the corresponding parameter sub-region of the image semantic region unit in the adaptation parameter layer is divided into independent parameter saturated frozen regions. The frozen state flag bits of the independent parameter saturated frozen regions have higher priority than other frozen state flag bits that may be assigned to the same parameter sub-region in the parameter freezing topology template.
[0155] For each image semantic region unit in U(sat), when constructing the parameter freezing topology template in step S132, the parameter sub-region corresponding to the image semantic region unit is marked as an independent parameter saturation freezing region. When allocating the freeze state flag bits, the freeze state flag bits of the independent parameter saturation freezing region have the highest priority. If the same parameter position belongs to both an independent parameter saturation freezing region and another parameter freezing link, the freeze state flag bit of the independent parameter saturation freezing region is kept at 1, and the markings of other freezing links are ignored.
[0156] Step S1060: In the independent parameter saturation freeze zone, in addition to maintaining the frozen state, parameter value attenuation processing is applied to the adaptive parameter value in the independent parameter saturation freeze zone. The adaptive parameter value in the independent parameter saturation freeze zone is multiplied element by element with the preset attenuation coefficient, so that the adaptive parameter value in the zone falls back to the parameter value safe range.
[0157] For each parameter position within the independent parameter saturation freeze zone, read its current parameter value θ(current). Take a preset attenuation coefficient α(decay), where α(decay) is between 0 and 1. The attenuated parameter value is θ(decay) = α(decay) × θ(current). If θ(current) > θ(upper), then the attenuated θ(decay) should move closer to θ(upper); if θ(current) < θ(lower), then the attenuated θ(decay) should move closer to θ(lower). If θ(decay) still exceeds the safe range, continue multiplying by α(decay) for iterative attenuation until θ(decay) falls within the interval [θ(lower), θ(upper)]. Write the final attenuated parameter value back to the parameter position.
[0158] Step S1070: For the adapted parameter values in the independent parameter saturation freezing region after parameter value attenuation processing, regenerate the saturation region parameter freezing topology template, and perform template fusion processing with the parameter freezing topology template generated for the new financial transaction certificate image stream, so that the parameter sub-regions of the two templates that do not overlap in space maintain their independent freezing states.
[0159] After parameter value attenuation processing, a new saturated region parameter freezing topology template is generated for each independent parameter saturated frozen region as described in step S132. This saturated region parameter freezing topology template only contains the frozen state flag information of the independent parameter saturated frozen regions. The saturated region parameter freezing topology template is then fused with the parameter freezing topology template generated for the new financial transaction certificate image stream in step S130. The fusion rules are as follows: for parameter positions covered by both templates, the frozen state flag of the saturated region parameter freezing topology template is used; for parameter positions covered only by the saturated region parameter freezing topology template, the frozen state flag of the saturated region template is retained; for parameter positions covered only by the parameter freezing topology template generated for the new financial transaction certificate image stream, the frozen state flag of that template is retained. The fused template is the final parameter freezing topology template.
[0160] Step S1080: Within the frozen parameter region after template fusion processing, perform incremental update processing on the unfrozen low-rank adaptation parameter region outside the frozen parameter region in the adaptation parameter layer of the large model in the financial risk control field, generate an adaptation parameter incremental data package containing parameter saturation region compensation information, and write the version identifier of the parameter saturation semantic tag set, the layer index number of the parameter saturation position in the adaptation parameter layer, and the parameter coordinates in the metadata index area of the adaptation parameter incremental data package.
[0161] Based on the frozen parameter region defined by the parameter freezing topology template after fusion in step S1070, incremental updates are performed on the unfrozen low-rank adaptation parameter region according to step S140, generating an adaptation parameter incremental data package Δ(pkgsat). A version identifier of the parameter saturation semantic tag set is appended to the metadata index area of this Δ(pkgsat). The version identifier is the current version number of S(sat), along with a list of the layer index numbers and parameter coordinates of all parameter saturation positions detected in this processing within the adaptation parameter layer. Subsequent queries of the metadata of this Δ(pkgsat) can directly locate the semantic type tag and precise parameter position that triggered parameter saturation.
[0162] Step S1110: Extract the layout structure primitive distribution pattern of each frame of financial transaction certificate image in the financial transaction certificate image stream. The layout structure primitive distribution pattern records the type and spatial arrangement position of each layout structure primitive in each frame of financial transaction certificate image.
[0163] The risk control server extracts the layout structure primitive distribution pattern of the t-th frame financial transaction certificate image Et from the layout primitive detection processing result of step S121. The layout structure primitive distribution pattern is a set, and each element in the set is a triple (type(i), cx(i), cy(i)), where type(i) is the layout structure primitive type, cx(i) and cy(i) are the coordinates of the center point of the bounding rectangle of the layout structure primitive in the image coordinate system, and cx and cy have been normalized to between 0 and 1 as in step S123.
[0164] Step S1120: Based on the distribution pattern of the page structure primitives of each frame of financial transaction voucher images, calculate the page structure similarity between each pair of financial transaction voucher images, generate a voucher image page similarity matrix, and construct a voucher image page evolution trajectory diagram using the voucher image page similarity matrix as input. The nodes of the voucher image page evolution trajectory diagram are each frame of financial transaction voucher images. The edges of the voucher image page evolution trajectory diagram connect two frames of financial transaction voucher images whose page structure similarity exceeds a preset similarity threshold, and the direction of the edges is from the financial transaction voucher image with the smaller acquisition time sequence number to the financial transaction voucher image with the larger acquisition time sequence number.
[0165] For the financial transaction voucher images in frames t1 and t2, the layout structure similarity Sim(t1,t2) is calculated using the layout structure primitive distribution pattern. First, a type correspondence is established between the layout structure primitive types of the two frames, taking the common layout structure primitive types. For each common type, primitives of that type in the two frames are paired according to their spatial positions. The pairing strategy uses the Hungarian algorithm to minimize the sum of the Euclidean distances between paired primitives. After pairing, the Euclidean distance between each pair of paired primitives is calculated, and the complement of the average of all paired distances is taken as the similarity component of that common type. The similarity components of each common type are weighted and averaged according to the number of primitives of that type in the two frames to obtain Sim(t1,t2), where Sim takes a value between 0 and 1. All frame pairs are traversed to construct a T×T symmetric voucher image layout similarity matrix M(Sim). Using each frame image as a node, if Sim(t1,t2) exceeds the preset similarity threshold t(sim), then a directed edge is added between node t1 and node t2, with the direction pointing from the frame with the smaller acquisition time number to the frame with the larger acquisition time number, thus constructing the voucher image layout evolution trajectory graph G(evo).
[0166] Step S1130: Extract the longest continuous evolution path from the evolution trajectory diagram of the voucher image layout. The longest continuous evolution path is the node sequence corresponding to the maximum number of nodes that can be traversed along the edge direction.
[0167] Perform topological sorting on G(evo), and use dynamic programming to find the longest path in ascending order of node collection time sequence numbers. Let dp[t] represent the length of the longest path ending at node t, and initialize all dp[t] = 1. Traverse each node t in topological order, and for each outgoing edge of t pointing to the adjacent node next, update dp[next] = max(dp[next], dp[t] + 1). After traversal, take the endpoint node corresponding to the maximum value of all dp[t], and backtrack from the endpoint node to the starting node along the predecessor pointer. The node sequence on the backtracking path is the longest continuous evolution path P(evo), with a length of L(path) nodes and a node sequence of {t1, t2, ..., tL(path)}.
[0168] Step S1140: Arrange the adaptation parameter incremental data packets corresponding to the financial transaction certificate images on the longest continuous evolution path according to the node order of the longest continuous evolution path to generate an evolution sequence adaptation parameter incremental data chain. Perform a difference operation on the parameter difference values of adjacent adaptation parameter incremental data packets in the evolution sequence adaptation parameter incremental data chain to obtain the second-order difference sequence of parameter increments. The second-order difference sequence of parameter increments represents the acceleration of the change of adaptation parameter increments in the continuous acquisition time series.
[0169] The adaptation parameter incremental data packets corresponding to each frame of the longest continuous evolution path P(evo) are extracted from the historical records and arranged in the order of the nodes of P(evo) to form the evolution sequence adaptation parameter incremental data chain Δ(pkg1), Δ(pkg2), ..., Δ(pkgL(path)). For each common parameter position between the s-th and s+1-th Δ(pkg), the first-order difference Δ(1)θ(s) = Δθ(s+1) - Δθ(s). For each common parameter position between the s-th and s+1-th first-order differences, the second-order difference Δ(2)θ(s) = Δ(1)θ(s+1) - Δ(1)θ(s). The second-order difference values of all common parameter positions constitute the parameter incremental second-order difference sequence.
[0170] Step S1150: Extract the parameter positions in the second-order difference sequence where the absolute value of the second-order difference value is less than a preset stationary threshold, and mark the parameter positions as evolutionary stationary parameter positions.
[0171] For each parameter position in the second-order difference sequence of parameter increments, take the absolute value |Δ(2)θ|. If |Δ(2)θ| is less than the preset stationarity threshold t(stab), it indicates that the parameter increment change at that position tends to be stable during continuous acquisition, and the acceleration is close to zero. This parameter position is then marked as an evolutionarily stationary parameter position.
[0172] Step S1160: Remove the parameter sub-region corresponding to the position of the evolutionary stationary parameter in the adaptation parameter layer of the large model in the financial risk control field from the frozen parameter region, so that the parameter sub-region corresponding to the position of the evolutionary stationary parameter can participate in the incremental update processing in subsequent adaptation tasks.
[0173] For each evolution-stationary parameter position, find the parameter sub-region containing that parameter position in the frozen parameter region, change the overall frozen state flag of the parameter sub-region from 1 to 0, reverse the judgment logic of removing the parameter sub-region from the unfrozen low-rank adaptation parameter region, so that it is re-included in the unfrozen low-rank adaptation parameter region and participates in the gradient calculation and parameter update of subsequent steps S142 to S144.
[0174] Step S1170: For the parameter sub-regions corresponding to the evolutionary stationary parameter positions removed from the frozen parameter region, generate a stationary parameter unfreezing template. Perform template difference operation between the stationary parameter unfreezing template and the parameter freezing topology template constructed for the subsequent financial transaction certificate image stream, so that the frozen state marker bits of the parameter sub-regions marked in the stationary parameter unfreezing template are cleared in the parameter freezing topology template. After clearing the frozen state marker bits of the parameter sub-regions marked in the stationary parameter unfreezing template, redetermine the frozen parameter region and the unfrozen low-rank adaptation parameter region in the adaptation parameter layer of the large model in the financial risk control field, and perform incremental update processing on the redetermined unfrozen low-rank adaptation parameter region.
[0175] The set of all parameter sub-regions thawed in step S1160 is recorded as a stable parameter thawing template. When constructing the parameter freezing topology template in step S130 for the subsequent financial transaction certificate image stream, a difference operation is performed between the newly constructed parameter freezing topology template and the stable parameter thawing template: for each parameter sub-region in the newly constructed parameter freezing topology template, if it is completely contained within a parameter sub-region in the stable parameter thawing template, then the parameter sub-region is deleted from the newly constructed parameter freezing topology template, and its frozen state flag is not written to the adaptation parameter layer. After the difference operation is completed, the updated parameter freezing topology template is obtained, which is projected onto the adaptation parameter layer to obtain the updated frozen parameter regions. The updated unfrozen low-rank adaptation parameter regions are re-determined, and the incremental update processing of step S140 is performed on the unfrozen low-rank adaptation parameter regions.
[0176] Step S1210: In the adaptation parameter layer of the large model in the financial risk control field, extract the row and column coordinate range of the parameter sub-regions contained in the frozen parameter region in the parameter matrix of the adaptation parameter layer, generate the frozen region coordinate mask matrix, perform morphological dilation processing on the frozen region coordinate mask matrix, expand the outer boundary of the frozen parameter region in the frozen region coordinate mask matrix outward by a preset dilation width, so that the expanded frozen region coordinate mask matrix covers the outer adjacent parameter positions of the frozen parameter region.
[0177] On the parameter matrix plane of the low-rank matrix A and low-rank matrix B of each adaptation parameter layer, the parameter positions corresponding to the frozen parameter region are set to 1, and the remaining parameter positions are set to 0, generating a frozen region coordinate mask matrix M(mask). The size of M(mask) is the same as the corresponding parameter matrix. Morphological expansion is performed on M(mask), and the expansion structuring element adopts a circular structuring element with a radius of R(expand). After expansion, the outer boundary of the frozen region is expanded outward by R(expand) parameter positions. The newly added parameter positions are 0 in the original M(mask) but become 1 in the expanded mask matrix M(mask,exp). M(mask,exp) covers the frozen parameter region and its surrounding adjacent parameter positions.
[0178] Step S1220: Perform an XOR operation between the expanded frozen region coordinate mask matrix and the unexpanded frozen region coordinate mask matrix to extract the newly added annular parameter region. Define the annular parameter region as the parameter freezing transition zone. Set gradient decay weights at the parameter positions within the parameter freezing transition zone. The gradient decay weights decrease from large to small along the direction from the unfrozen low-rank adaptation parameter region to the frozen parameter region, so that the gradient update received by the parameter positions within the parameter freezing transition zone during gradient backpropagation is scaled according to the gradient decay weights.
[0179] Perform an element-wise XOR operation on M(mask,exp) and M(mask). The positions where M(mask,exp) has a value of 1 and M(mask) has a value of 0 are the newly added annular parameter regions, defined as the parameter freezing transition zone. For each parameter position within the parameter freezing transition zone, calculate its distance to the boundary of the unfrozen low-rank adaptation parameter region and its distance to the boundary of the frozen parameter region. Let the shortest distance from the parameter position to the boundary of the unfrozen low-rank adaptation parameter region be d(unfrozen), and the shortest distance to the boundary of the frozen parameter region be d(frozen). The gradient decay weight w(decay) = d(unfrozen) / (d(unfrozen) + d(frozen)). w(decay) takes a value of 1 at the boundary between the parameter freezing transition zone and the unfrozen low-rank adaptation parameter region, and a value of 0 at the boundary between the parameter freezing transition zone and the frozen parameter region, and decreases monotonically in the direction from the unfrozen low-rank adaptation parameter region to the frozen parameter region.
[0180] Step S1230: At the boundary between the parameter freezing transition zone and the frozen parameter region, set the minimum value of the gradient decay weight to 0, so that the gradient update signal completely decays to 0 at the boundary between the parameter freezing transition zone and the frozen parameter region. At the boundary between the parameter freezing transition zone and the unfrozen low-rank adaptation parameter region, set the maximum value of the gradient decay weight to 1, so that the gradient update signal passes through the boundary between the parameter freezing transition zone and the unfrozen low-rank adaptation parameter region without decay.
[0181] For each parameter position within the parameter freezing transition zone, the w(decay) calculated in step S1220 is assigned to the gradient decay weight at that position. During backpropagation, the gradient tensor G received at that parameter position is multiplied by w(decay) and then used for parameter updates, causing the gradient on the side closer to the frozen parameter region to gradually decay to 0, while the gradient on the side closer to the unfrozen low-rank fitting parameter region remains unchanged.
[0182] Step S1240: Collect the deviation between the actual effective value of the gradient decay weight and the theoretical set value of the gradient decay weight of each parameter position in the parameter freezing transition zone in each adaptation task, and generate a gradient decay deviation distribution map. When the number of parameter positions with deviations exceeding the preset deviation tolerance value in the gradient decay deviation distribution map exceeds the preset number threshold, adjust the preset expansion width of the parameter freezing transition zone, increase or decrease the preset expansion width to reduce the number of parameter positions with deviations exceeding the preset deviation tolerance value to below the preset number threshold.
[0183] During the backpropagation process of each adaptation task, the risk control server records the absolute value of the difference between the actual received gradient tensor G(actual) and the theoretically expected received gradient tensor G(theory)×w(decay) at each parameter position within the parameter freezing transition band, |G(actual)-G(theory)×w(decay)|, as the deviation value. The deviation values of all parameter positions are arranged according to their spatial location within the parameter freezing transition band to form a gradient decay deviation distribution map. The number N(bias) of parameter positions with deviation values exceeding the preset deviation tolerance value t(bias) is counted. If N(bias) exceeds the preset threshold N(bias,max), it indicates that the current parameter freezing transition band width is insufficient to smooth gradient decay, and the preset expansion width R(expand) is increased by a preset adjustment step size ΔR. If N(bias) is 0 for multiple consecutive adaptation tasks, R(expand) is decreased by ΔR to reduce unnecessary transition band width. After adjusting R(expand), steps S1210 to S1230 are re-executed to generate a new parameter freezing transition band.
[0184] Step S1250: When performing incremental update processing on the unfrozen low-rank adaptation parameter region outside the frozen parameter region in the adaptation parameter layer of the large model in the financial risk control field, the gradient response value of the parameter position within the parameter freezing transition zone is multiplied by the gradient decay weight corresponding to that parameter position, and then participates in the gradient descent update processing of the unfrozen low-rank adaptation parameter region. The gradient decay weight distribution of the parameter freezing transition zone is recorded in the metadata index area of the adaptation parameter incremental data package and stored together with the frozen state flag information of the parameter freezing topology template.
[0185] During the gradient response tensor calculation in step S142, for each parameter position within the parameter freeze transition band, before passing the gradient value to the optimizer, the gradient value at that position is multiplied by w(decay) allocated in step S1220 to obtain the decayed gradient value. This decayed gradient value is then sent to the AdamW optimizer for parameter updates. A field is appended to the metadata index area of the generated adaptive parameter increment data package to record the R(expand) value of the parameter freeze transition band and a list of w(decay) values for all parameter positions within the transition band during this processing. This field, along with the freeze status flag information of the parameter freeze topology template, is persisted for subsequent querying and auditing.
[0186] In practical applications, such as Figure 2As shown, the financial transaction voucher image stream consists of multiple frames of financial transaction voucher images. Each frame is arranged in chronological order according to its acquisition time, and each frame is labeled with a voucher source channel identifier. The financial transaction voucher image stream is input into the image region semantic deconstruction processing stage, where each frame of the financial transaction voucher image is decomposed into multiple image semantic region units according to semantic region division rules. Each image semantic region unit is assigned a semantic type label and a region location code. The semantic type label includes labels for amount information area, counterparty information area, time information area, and voucher identification area. The deconstructed image semantic region units are transmitted to the adaptation parameter layer of the large model in the financial risk control domain. A parameter freezing topology template is constructed based on the region location code and semantic type label. The parameter freezing topology template is projected into the adaptation parameter layer to delineate the frozen parameter region. The parameter positions covered by the frozen parameter region are marked as frozen. A parameter freezing isolation boundary layer is generated at the region boundary line between the frozen parameter region and the unfrozen low-rank adaptation parameter region. The parameters in the parameter freezing isolation boundary layer maintain numerical transmission during forward propagation and block gradient inflow into the frozen parameter region during backward propagation. Taking the scenario of a provincial branch risk control center of a commercial bank processing image streams of three types of financial transaction vouchers—mobile banking transfer vouchers, counter service scans, and third-party payment platform receipts—as an example, the risk control center consumes messages one by one from the message queue in a first-in-first-out order, extracts each frame of the financial transaction voucher image and its metadata, and assembles them into a financial transaction voucher image stream. For screenshots of mobile banking transfer vouchers, the image region semantic deconstruction processing step decomposes the voucher image into four image semantic region units: amount information area, counterparty information area, time information area, and voucher identifier area. These are respectively assigned labels for the amount information area, counterparty information area, time information area, and voucher identifier area. The regional position code of each image semantic region unit is represented by a combination of normalized horizontal and vertical coordinate values. The amount information area label is mapped to the index range of the Transformer decoder layer responsible for numerical information encoding in the large model of financial risk control; the counterparty information area label is mapped to the index range of the Transformer decoder layer responsible for entity relationship encoding; the time information area label is mapped to the index range of the Transformer decoder layer responsible for temporal feature encoding; and the certificate identification area label is mapped to the index range of the Transformer decoder layer responsible for global semantic encoding. After the parameter frozen topology template is projected onto the above-mentioned adaptation parameter layer, the parameter sub-regions corresponding to the amount information area, counterparty information area, time information area, and certificate identification area are marked as frozen. The unfrozen low-rank adaptation parameter area only contains the adaptation parameter positions not covered by the above-mentioned parameter sub-regions.In the gradient backpropagation path, the gradient update signal of the parameter in the frozen parameter region is forced to be set to zero. The parameter in the parameter freezing isolation boundary layer maintains numerical transmission during forward propagation and blocks the gradient from flowing into the frozen parameter region during backpropagation. This effectively avoids cross-interference between the adaptation parameters of different semantic regions and ensures that the model's discriminative ability in specific semantic regions is not diluted.
[0187] like Figure 3As shown, the gradient response processing stage outputs a masked gradient response tensor. This masked gradient response tensor flows to the gradient descent update processing stage, which calculates the parameter difference between the parameter values before and after the update. This parameter difference serves as the target for writing the adaptation parameter incremental data packet. The low-rank adaptation parameter storage space is presented in the form of a cylindrical database. The low-rank adaptation parameter storage space includes storage sector partitioning and a metadata index area. Storage sectors are partitioned according to the layer index position of the adaptation parameter layer. The metadata index area records the collection time sequence number and credential source channel identifier corresponding to the adaptation parameter incremental data packet. The adaptation parameter incremental data packets are arranged in a version chain on the timeline, each with a time-series version label. Adjacent adaptation parameter incremental data packets with parameter update magnitudes less than a preset update magnitude threshold are marked as mergeable incremental data packets. The new data packet generated after merging replaces the merged adaptation parameter incremental data packet on the version chain on the timeline, and the time-series version labels of the merged adaptation parameter incremental data packets are rearranged. Taking the processing of high-frequency financial transaction certificate image streams by this risk control center as an example, the risk control server generates a time-series version tag for each adaptive parameter incremental data packet. The time-series version tag is the arithmetic mean of all acquisition time-series numbers in the financial transaction certificate image stream corresponding to that adaptive parameter incremental data packet. The adaptive parameter incremental data packets are arranged in ascending order of their time-series version tag values. Adjacent adaptive parameter incremental data packets are linked by pointers to form a singly linked list of adaptive parameter incremental version chains. For two adjacent adaptive parameter incremental data packets in the version chain, the set of parameter positions they both contain is extracted. For each common parameter position, the absolute value of the difference between the parameter values is taken. The absolute values of the differences between all common parameter positions are summed and divided by the total number of common parameter positions to obtain the parameter update magnitude. If the parameter update magnitude is less than a preset update magnitude threshold, the two adjacent adaptive parameter incremental data packets are marked as mergeable incremental data packets. For mergeable incremental data packets, parameter difference merging is performed. The parameter differences between each adaptation parameter layer in the mergeable incremental data packet are weighted and averaged according to parameter position to generate a merged adaptation parameter incremental data packet. The merged adaptation parameter incremental data packet is then removed, and the merged adaptation parameter incremental data packet replaces the merged one in the adaptation parameter incremental version chain. The time-series version tag sequence of the adaptation parameter incremental version chain is then rearranged. In the low-rank adaptation parameter storage space, the storage sectors occupied by the removed adaptation parameter incremental data packet are deleted, releasing the corresponding storage space resources and effectively reducing storage overhead.
[0188] like Figure 4As shown, the semantic type label distribution of financial transaction documents is illustrated using stacked document icons. The semantic type label co-occurrence matrix is constructed from the semantic type label distribution. The rows and columns of the co-occurrence matrix represent the semantic type labels appearing in the financial transaction document image stream. The element values of the co-occurrence matrix represent the frequency of the corresponding row and column semantic type labels appearing together in the same frame of the financial transaction document image. After spectral clustering decomposition, the co-occurrence matrix generates semantic type label clusters, and the node connections within these clusters are recorded. Parameter-frozen cluster regions are formed by fully connected frozen links. The connections between independent frozen units are labeled. Freezing durations exceeding a preset threshold form long-term frozen paths. Erasable and read-only storage areas are distinguished, and the frozen state marker is fixed in the read-only storage area. The frozen state transition path illustration shows that parameter value overwrite skip operations are performed, and model version identifiers and bound storage addresses guide the frozen state transition. Taking the processing of financial transaction certificate image streams containing multiple certificate types as an example, the risk control server extracts all unique semantic type tags from the financial transaction certificate image stream, constructs a semantic type tag co-occurrence matrix, traverses each frame of the financial transaction certificate image stream, obtains the set of semantic type tags corresponding to all semantic region units contained in that frame, and increments by one for any two different semantic type tags in the co-occurrence matrix, corresponding to the first semantic type tag at the row index and the second semantic type tag at the column index, and corresponding to the second semantic type tag at the row index and the first semantic type tag at the column index. After traversing all frames, the co-occurrence matrix is a symmetric matrix, with the diagonal elements representing the total number of frames in which the semantic type tag appears. Spectral clustering decomposition is performed on the co-occurrence matrix. First, the degree matrix is calculated. The degree matrix is a diagonal matrix, and the diagonal elements are the sum of all elements in the corresponding row of the co-occurrence matrix. Then, the Laplacian matrix is calculated, and eigenvalue decomposition is performed on the Laplacian matrix. The eigenvectors corresponding to the minimum number of eigenvalues are selected, and the eigenvectors are arranged row-wise to form a matrix. Each row of the matrix is treated as a vector, and K-means clustering is performed. The number of clusters is the preset number. The clustering results divide the semantic type labels into multiple semantic type label clusters. The semantic type labels within each cluster have a high-frequency co-occurrence relationship in the financial transaction certificate image stream.The image semantic region units corresponding to semantic type labels belonging to the same semantic type label cluster are aggregated across layers in the adaptation parameter layer of the large model in the financial risk control field to generate parameter frozen cluster regions. Within the parameter frozen cluster region, a fully connected relationship is established between the parameter sub-regions corresponding to different semantic type labels within the cluster. That is, parameter frozen links are established in each adaptation parameter layer for any two different semantic type labels within the cluster. The parameter frozen links between the parameter frozen cluster region and other parameter sub-regions outside the parameter frozen cluster region are detected. The parameter frozen links established in the parameter frozen topology template between the parameter frozen cluster region and other parameter sub-regions outside the parameter frozen cluster region are disconnected, making the parameter frozen cluster region an independent frozen unit. When a large-scale financial risk control model receives a new financial transaction document image carrying any semantic type label from a cluster, it maintains the entire parameter-frozen cluster region corresponding to that cluster in a frozen state. It does not unfreeze non-corresponding parameter sub-regions within the parameter-frozen cluster region simply because the new financial transaction document image does not contain other semantic type labels from the same cluster. The model records the duration of the frozen parameter cluster region's freeze in each adaptation task. Parameter-frozen cluster regions with a freeze duration exceeding a preset threshold are marked as long-term frozen cluster regions. The frozen status markers of these long-term frozen cluster regions are migrated from the writable storage area to the read-only storage area. The frozen status markers in the read-only storage area cannot be modified through the regular parameter update process. During parameter initialization or reset operations in the large-scale financial risk control model, the model skips the parameter value overwrite operation for the parameter sub-regions corresponding to the frozen status markers in the read-only storage area, retaining the historical adaptation parameter values within the long-term frozen cluster region. The storage address of the frozen status flag in the read-only storage area is bound to the model version identifier of the large model in the financial risk control field. When the large model in the financial risk control field is upgraded or the model structure is changed, the frozen status of the long-term frozen cluster area is migrated to the corresponding adaptation parameter layer position of the upgraded large model in the financial risk control field based on the storage address.
[0189] Furthermore, the low-rank adaptation parameter freezing system for a large domain model provided in this application embodiment includes a processor and a memory. The processor and memory are connected, for example, via a bus. Optionally, the low-rank adaptation parameter freezing system for a large domain model may further include a transceiver, which can be used for data interaction between this low-rank adaptation parameter freezing system for a large domain model and other low-rank adaptation parameter freezing systems for a large domain model, such as sending and / or receiving data. It should be noted that in actual scheduling, the transceiver is not limited to one, and the structure of this low-rank adaptation parameter freezing system for a large domain model does not constitute a limitation on the embodiments of this application.
[0190] The memory stores program code for executing the embodiments of this application, and its execution is controlled by a processor. The processor executes the program code stored in the memory to implement the steps shown in the foregoing method embodiments.
[0191] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.
Claims
1. A low-rank fitting parameter freezing method applied to large domain models, characterized in that, The method includes: Acquire a financial transaction voucher image stream, which contains multiple frames of financial transaction voucher images arranged in the acquisition time sequence, with each frame of the financial transaction voucher image labeled with an acquisition time sequence number and a voucher source channel identifier; The image stream of the financial transaction certificate is subjected to image region semantic deconstruction processing. Each frame of the financial transaction certificate image is decomposed into multiple image semantic region units according to the semantic region division rules, and a semantic type label and region location code are assigned to each image semantic region unit. The adaptation parameter layer corresponding to each semantic type label of the large model in the financial risk control field is called. A parameter freezing topology template is constructed based on the regional position encoding and semantic type label of each image semantic region unit. The parameter freezing topology template is then projected into the adaptation parameter layer of the large model in the financial risk control field to delineate the frozen parameter region. Incremental update processing is performed on the unfrozen low-rank adaptation parameter area outside the frozen parameter area in the adaptation parameter layer of the large model of financial risk control, generating an incremental data packet of adaptation parameters, and writing the incremental data packet of adaptation parameters into the low-rank adaptation parameter storage space of the large model of financial risk control.
2. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The step of performing image region semantic deconstruction processing on the financial transaction certificate image stream involves decomposing each frame of the financial transaction certificate image into multiple image semantic region units according to semantic region division rules, and assigning a semantic type label and region location code to each image semantic region unit, including: The layout primitive detection process is performed on each frame of the financial transaction certificate image in the financial transaction certificate image stream to identify the layout structure primitives contained in each frame of the financial transaction certificate image. The layout structure primitives include text line primitives, table line primitives, seal graphic primitives and handwriting primitives. A layout structure adjacency graph is constructed based on the spatial adjacency relationship between the layout structure primitives. The nodes of the layout structure adjacency graph are each layout structure primitive, and the edges of the layout structure adjacency graph represent that two layout structure primitives are adjacent in the image space and the distance is less than a preset proximity distance threshold. Traverse the adjacency graph of the page structure and aggregate page structure primitives with closed connection relationships into candidate semantic regions. Each candidate semantic region is composed of at least one page structure primitive and the candidate semantic regions do not overlap. Extract the type combination features and spatial proportion features of the layout structure primitives in each candidate semantic region, and input the type combination features and spatial proportion features into a preset region semantic classifier to obtain the semantic type label corresponding to each candidate semantic region. The semantic type label includes the amount information area label, the counterparty information area label, the time information area label, and the voucher identification area label. Using the top left corner of each frame of financial transaction certificate image as the origin of coordinates, calculate the normalized abscissa and ordinate values of the center point of the bounding rectangle of each image semantic region unit in the image coordinate system, and combine the normalized abscissa and ordinate values to form the regional position code of the image semantic region unit. Based on the semantic type label of each image semantic region unit, retrieve the set of adaptation parameter layers in the large model of the financial risk control field that has a preset mapping relationship with the semantic type label, and the set of adaptation parameter layers contains at least one adaptation parameter layer. Extract the layer index number and parameter matrix dimension information of each adaptation parameter layer in the hierarchical structure of the large model in the financial risk control field. Perform proportional transformation and index mapping processing on the regional position encoding of each image semantic region unit according to the parameter matrix dimension information to generate a parameter region index range that matches the parameter matrix dimension.
3. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The process of calling the adaptation parameter layer of the large-scale financial risk control model corresponding to each semantic type label involves constructing a parameter-frozen topology template based on the regional location encoding and semantic type label of each image semantic region unit, and projecting the parameter-frozen topology template into the adaptation parameter layer of the large-scale financial risk control model to delineate the frozen parameter region, including: Obtain the topology of the adaptation parameter layer of the large model in the financial risk control field. The topology of the adaptation parameter layer records the layer index position and inter-layer connection relationship of each adaptation parameter layer in the model hierarchy. Based on the semantic type label of each image semantic region unit, a set of adaptation parameter layers that have a preset correspondence with the semantic type label is retrieved in the adaptation parameter layer topology, and each semantic type label is mapped to at least one adaptation parameter layer. The parameter region index range obtained by scaling the region position code of each image semantic region unit is used as the spatial constraint condition for generating the parameter freezing topology template. Based on the spatial constraint condition, parameter sub-regions corresponding to the parameter region index range are divided in each adaptation parameter layer in the adaptation parameter layer set. The parameter sub-regions divided in each adaptation parameter layer are aligned between layers according to the spatial adjacency relationship of the region position code. The parameter sub-regions that are spatially adjacent in different adaptation parameter layers are connected in the inter-layer direction to form parameter freezing links. A freeze status flag is generated for each parameter sub-region in the parameter freeze link, and the set of all parameter sub-regions carrying freeze status flags is used as the parameter freeze topology template. The parameter freeze topology template is projected into the adaptation parameter layer of the financial risk control domain big model. In the adaptation parameter layer, the parameter positions covered by the parameter freeze topology template are marked as frozen parameter regions. In the gradient backpropagation path of the large model in the financial risk control field, the gradient update signal of the parameter in the frozen parameter region is intercepted, and the gradient update signal of the parameter in the frozen parameter region is forcibly set to zero. The boundary line between the frozen parameter region and the unfrozen low-rank adaptation parameter region is detected, and a parameter freezing isolation boundary layer is generated along the boundary line. The parameters in the parameter freezing isolation boundary layer maintain numerical transmission during forward propagation and block gradient inflow into the frozen parameter region during backward propagation.
4. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The incremental update process for the unfrozen low-rank adaptation parameter region outside the frozen parameter region in the adaptation parameter layer of the large-scale financial risk control model, generating an incremental adaptation parameter data packet, and writing the incremental adaptation parameter data packet into the low-rank adaptation parameter storage space of the large-scale financial risk control model includes: In the adaptation parameter layer of the large model in the financial risk control field, the parameter positions covered by the frozen parameter region are removed from the updatable parameter set to obtain the unfrozen low-rank adaptation parameter region. The unfrozen low-rank adaptation parameter region contains all adaptation parameter positions not covered by the frozen parameter region. Each frame of the financial transaction certificate image in the financial transaction certificate image stream is input into the financial risk control domain big model. The gradient response tensor of each adaptation parameter layer corresponding to each frame of the financial transaction certificate image is calculated through the forward propagation path of the financial risk control domain big model. In the gradient response tensor, the gradient response value belonging to the frozen parameter region is set to zero, and the gradient response value corresponding to the unfrozen low-rank adaptation parameter region is retained to generate the gradient response tensor after mask filtering. Based on the gradient response tensor after masking, gradient descent is performed on the adaptation parameters in the unfrozen low-rank adaptation parameter region to generate updated unfrozen low-rank adaptation parameter values. The parameter difference between the updated unfrozen low-rank adaptation parameter values and the unfrozen low-rank adaptation parameter values before the update is calculated. The parameter difference is serialized and encoded according to the layer index position and parameter position of the adaptation parameter layer to generate an incremental data packet of adaptation parameters. The incremental data packet of the adaptation parameters is written into the low-rank adaptation parameter storage space of the large model in the financial risk control field. The low-rank adaptation parameter storage space is divided into storage sectors according to the layer index position of the adaptation parameter layer. When writing the incremental data packet of the adaptation parameters, the parameter difference of each parameter position in the incremental data packet of the adaptation parameters is added to the existing parameter value of the corresponding storage sector in the low-rank adaptation parameter storage space element by element. After the addition operation is completed, the collection time sequence number and voucher source channel identifier corresponding to the incremental data packet of the adaptation parameters are written as metadata into the metadata index area of the low-rank adaptation parameter storage space.
5. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The method further includes: The acquisition time sequence number sequence corresponding to the financial transaction certificate image stream is time-bound with the adaptation parameter incremental data packet to generate an adaptation parameter incremental version chain with time version tags. The parameter update amplitude between the adaptation parameter incremental data packets corresponding to adjacent time version tags in the adaptation parameter incremental version chain is detected. Adjacent adaptation parameter incremental data packets with parameter update amplitude less than a preset update amplitude threshold are marked as mergeable incremental data packets. The mergeable incremental data packets are processed by parameter difference merging. The parameter differences of each adaptation parameter layer in the mergeable incremental data packets are weighted and averaged according to the parameter position to generate merged adaptation parameter incremental data packets. The merged adaptation parameter incremental data packets are removed and replaced with the merged adaptation parameter incremental data packets in the adaptation parameter incremental version chain. The time version tag sequence of the adaptation parameter incremental version chain is rearranged. In the low-rank adaptation parameter storage space of the large model in the financial risk control field, delete the storage sector occupied by the removed adaptation parameter incremental data packet and release the corresponding storage space resources. The current adaptation parameter incremental data packet generated by the large model in the financial risk control field when processing a new input financial transaction certificate image stream is obtained. The current adaptation parameter incremental data packet is compared with the adaptation parameter incremental data packet corresponding to the latest time-series version tag in the adaptation parameter incremental version chain. Based on the difference distribution characteristics obtained by the difference comparison process, the value of the preset update amplitude threshold is adjusted so that the preset update amplitude threshold matches the dispersion of the difference distribution characteristics.
6. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The method further includes: Obtain the set of historical adaptation parameter incremental data packets stored in the low-rank adaptation parameter storage space of the large model in the financial risk control field. The set of historical adaptation parameter incremental data packets contains multiple sets of historical adaptation parameter incremental data packets corresponding to different financial transaction certificate image streams. Extract the semantic type label distribution features corresponding to each historical adaptation parameter incremental data packet in the set of historical adaptation parameter incremental data packets. The semantic type label distribution features record the spatial distribution range of the parameter increment corresponding to each semantic type label in the adaptation parameter layer. An incremental parameter sharing topology graph is constructed based on the semantic type label distribution characteristics. The nodes of the incremental parameter sharing topology graph are each historical adaptation parameter incremental data packet. The edges of the incremental parameter sharing topology graph represent that the overlap of the parameter increment spatial distribution range of each pair of historical adaptation parameter incremental data packets under the same semantic type label exceeds a preset overlap threshold. In the incremental parameter sharing topology graph, a connected subgraph is extracted. The parameter difference corresponding to the historical adaptation parameter incremental data packet in the same connected subgraph is subjected to mean fusion processing at each parameter position to generate a shared adaptation parameter incremental template. The semantic type label distribution features corresponding to the shared adaptation parameter incremental template are matched with the semantic type labels of the image semantic region units in the financial transaction certificate image stream to obtain the label distribution overlap ratio. When the overlap ratio of the label distribution exceeds the preset template reuse threshold, the shared adaptation parameter incremental template is directly loaded into the low-rank adaptation parameter storage space of the financial risk control domain big model, replacing the adaptation parameter incremental data packet generated for the financial transaction certificate image stream. After loading the shared adaptation parameter increment template, adjust the boundary range of the frozen parameter region so that the boundary range of the frozen parameter region and the parameter increment spatial distribution range in the shared adaptation parameter increment template form a complementary coverage relationship; A new parameter freezing isolation boundary layer is generated for the frozen parameter region after the boundary range has been adjusted, and the newly generated parameter freezing isolation boundary layer extends along the boundary line of the adjusted frozen parameter region.
7. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 5, characterized in that, The method further includes: The incremental version chain of adaptation parameters with time-series version tags is segmented according to the order of the time-series version tags. The incremental data packets of adaptation parameters with time-series version tags within a preset time window are grouped into the same time zone adaptation parameter data segment. The parameter change trend of all incremental data packets of adaptation parameters in the same time zone adaptation parameter data segment is statistically processed for each parameter position. The direction and rate of parameter value change of each parameter position in the time zone adaptation parameter data segment are calculated. Based on the direction and rate of change of parameter values at each parameter position, parameter values are predicted for the incremental data packets of adaptation parameters corresponding to the next time series version tag in the time zone adaptation parameter data segment, generating predicted incremental data packets of adaptation parameters. The deviation between the predicted incremental data packets of adaptation parameters and the actual generated incremental data packets of adaptation parameters corresponding to the next time series version tag is calculated for each parameter position to obtain the prediction deviation distribution. Extract the parameter locations in the predicted deviation distribution where the deviation value exceeds the preset deviation tolerance upper limit, mark the parameter locations as parameter mutation locations, and record the layer index number and parameter coordinates of the parameter mutation locations in the adaptation parameter layer; The image semantic region unit corresponding to the parameter mutation location in the image stream of the financial transaction certificate is traced back, the semantic type label of the image semantic region unit is extracted, and a mutation association mapping table between the parameter mutation location and the semantic type label is established. When the semantic type label recorded in the mutation association mapping table appears in the subsequent financial transaction certificate image stream, the parameter sub-region corresponding to the semantic type label is temporarily removed from the frozen parameter region during the parameter freezing topology template construction stage, so that the parameter sub-region can participate in the incremental update process.
8. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 6, characterized in that, The method further includes: The shared adaptation parameter incremental template is used as the initial low-rank adaptation parameter configuration of the financial risk control domain big model. When the financial risk control domain big model receives a newly collected financial transaction certificate image stream, the shared adaptation parameter incremental template is directly loaded into the low-rank adaptation parameter storage space of the financial risk control domain big model. Based on the shared adaptation parameter incremental template, and considering the difference between the semantic type label distribution of each image semantic region unit in the newly acquired financial transaction certificate image stream and the semantic type label distribution characteristics of the shared adaptation parameter incremental template, the frozen parameter region is subjected to boundary fine-tuning processing to obtain the fine-tuned frozen parameter region. Extract newly added semantic type labels from the newly acquired financial transaction voucher image stream that do not match the semantic type label distribution features of the shared adaptation parameter incremental template, and obtain the regional location code of the image semantic region unit corresponding to the newly added semantic type label; Based on the newly added semantic type label and the regional location code, a new frozen parameter sub-region is defined in the adaptation parameter layer of the large model in the financial risk control field, and the new frozen parameter sub-region is merged into the fine-tuned frozen parameter region. For the frozen parameter region that has merged the new frozen parameter sub-region, the freezing operation is re-executed, and the updated unfrozen low-rank adaptation parameter region is determined. Incremental update processing is performed on the updated unfrozen low-rank adaptation parameter area to generate a supplementary adaptation parameter incremental data package for the newly added semantic type label. The supplementary adaptation parameter incremental data package is merged and stored with the shared adaptation parameter incremental template to generate a new shared adaptation parameter incremental template for the newly acquired financial transaction certificate image stream. The new shared adaptation parameter incremental template and its corresponding semantic type label distribution features are written back to the historical adaptation parameter incremental data packet set to update the node and edge connection relationships of the incremental parameter shared topology graph.
9. The low-rank adaptation parameter freezing method applied to a large domain model according to claim 1, characterized in that, The method further includes: After acquiring the financial transaction certificate image stream, image quality assessment processing is performed on each frame of the financial transaction certificate image stream to generate an image quality score for each frame of the financial transaction certificate image. Financial transaction certificate images with image quality scores below a preset quality threshold are marked as low-quality certificate images, and the low-quality certificate images are removed from the financial transaction certificate image stream to obtain a quality-filtered financial transaction certificate image stream. The image stream of financial transaction vouchers after quality screening is subjected to image geometric correction processing to correct the tilted layout in each frame of financial transaction voucher image to a horizontal orientation, and to unify the image size specifications of each frame of financial transaction voucher image to generate a standardized financial transaction voucher image stream. Image enhancement processing is performed on each frame of financial transaction voucher image in the standardized financial transaction voucher image stream to improve the contrast between the layout structure primitives and the background area in each frame of financial transaction voucher image, resulting in an enhanced financial transaction voucher image stream. The enhanced financial transaction certificate image stream is used as the financial transaction certificate image stream, and the step of performing image region semantic deconstruction processing on the financial transaction certificate image stream is executed. The image texture complexity parameters of each frame of the financial transaction certificate image in the enhanced financial transaction certificate image stream are extracted. The image texture complexity parameters are associated with the preset quality threshold to establish a correspondence between image texture complexity and the strictness of quality screening. Based on the correspondence, when a new financial transaction certificate image stream is subsequently acquired, the value of the preset quality threshold is dynamically adjusted according to the image texture complexity parameters of the new financial transaction certificate image stream. The dynamically adjusted preset quality threshold is applied to the quality screening process of the new financial transaction certificate image stream to generate a quality screening result that is adapted to the image texture complexity of the new financial transaction certificate image stream.
10. A low-rank adaptation parameter freezing system applied to large domain models, characterized in that, The method includes a processor and a computer-readable storage medium storing machine-executable instructions that, when executed by the processor, implement the low-rank adaptation parameter freezing method for a large domain model as described in any one of claims 1-9.
