Supply chain fraud behavior early warning method and device based on large language model

Through multimodal fusion and efficient parameter fine-tuning technology based on large language models, the problems of vertical domain knowledge fragmentation and excessive resource consumption in supply chain fraud detection are solved, and efficient and accurate supply chain fraud behavior warning is achieved.

CN120633666APending Publication Date: 2025-09-12XIAMEN MEIYA YIAN INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510727155.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies in supply chain fraud detection have problems such as vertical domain knowledge fragmentation, isolated modal processing, low update efficiency and excessive resource consumption, making it difficult to effectively identify complex patterns and respond to dynamically changing supply chain environments.

Method used

By adopting multimodal fusion and efficient parameter fine-tuning technology based on a large language model, we acquire multi-source supply chain data for processing and build a supply chain fraud warning model. We also use the LoRA module and multimodal prefix guidance vector for feature guidance and dynamically adjust the rank value matrix to achieve rapid model adaptation and low resource consumption.

Benefits of technology

It significantly improves the accuracy and dynamic response capability of supply chain fraud detection, reduces resource requirements and false alarm rates, adapts to changes in corporate business models, and achieves efficient risk warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633666A_ABST
    Figure CN120633666A_ABST
Patent Text Reader

Abstract

The invention discloses a supply chain fraud behavior early warning method and device based on a large language model, and relates to the field of data analysis, and the method comprises the steps: obtaining supply chain multi-source data, and carrying out the processing of the supply chain multi-source data according to the data type; in the fine tuning process, a LoRA module is injected into a linear layer of a pre-trained large language model base, and the rank value of the LoRA module is dynamically adjusted according to the gradient; according to the text word segmentation data, the entity type, the aligned historical order data, the aligned historical logistics data and the dynamic space-time diagram, constructing a multi-modal prefix guide vector; the multi-modal prefix guide vector and an original input sequence of a linear layer of a pre-trained large language model base are spliced and then input into the linear layer of the pre-trained large language model base, a supply chain fraud behavior early warning model subjected to fine adjustment is obtained through fine adjustment, and early warning is conducted on supply chain fraud behaviors of related suppliers. According to the method, the problems of low supply chain fraud behavior identification accuracy, large training parameters and the like in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis, and in particular to a method and device for early warning of supply chain fraud based on a large language model. Background Art

[0002] Internal supply chain fraud in enterprises is extremely harmful. It erodes corporate profits, distorts financial data, causes capital outflow, and affects long-term operations and development.

[0003] In the field of supply chain fraud detection, traditional technologies primarily rely on rule engines and basic statistical analysis. These techniques identify potential fraudulent activity by setting fixed thresholds and rules, such as the fluctuation range of order amounts and the repetition rate of logistics routes. Traditional methods also employ simple statistical models, such as mean and variance analysis, to detect outliers in the data. While these methods can detect obvious fraudulent activity to a certain extent, they are limited in their ability to identify complex patterns, rely on manual rule design based on experience, and struggle to adapt to the dynamic and changing supply chain environment.

[0004] However, using machine learning and artificial intelligence to identify supply chain fraud presents the following problems:

[0005] 1. Traditional machine learning models, such as Isolation Forest and XGBoost, perform analysis based on rule engines and statistical features (such as order amount standard deviation and logistics path overlap). However, their F1-score is generally below 65% in scenarios such as text audit report understanding and dynamic relationship network modeling.

[0006] Single-modal text deep learning models, such as BERT-like models, are used to parse audit documents. However, their accuracy in recognizing supply chain terminology (such as FOB / CIF terms) is only 72-78%.

[0007] 3. Mainstream frameworks such as PyTorch-Geometric and Hugging Face provide basic tool chains, but lack vertical optimization modules (such as supply chain timing alignment and real-time updates of dynamic graphs). In addition, fine-tuning all parameters of large models requires more than 128GB of video memory, making it difficult to implement in enterprise-level scenarios.

[0008] The main shortcomings of traditional supply chain fraud early warning technology are:

[0009] 1. Fragmentation of vertical domain knowledge: General pre-trained models (such as BERT) lack the ability to understand supply chain semantics, and their F1-score for detecting contract clause inconsistencies is less than 75%.

[0010] 2. Modal isolation processing: text, graph data, and time series data are encoded independently, and the cross-modal retrieval accuracy is <60%;

[0011] 3. Low update efficiency: Traditional full parameter fine-tuning takes 4-6 hours per session and cannot cope with high-frequency data changes (such as supplier relationship updates with Δt < 1 hour);

[0012] 4. Excessive resource consumption: Full fine-tuning of a 14B parameter model requires 512GB of video memory, making the hardware cost unaffordable for small and medium-sized enterprises. Summary of the Invention

[0013] The purpose of this application is to propose a supply chain fraud warning method and device based on a large language model to address the above-mentioned technical problems.

[0014] In a first aspect, the present invention provides a supply chain fraud warning method based on a large language model, comprising the following steps:

[0015] Acquire multi-source supply chain data and process it based on data type to obtain text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph. The multi-source supply chain data includes unstructured text data, historical order data, historical logistics data, and a supplier relationship network graph.

[0016] A supply chain fraud warning model based on a large language model is constructed and fine-tuned to obtain a fine-tuned supply chain fraud warning model. The supply chain fraud warning model includes a pre-trained large language model base. The LoRA module is injected into the linear layer of the pre-trained large language model base. During the fine-tuning process of the supply chain fraud warning model, the rank value of the LoRA module is dynamically adjusted according to the gradient; a multimodal prefix guidance vector is constructed based on text segmentation data, entity type, aligned historical order data, aligned historical logistics data and dynamic spatiotemporal graph. The multimodal prefix guidance vector is concatenated with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance. During the fine-tuning process, the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized;

[0017] Obtain order data and / or logistics data from the transaction to be analyzed and input them into a fine-tuned supply chain fraud warning model to obtain the risk probability corresponding to the transaction to be analyzed. Based on the risk probability corresponding to the transaction to be analyzed, determine the supply chain fraud warning level of the relevant suppliers of the transaction to be analyzed.

[0018] As a preferred method, the processing process of multi-source data in the supply chain is as follows:

[0019] Perform text recognition and domain segmentation on the scanned copies of audit reports and supply-related emails in unstructured text data to obtain text segmentation data; perform entity recognition on the text segmentation data to obtain the corresponding entity type;

[0020] Use dynamic time warping algorithm to align historical order data and historical logistics data to obtain aligned historical order data and aligned historical logistics data;

[0021] A dynamic spatiotemporal graph is constructed based on text segmentation data, aligned historical order data, aligned historical logistics data, and supplier relationship network diagram.

[0022] Preferably, the objective function used in the dynamic time warping algorithm is:

[0023]

[0024] Among them, X order [i] represents the order features at the i-th time point extracted from historical order data, X logistics [j] represents the trajectory features of the jth time point extracted from historical logistics data, W i,j Represents the alignment matrix. The elements in the alignment matrix are 0 or 1, where 0 indicates that the i-th time point is not aligned with the j-th time point, and 1 indicates that the i-th time point is aligned with the j-th time point. T represents the total time length in the historical order data, and R represents the allowed time misalignment tolerance.

[0025] As a preferred method, the dynamic space-time graph is expanded based on the supplier relationship network graph and combined with the transaction records between suppliers and purchasing entities mentioned in the text segmentation data, aligned historical order data, or aligned historical logistics data. The nodes in the dynamic space-time graph are suppliers or purchasing entities, and the edges in the dynamic space-time graph are the relationships between suppliers or between suppliers and purchasing entities. The weights of the edges in the dynamic space-time graph are:

[0026]

[0027] Among them, α ij It represents the total transaction amount between suppliers or suppliers and purchasing entities in the current time window, β ij It represents the number of transactions between suppliers or between suppliers and purchasing entities within the current time window, Δt represents the length of the current time window, and γ represents the time decay coefficient.

[0028] Preferably, the rank value of the LoRA module is dynamically adjusted according to the gradient, specifically including:

[0029] r′←clip(r+η·(grad_norm-τ),rmin ,r max );

[0030] Among them, r represents the rank value of the LoRA module before adjustment, r′ represents the rank value of the LoRA module after adjustment, r min Indicates the minimum rank value of the LoRA module, r max Indicates the maximum rank value of the LoRA module, grad_norm indicates the gradient norm in the current iteration process, η indicates the adjustment step size, and clip(·) indicates that the elements in the array are limited to the specified minimum and maximum values.

[0031] Preferably, a multimodal prefix guidance vector is constructed based on text segmentation data, entity type, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph, specifically including:

[0032] Encode the text segmentation data to obtain the corresponding Token vector, map the entity type to the category embedding vector, and construct the text guidance vector based on the Token vector and the category embedding vector;

[0033] Extract the order features corresponding to the aligned historical order data and the trajectory features corresponding to the aligned historical logistics data respectively, and then concatenate the order features and trajectory features at the corresponding time points to obtain a numerical guidance vector;

[0034] The dynamic spatiotemporal graph is embedded to generate a node embedding vector for each node. The node embedding vectors of all nodes are clustered to obtain the central vector, which is used as the graph structure guidance vector. The text guidance vector, numerical guidance vector and graph structure guidance vector are concatenated to obtain the initial value of the trainable multimodal prefix guidance vector.

[0035] In a second aspect, the present invention provides a supply chain fraud warning device based on a large language model, comprising:

[0036] a data processing module configured to acquire multi-source supply chain data and process the multi-source supply chain data according to data type to obtain text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph. The multi-source supply chain data includes unstructured text data, historical order data, historical logistics data, and a supplier relationship network graph;

[0037] A model construction module is configured to construct and fine-tune a supply chain fraud warning model based on a large language model to obtain a fine-tuned supply chain fraud warning model. The supply chain fraud warning model includes a pre-trained large language model base, and the LoRA module is injected into the linear layer of the pre-trained large language model base. During the fine-tuning process of the supply chain fraud warning model, a multimodal prefix guidance vector is constructed based on text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph. The multimodal prefix guidance vector is concatenated with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance. During the fine-tuning process, the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized;

[0038] The early warning module is configured to obtain order data and / or logistics data from the transaction to be analyzed and input them into a fine-tuned supply chain fraud early warning model to obtain the risk probability corresponding to the transaction to be analyzed, and determine the supply chain fraud early warning level of the relevant suppliers of the transaction to be analyzed based on the risk probability corresponding to the transaction to be analyzed.

[0039] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0041] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which implements the method described in any implementation manner in the first aspect when the computer program is executed by a processor.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] (1) The supply chain fraud warning method based on a large language model proposed in this invention provides a comprehensive solution for enterprise supply chain fraud detection and risk warning through innovative multimodal fusion and efficient parameter fine-tuning technology, significantly improving detection accuracy and dynamic response capabilities.

[0044] (2) The supply chain fraud warning method based on a large language model proposed in the present invention adopts a combination of dynamic rank value matrix adaptation technology and multimodal prefix feature guidance technology, which reduces the number of training parameters by 85%, takes less than 30 seconds for model hot update, and improves efficiency by 180 times. At the same time, compared with the general LoRa and Prefix-Tuning methods, it can better adapt to the performance degradation caused by the low rank value in subsequent updates, reduce the risk false alarm rate and memory resource requirements, and improve the comprehensiveness and reliability of detection.

[0045] (3) The supply chain fraud warning method based on a large language model proposed in this invention supports continuous learning and iteration. The local update parameter amount only accounts for 0.02% of the total model amount, and the update bandwidth requirement is reduced by 85%, which can adapt to the changes in the enterprise business model and supply chain environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 This is a flow chart of a supply chain fraud warning method based on a large language model according to an embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of a supply chain fraud warning device based on a large language model according to an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0051] Figure 1 The embodiment of the present application provides a supply chain fraud warning method based on a large language model, which includes the following steps:

[0052] S1, obtains multi-source data of the supply chain and processes it according to the data type to obtain text segmentation data, entity type, aligned historical order data, aligned historical logistics data and dynamic space-time graph. The multi-source data of the supply chain includes unstructured text data, historical order data, historical logistics data and supplier relationship network graph.

[0053] In a specific embodiment, the process of processing multi-source data of the supply chain is as follows:

[0054] Perform text recognition and domain segmentation on the scanned copies of audit reports and supply-related emails in unstructured text data to obtain text segmentation data; perform entity recognition on the text segmentation data to obtain the corresponding entity type;

[0055] Use dynamic time warping algorithm to align historical order data and historical logistics data to obtain aligned historical order data and aligned historical logistics data;

[0056] A dynamic spatiotemporal graph is constructed based on the aligned historical order data, aligned historical logistics data and supplier relationship network graph.

[0057] In a specific embodiment, the objective function used in the dynamic time warping algorithm is:

[0058]

[0059] Among them, X order [i] represents the order features at the i-th time point extracted from historical order data, X logistics [j] represents the trajectory features of the jth time point extracted from historical logistics data, W i,j Represents the alignment matrix. The elements in the alignment matrix are 0 or 1, where 0 indicates that the i-th time point is not aligned with the j-th time point, and 1 indicates that the i-th time point is aligned with the j-th time point. T represents the total time length in the historical order data, and R represents the allowed time misalignment tolerance.

[0060] In a specific embodiment, the dynamic spatiotemporal graph is expanded based on the supplier relationship network graph and combined with the transaction records between suppliers and purchasing entities mentioned in the text segmentation data, aligned historical order data, or aligned historical logistics data. The nodes in the dynamic spatiotemporal graph are suppliers or purchasing entities, and the edges in the dynamic spatiotemporal graph are the relationships between suppliers or between suppliers and purchasing entities. The weights of the edges in the dynamic spatiotemporal graph are:

[0061]

[0062] Among them, α ijIt represents the total transaction amount between suppliers or suppliers and purchasing entities in the current time window, β ij It represents the number of transactions between suppliers or between suppliers and purchasing entities within the current time window, Δt represents the length of the current time window, and γ represents the time decay coefficient.

[0063] Specifically, in the embodiments of the present application, the original multi-source heterogeneous supply chain multi-source data is first converted into high-quality structured features that can be directly used for model training and analysis. Through OCR and domain word segmentation, time series alignment and spatiotemporal graph construction, a solid data foundation is built for subsequent fraud detection. The supply chain multi-source data mainly includes scanned copies of audit reports (in image or PDF format), supply-related emails (in JSON format), historical order data (in CSV format, timestamp accuracy: seconds), historical logistics data (in GeoJSON format, sampling rate: 5 minutes) and supplier relationship network diagrams (in GraphML format, whose node attributes include: registered capital, years of cooperation, etc.).

[0064] Scanned copies of audit reports and supply-related emails, as unstructured text data, require further processing to extract the corresponding text data. Specifically, a text processing module using a CNN-based Transformer architecture extracts textual information from the scanned images and performs domain segmentation and entity recognition using a vocabulary of 300,000 industry terms. This text processing module converts the raw images into parseable text and annotates key entities such as "FOB clause" and "Contract number" along with their entity types. The entity recognition achieves an F1-score accuracy of 92.3%.

[0065] The dynamic time warping (DTW) algorithm is used to align the time points of two time series: historical order data and historical logistics data. This ensures that a historical order data point matches its corresponding historical logistics data point, even if the two have different sampling frequencies and time delay misalignments. First, the order features and trajectory features of the historical order data and historical logistics data at each time point are extracted; order features include amount, quantity, and category, while trajectory features include longitude, latitude, and time. An objective function is constructed based on the order and trajectory features at each time point, and this objective function is minimized to obtain the corresponding alignment matrix. Based on the alignment matrix, the two time series are aligned, resulting in the aligned historical order data and aligned historical logistics data.

[0066] Calculate the transaction intensity and stability between suppliers and purchasing entities, structure the time, amount and number of transactions into a graph representation, that is, a dynamic space-time graph, for subsequent graph embedding modeling, and generate the adjacency matrix of the dynamic space-time graph.

[0067] S2. Construct and fine-tune a supply chain fraud warning model based on a large language model to obtain a fine-tuned supply chain fraud warning model. The supply chain fraud warning model includes a pre-trained large language model base. The LoRA module is injected into the linear layer of the pre-trained large language model base. During the fine-tuning process of the supply chain fraud warning model, the rank value of the LoRA module is dynamically adjusted according to the gradient; a multimodal prefix guidance vector is constructed based on text segmentation data, entity type, aligned historical order data, aligned historical logistics data and dynamic spatiotemporal graph. The multimodal prefix guidance vector is concatenated with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance. During the fine-tuning process, the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized.

[0068] In a specific embodiment, the rank value of the LoRA module is dynamically adjusted according to the gradient, specifically including:

[0069] r′←clip(r+η·(grad_norm-τ),r min ,r max );

[0070] Among them, r represents the rank value of the LoRA module before adjustment, r′ represents the rank value of the LoRA module after adjustment, r min Indicates the minimum rank value of the LoRA module, r max Indicates the maximum rank value of the LoRA module, grad_norm indicates the gradient norm in the current iteration process, η indicates the adjustment step size, and clip(·) indicates that the elements in the array are limited to the specified minimum and maximum values.

[0071] Specifically, the fine-tuning process of the supply chain fraud warning model is optimized using the text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and dynamic spatiotemporal graphs obtained through the above processing. The embodiments of the present application propose dynamic rank matrix adaptation technology and multimodal prefix feature guidance technology, which only incrementally updates a very small number of parameters in the pre-trained large language model base, allowing the model to quickly adapt to supply chain fraud scenarios, reduce video memory and computing overhead, and further improve adaptability and robustness.

[0072] In the dynamic rank matrix adaptation technology, the LoRA module is injected into the key linear layer of the Transformer in the pre-trained large language model base (such as the linear layer used for query / key / value mapping or the linear layer in the feedforward neural network). The LoRA module includes a pair of trainable low-rank matrices B and A. Only by fine-tuning these two parts can efficient adaptation of the pre-trained large language model base be achieved. This greatly reduces the number of parameters that need to be updated, and can also capture the semantic changes of specific subspaces in the fraud warning scenario through the low-rank property of the matrix. The LoRA module is represented as follows:

[0073] W=W0+B·A;

[0074] in, Represents the original weight matrix of the linear layer in the pre-trained large language model base (such as the linear layer used for query / key / value mapping), and represents the first and second low-rank matrices that can be trained, Represents a real number entity, d represents the dimension of the original weight matrix, and r represents the rank value. At the same time, in order to automatically optimize the representation capacity according to the model convergence during fine-tuning, the embodiment of the present application adds a rank value controller to monitor the gradient information. When signs of gradient saturation or overfitting are detected, the rank value r is dynamically increased or decreased. The initial rank value r0 = 8. When fine-tuning is performed in this way, the number of parameters only accounts for about 0.78% of the original matrix, and after fine-tuning is completed, the updated low-rank matrix pair B and A and the rank value log after each dynamic adjustment are obtained.

[0075] In a specific embodiment, a multimodal prefix guidance vector is constructed based on text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph, specifically including:

[0076] Encode the text segmentation data to obtain the corresponding Token vector, map the entity type to the category embedding vector, and construct the text guidance vector based on the Token vector and the category embedding vector;

[0077] Extract the order features corresponding to the aligned historical order data and the trajectory features corresponding to the aligned historical logistics data respectively, and then concatenate the order features and trajectory features at the corresponding time points to obtain a numerical guidance vector;

[0078] The dynamic spatiotemporal graph is embedded to generate a node embedding vector for each node. The node embedding vectors of all nodes are clustered to obtain the central vector, which is used as the graph structure guidance vector. The text guidance vector, numerical guidance vector and graph structure guidance vector are concatenated to obtain the initial value of the trainable multimodal prefix guidance vector.

[0079] Specifically, in the multimodal prefix feature guidance technology, the text segmentation data, entity type, aligned historical order data, aligned historical logistics data and dynamic spatiotemporal graph generated in step S1 are converted into vectors to construct the text guidance vector P text , numerical guide vector P num and graph structure guide vector P graph .

[0080] P text : Encode the text segmentation data into a token vector acceptable to the model, and map the identified entity types (such as amounts, place names, contract terms, etc.) into category embedding vectors, which together with the token vectors constitute the text input of the model.

[0081] P num : Extract the order features corresponding to the aligned historical order data and the trajectory features corresponding to the aligned historical logistics data, and then splice the order features and trajectory features at the matching time points into a numerical guidance vector.

[0082] P graph :Use Node2Vec to embed nodes in the dynamic spatiotemporal graph, and cluster the node embedding vectors of all nodes (such as the KMeans algorithm) to obtain a central vector that is representative in structural semantics. This central vector is the graph structure guiding vector.

[0083] m trainable multimodal prefix guide vectors are concatenated before the input sequence of the linear layer to introduce feature guidance, as shown in the following formula:

[0084]

[0085] Where X represents the original input sequence, P represents the multimodal prefix guide vector, represents the input sequence for feature guidance, and [·;·] represents concatenation. The length of the multimodal prefix guidance vector is the sum of the lengths of the text guidance vector, the numerical guidance vector, and the graph structure guidance vector. In one embodiment, the length of the text guidance vector and the numerical guidance vector is 8, the length of the graph structure guidance vector is 4, and the length of the multimodal prefix guidance vector is 20. The vector obtained by concatenating the text guidance vector, the numerical guidance vector, and the graph structure guidance vector serves as the initial value of the multimodal prefix guidance vector. It is iteratively updated during fine-tuning. After fine-tuning is completed, the updated multimodal prefix guidance vector is obtained.

[0086] During fine-tuning of the supply chain fraud early warning model, we first freeze the original weight parameters of the base model and only update the following parts: the low-rank matrix pair B and A (learning rate 3e-4) and the multimodal prefix guidance vector P (learning rate 1e-3). The number of parameters updated and the time consumed are shown in Table 1:

[0087] Table 1

[0088] Update Type Parameter quantity Single card time Modal prefix pilot vector P 20480 30 seconds Low-rank matrix pair B and A 8192 18 seconds

[0089] S3. Obtain order data and / or logistics data from the transaction to be analyzed and input them into a fine-tuned supply chain fraud warning model to obtain the risk probability corresponding to the transaction to be analyzed. Based on the risk probability corresponding to the transaction to be analyzed, determine the supply chain fraud warning level of the relevant suppliers of the transaction to be analyzed.

[0090] Specifically, the pre-trained large language model base used in the supply chain fraud warning model in the embodiments of the present application may be a large language model with a Transformer structure, such as the DeepSeekR1-14B base model. The DeepSeekR1-14B base model is used as an example below to illustrate that the fine-tuned supply chain fraud warning model is compressed to 4-bit through Activation-aware Weight Quantization (AWQ) and compiled into a high-throughput, low-latency inference engine with the help of TensorRT to meet enterprise-level real-time risk control requirements.

[0091] In the AWQ quantification process, the weight parameters in the fine-tuned supply chain fraud warning model are grouped and quantified. That is, each weight group w′ is quantified in blocks of group size g = 64:

[0092]

[0093] in, Represents the quantized weight group, round represents rounding, Δ represents the difference value, min means taking the minimum value, and max means taking the maximum value.

[0094] The quantitative results are shown in Table 2:

[0095] Table 2

[0096] Accuracy Model volume Inference latency (T4 GPU) AUC decreases FP32 26GB 230ms - INT4 6.5GB 89ms 0.4%

[0097] 0.1% of the weight is retained as FP16 to prevent key information loss. After quantization, the quantized model is compiled using the TensorRT engine, achieving a throughput of 70 tokens / second, which is 3 times higher than the unoptimized version.

[0098] During the operational phase, supply chain data changes are monitored in real time. When the rate of change in the supplier relationship network graph exceeds a threshold, the parameters of the linear layer are fine-tuned in a lightweight incremental manner to ensure that the model continues to adapt to the dynamic environment. Updates are completed in just tens of seconds, forming a closed-loop risk control. The rate of change ΔG of the supplier relationship network graph is defined as follows:

[0099]

[0100] Among them, A new Represents the adjacency matrix of the changed supplier relationship network graph, A old Represents the adjacency matrix of the supplier relationship network graph before the change, ‖·‖ F represents the Frobenius norm.

[0101] When it is detected that the change rate ΔG of the supplier relationship network graph satisfies ΔG>ρ, where ρ is the threshold, automatic incremental fine-tuning of the model is triggered to ensure that the model continues to adapt to the dynamic environment.

[0102] After fine-tuning, the fine-tuned supply chain fraud warning model learns the semantic relationship between multi-modal supply chain multi-source data. After the fine-tuned supply chain fraud warning model is deployed, when the business system generates the approval process of the supplier's order data and / or logistics data, the fine-tuned supply chain fraud warning model is called in real time through the TensorRT engine to analyze the data and evaluate the risk probability and judgment basis of the data. During the inference process, the original input sequence of the linear layer of the fine-tuned supply chain fraud warning model is spliced ​​with the updated multimodal prefix guidance vector and input into the linear layer of the fine-tuned supply chain fraud warning model. The low-rank matrix and pre-trained weights are merged to perform forward reasoning, and no delay is generated during the inference process.

[0103] If the risk probability output by the fine-tuned supply chain fraud warning model is greater than the first threshold, which may be 0.83, a red warning is triggered;

[0104] If the risk probability output by the fine-tuned supply chain fraud warning model is greater than the second threshold and less than the first threshold, which may be 0.6, an orange warning is triggered;

[0105] If the same supplier triggers an orange alert three or more times within a month, it will automatically be upgraded to a red alert. This allows for early warning of supply chain fraud, preventing further losses.

[0106] Further references Figure 2 As an implementation of the methods shown in the above figures, this application provides an embodiment of a supply chain fraud warning device based on a large language model. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0107] The present application provides a supply chain fraud warning device based on a large language model, including:

[0108] Data processing module 1 is configured to acquire multi-source supply chain data and process the data according to data type to obtain text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph. The multi-source supply chain data includes unstructured text data, historical order data, historical logistics data, and a supplier relationship network graph.

[0109] Model construction module 2 is configured to construct and fine-tune a supply chain fraud warning model based on a large language model to obtain a fine-tuned supply chain fraud warning model. The supply chain fraud warning model includes a pre-trained large language model base, and the LoRA module is injected into the linear layer of the pre-trained large language model base. During the fine-tuning process of the supply chain fraud warning model, a multimodal prefix guidance vector is constructed based on text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph. The multimodal prefix guidance vector is concatenated with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance. During the fine-tuning process, the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized;

[0110] Early warning module 3 is configured to obtain order data and / or logistics data in the transaction to be analyzed and input them into a fine-tuned supply chain fraud early warning model to obtain the risk probability corresponding to the transaction to be analyzed, and determine the supply chain fraud early warning level of the relevant suppliers of the transaction to be analyzed based on the risk probability corresponding to the transaction to be analyzed.

[0111] Figure 3 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Figure 3 As shown, the electronic device of this embodiment includes: a processor 301 and a memory 302; wherein the memory 302 is used to store computer-executable instructions; and the processor 301 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description of the above method embodiment.

[0112] Optionally, the memory 302 may be independent or integrated with the processor 301 .

[0113] When the memory 302 is independently provided, the electronic device further includes a bus 303 for connecting the memory 302 and the processor 301 .

[0114] An embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When the processor 301 executes the computer execution instructions, the above method is implemented.

[0115] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by the processor 301, the above method is implemented.

[0116] In the embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, which may be electrical, mechanical or other forms.

[0117] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.

[0118] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each module may exist physically separately, or two or more modules may be integrated into a single unit. The units formed by the above modules may be implemented in the form of hardware or hardware plus software functional units.

[0119] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or processor 301 to perform some steps of the methods of various embodiments of the present application.

[0120] It should be understood that the processor 301 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor, or the processor 301 can be any conventional processor 301. The steps of the method disclosed in the present invention can be directly implemented by the hardware processor 301, or can be implemented by a combination of hardware and software modules in the processor 301.

[0121] The memory 302 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.

[0122] Bus 303 can be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Bus 303 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the bus 303 in the drawings of this application is not limited to a single bus 303 or a single type of bus 303.

[0123] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0124] An exemplary storage medium is coupled to the processor 301, so that the processor 301 can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor 301. The processor 301 and the storage medium can be located in an application-specific integrated circuit (ASIC). Of course, the processor 301 and the storage medium can also exist as discrete components in an electronic device or a host control device.

[0125] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A supply chain fraud warning method based on a large language model, characterized by: The following steps are involved: Acquire multi-source supply chain data and process the multi-source supply chain data according to data type to obtain text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph, wherein the multi-source supply chain data includes unstructured text data, historical order data, historical logistics data, and a supplier relationship network graph; A supply chain fraud warning model based on a large language model is constructed and fine-tuned to obtain a fine-tuned supply chain fraud warning model, wherein the supply chain fraud warning model includes a pre-trained large language model base, and a LoRA module is injected into the linear layer of the pre-trained large language model base. During the fine-tuning process of the supply chain fraud warning model, the rank value of the LoRA module is dynamically adjusted according to the gradient; a multimodal prefix guidance vector is constructed based on the text segmentation data, entity type, aligned historical order data, aligned historical logistics data and dynamic spatiotemporal graph, and the multimodal prefix guidance vector is spliced ​​with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance, and the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized during the fine-tuning process; Obtain order data and / or logistics data from the transaction to be analyzed and input them into a fine-tuned supply chain fraud warning model to obtain the risk probability corresponding to the transaction to be analyzed. Determine the supply chain fraud warning level of the relevant supplier of the transaction to be analyzed based on the risk probability corresponding to the transaction to be analyzed.

2. The supply chain fraud warning method based on a large language model according to claim 1 is characterized in that: The processing process of the multi-source data of the supply chain is as follows: Performing text recognition and domain segmentation on the scanned copies of the audit report and supply-related emails in the unstructured text data to obtain text segmentation data; performing entity recognition on the text segmentation data to obtain corresponding entity types; Aligning the historical order data and the historical logistics data using a dynamic time warping algorithm to obtain aligned historical order data and aligned historical logistics data; A dynamic spatiotemporal graph is constructed based on the text segmentation data, the aligned historical order data, the aligned historical logistics data and the supplier relationship network graph.

3. The supply chain fraud warning method based on a large language model according to claim 2 is characterized in that: The objective function used in the dynamic time warping algorithm is: Among them, X order [i] represents the order features at the i-th time point extracted from the historical order data, X logistics [j] represents the trajectory feature of the jth time point extracted from the historical logistics data, W i,j Represents an alignment matrix, where the elements in the alignment matrix are 0 or 1, where 0 indicates that the i-th time point is not aligned with the j-th time point, and 1 indicates that the i-th time point is aligned with the j-th time point. T represents the total time length in the historical order data, and R represents the allowed time misalignment tolerance.

4. The supply chain fraud warning method based on a large language model according to claim 2 is characterized in that: The dynamic spatiotemporal graph is expanded based on the supplier relationship network graph and combined with the transaction records between suppliers and purchasing entities mentioned in the text segmentation data, aligned historical order data, or aligned historical logistics data. The nodes in the dynamic spatiotemporal graph are suppliers or purchasing entities, and the edges in the dynamic spatiotemporal graph are the relationships between suppliers or between suppliers and purchasing entities. The weights of the edges in the dynamic spatiotemporal graph are: Among them, α ij It represents the total transaction amount between suppliers or suppliers and purchasing entities in the current time window, β ij It represents the number of transactions between suppliers or between suppliers and purchasing entities within the current time window, Δt represents the length of the current time window, and γ represents the time decay coefficient.

5. The supply chain fraud warning method based on a large language model according to claim 1 is characterized in that: Dynamically adjust the rank value of the LoRA module according to the gradient, specifically including: r′←clip(r+η·(grad_norm-τ),r min ,r max ); Among them, r represents the rank value of the LoRA module before adjustment, r' represents the rank value of the LoRA module after adjustment, r min Indicates the minimum rank value of the LoRA module, r max represents the maximum rank value of the LoRA module, grad_norm represents the gradient norm in the current iteration process, η represents the adjustment step size, and clip(·) represents limiting the elements in the array to between the specified minimum and maximum values.

6. The supply chain fraud warning method based on a large language model according to claim 1 is characterized in that: A multimodal prefix guidance vector is constructed based on the text segmentation data, entity type, aligned historical order data, aligned historical logistics data, and dynamic spatiotemporal graph, specifically including: Encode the text segmentation data to obtain a corresponding Token vector, map the entity type to a category embedding vector, and construct a text guidance vector based on the Token vector and the category embedding vector; Extract the order features corresponding to the aligned historical order data and the trajectory features corresponding to the aligned historical logistics data respectively, and then concatenate the order features and trajectory features at the corresponding time points to obtain a numerical guidance vector; The dynamic spatiotemporal graph is subjected to graph embedding processing to generate a node embedding vector for each node, and the node embedding vectors of all nodes are clustered to obtain a central vector which is used as a graph structure guide vector. The text guide vector, the numerical guide vector, and the graph structure guide vector are concatenated to obtain the initial value of a trainable multimodal prefix guide vector.

7. A supply chain fraud warning device based on a large language model, characterized by: include: a data processing module configured to acquire multi-source supply chain data and process the multi-source supply chain data according to data types to obtain text segmentation data, entity types, aligned historical order data, aligned historical logistics data, and a dynamic spatiotemporal graph, wherein the multi-source supply chain data includes unstructured text data, historical order data, historical logistics data, and a supplier relationship network graph; A model construction module is configured to construct and fine-tune a supply chain fraud warning model based on a large language model to obtain a fine-tuned supply chain fraud warning model, wherein the supply chain fraud warning model includes a pre-trained large language model base, and the linear layer of the pre-trained large language model base is injected with a LoRA module. During the fine-tuning process of the supply chain fraud warning model, a multimodal prefix guidance vector is constructed based on the text segmentation data, entity type, aligned historical order data, aligned historical logistics data, and dynamic spatiotemporal graph. The multimodal prefix guidance vector is concatenated with the original input sequence of the linear layer of the pre-trained large language model base and then input into the linear layer of the pre-trained large language model base. The multimodal prefix guidance vector is used for feature guidance, and the low-rank matrix and multimodal prefix guidance vector of the LoRA module are parameterized during the fine-tuning process. The early warning module is configured to obtain order data and / or logistics data from the transaction to be analyzed and input them into a fine-tuned supply chain fraud early warning model to obtain the risk probability corresponding to the transaction to be analyzed, and determine the supply chain fraud early warning level of the relevant supplier of the transaction to be analyzed based on the risk probability corresponding to the transaction to be analyzed.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Power distribution network operation risk prompting method and system

    CN121073226A

  • Text large language model fine tuning method and device, equipment and storage medium

    CN121189426A