Pineapple cake food supply chain risk assessment method based on deep learning

By generating risk payload fingerprints and performing segmented mapping based on deep learning methods, the problems of insufficient risk transmission and topology identification in existing technologies are solved, enabling continuous evaluation of pineapple cake supply chain risks and accurate positioning of responsible links.

CN123140683APending Publication Date: 2026-11-20INST OF AGRI ENG TECH FUJIAN ACAD OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611646109.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-23
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing food supply chain risk assessment methods fail to effectively consider the transmission process of risk loads from preceding processes to subsequent processes, fail to identify convergence and branching topologies in the supply chain batch network, and cannot accurately determine risk levels and responsible links.

Method used

Using a deep learning-based approach, risk payload fingerprints are generated by batch identifiers and segmented along the batch transfer chain of the supply chain to identify convergence nodes and fork nodes, generate risk aggregation paths, and determine risk levels and responsible links.

Benefits of technology

It enables continuous quantitative evaluation of the transmission of risks in the pineapple cake supply chain, clearly identifies the sources of risk contribution, accurately determines the risk level and responsible links, and improves the traceability and accuracy of risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140683A_ABST
    Figure CN123140683A_ABST
Patent Text Reader

Abstract

The application discloses a pineapple cake food supply chain risk assessment method based on deep learning, and relates to the technical field of food supply chain risk assessment. The method acquires pineapple cake supply chain multi-source batch records, takes batch identification as a node, determines a directed edge through process flow time stamp and logistics transfer time stamp, and establishes a supply chain batch delivery chain. A risk load fingerprint is generated for each batch identification, the risk load fingerprint of an upstream node is segmented and mapped to a downstream node according to the directed edge, and a stage risk transmission amount is generated. The stage risk transmission amount is coupled with the process condition field of the corresponding node to form a risk coupling state. The converging nodes and branching nodes in the supply chain batch delivery chain are found out, a risk aggregation path is generated, the risk level of the pineapple cake supply chain and the risk responsibility link are determined, and the pineapple cake supply chain risk assessment method is output to a supply chain management terminal. The method realizes explicit expression of risk load cross-process transmission and topological identification of a risk aggregation path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food supply chain risk assessment technology, specifically a deep learning-based method for assessing the risk of pineapple cake food supply chain. Background Technology

[0002] The pineapple cake supply chain encompasses multiple stages, including filling preparation, pastry oil processing, filling, baking, packaging, warehousing, cold chain transportation, and retail sales. Existing food supply chain risk assessment methods primarily rely on sampling and testing data from single stages, independently evaluating microbiological and physicochemical indicators at each stage and determining the presence of risk through preset thresholds. Some traceability systems use batch coding to record raw material, production, and logistics information, retracing the supply chain to identify problematic batches in the event of a quality incident. These methods treat data from each stage as fragmented snapshots, failing to consider the transmission of risk loads from preceding processes to subsequent stages. Parameters such as the water activity, sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation of pineapple cake filling exhibit cross-stage transmission characteristics; deviations in one stage can be amplified in subsequent processes. Existing methods have deficiencies in batch-level risk field alignment and cross-process risk transmission quantification, lacking a segmented mapping mechanism along the directed edges of the supply chain and failing to express the transmission of upstream risk loads to downstream nodes. Meanwhile, the supply chain batch network exhibits a complex topology with multiple raw material convergences and multiple store branches. Existing methods fail to identify convergence and branching nodes, making it impossible to generate risk aggregation paths. For example, the fruit filling batch and the pastry oil batch of pineapple cakes converge during the filling process, and the same production batch may be distributed to multiple stores. This convergence and branching structure has not been used by existing technologies for risk level assessment and responsibility identification. Summary of the Invention

[0003] To address the shortcomings of existing food supply chain risk assessment methods that fail to consider the transmission process of risk loads from preceding processes to subsequent processes and fail to identify the convergence and branching topology of the supply chain batch network, this paper proposes a deep learning-based risk assessment method for pineapple cake food supply chain. This method generates risk load fingerprints by batch identifiers and performs segmented mapping along the directed edges of the supply chain batch transmission chain to generate stage-specific risk transmission quantities. These quantities are then coupled with the process condition fields of corresponding nodes to form risk coupling states. By statistically analyzing the number of incoming and outgoing edges, convergence and branching nodes are identified, generating risk aggregation paths and determining the risk level and risk responsibility links in the pineapple cake supply chain.

[0004] To achieve the above objectives, this invention provides the following technical solution: a deep learning-based risk assessment method for the pineapple cake food supply chain, comprising:

[0005] Obtain multi-source batch records from the pineapple cake supply chain. These multi-source batch records include records of fillings, crust oils, baking, packaging, storage temperature and humidity, transportation routes, and sales returns and exchanges.

[0006] Using batch identifiers as nodes and process flow timestamps and logistics transfer timestamps as indicators, a supply chain batch transfer chain is established.

[0007] A risk load fingerprint is generated for each batch identifier, the risk load fingerprint including raw material water activity, filling sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation;

[0008] The risk load fingerprint of the upstream node is segmented and mapped to the downstream node according to the directed edge to generate the stage risk transmission quantity;

[0009] The stage risk transmission quantity is coupled with the process condition field of the corresponding node to form a risk coupling state;

[0010] Based on the risk coupling state, convergence nodes and branching nodes are identified in the batch transmission chain of the supply chain to generate risk aggregation paths;

[0011] Based on the risk aggregation path, the risk level and risk responsibility links of the pineapple cake supply chain are determined and output to the supply chain management terminal.

[0012] Preferably, the step of establishing a supply chain batch transfer chain by using batch identifiers as nodes and determining directed edges by process flow timestamps and logistics transfer timestamps includes:

[0013] Extract the batch numbers of the fruit filling, the oil in the shortcrust pastry, and the origin batch numbers of the fruit pulp from the raw material purchase order;

[0014] Extract the process flow timestamps from the production work orders for mixing, stir-frying, filling, shaping, baking, cooling, and packaging.

[0015] Extract logistics transfer timestamps from the logistics receipt slips for cold storage outbound, trunk transportation, and store inbound;

[0016] The batch number of the fruit filling, the batch number of the shortcrust pastry oil, and the batch number of the fruit pulp origin are used as node identifiers;

[0017] The direction of the directed edge is determined according to the chronological order of the process flow timestamp and the logistics transfer timestamp;

[0018] For multiple nodes with the same timestamp, establish parallel directed edges based on work order number, transit order number, and store code;

[0019] Write the node identifier, the direction of the directed edge, the parallel directed edges, and the corresponding timestamp into the supply chain batch transmission chain.

[0020] Preferably, generating a risk payload fingerprint for each batch identifier includes:

[0021] The sugar content, pulp fiber length, and preservative addition status of the fruit filling were extracted from the fruit filling records.

[0022] The peroxide value, melting point range, and fatty acid composition of the oil in the puff pastry were extracted from the oil record.

[0023] The hot air temperature, baking time, and baking moisture loss rate were extracted from the baking records.

[0024] Oxygen permeability, sealing pressure, and number of packaging material layers were extracted from the packaging records.

[0025] Extract the duration of temperature exceeding the refrigeration range and the number of humidity fluctuations from the warehouse temperature and humidity records;

[0026] The number of vibration peaks and the number of transfers were extracted from the transportation trajectory records.

[0027] Extract the quantity and reason code for return / exchange from the sales return / exchange records;

[0028] The fields are aligned to the same timeline according to the batch identifier, and missing fields are filled by forward filling with adjacent process fields in the same batch to form the risk load fingerprint.

[0029] Preferably, the step of segmenting and mapping the risk load fingerprint of the upstream node to the downstream node according to the directed edge to generate the stage risk transmission quantity includes:

[0030] Obtain the process type corresponding to the directed edge, wherein the process type includes mixing, frying, filling, shaping, baking, cooling, packaging, warehousing, transportation and sales;

[0031] For each of the aforementioned process types, a pre-set transmission field mapping table is invoked. The transmission field mapping table specifies the field names involved in transmission in the upstream risk load fingerprint, the downstream receiving field names, and the transmission direction.

[0032] According to the transmission field mapping table, the upstream node field value is divided into multiple segment values ​​based on the dwell time on the directed edge, the environmental exposure area, and the contact material barrier level.

[0033] The multiple segment values ​​are written into the receiving field of the downstream node, and the upstream node identifier and the process type are retained as source markers to generate the stage risk transmission amount.

[0034] Preferably, the step of coupling the stage risk transmission quantity with the corresponding node's process condition field to form a risk coupling state includes:

[0035] Extract the process condition fields of the corresponding nodes. The process condition fields include the temperature of the frying pan, the moisture content of the filling, the number of hot air circulations in the baking, the dew point of the cooling tunnel, the cleanliness of the packaging workshop, the frequency of opening the cold storage door, and the pre-cooling status of the transport vehicle.

[0036] Match the source marker of the stage risk transmission with the process type of the process condition field;

[0037] Based on the matching results, the stage risk transmission volume is broken down into raw material-related components, processing-related components, and logistics-related components.

[0038] Write the raw material associated component into the raw material influence bit, write the processing associated component into the processing influence bit, and write the logistics associated component into the logistics influence bit;

[0039] When multiple source tags exist for the same node, they are merged according to the batch number of source tags to form the aforementioned risk coupling state.

[0040] Preferably, the step of identifying convergence nodes and branching nodes in the supply chain batch transmission chain based on the risk coupling state and generating a risk aggregation path includes:

[0041] Count the number of incoming and outgoing edges for each node in the supply chain batch transfer chain;

[0042] Nodes with more incoming edges than outgoing edges are marked as convergence nodes, and nodes with more outgoing edges than incoming edges are marked as branching nodes.

[0043] Extract the source marker and receiving field from the risk coupling state corresponding to each incoming edge of the aggregation node;

[0044] If multiple incoming edge source markers point to the same raw material batch, then the aggregation node and the corresponding incoming edge are combined to form a raw material aggregation segment;

[0045] If multiple incoming edge source markers point to the same transport order, they form a logistics aggregation segment;

[0046] Extract the store codes reached by each outgoing edge from the fork node, and form a store distribution segment by outgoing edges that share the same convergence node.

[0047] The raw material aggregation segment, the logistics aggregation segment, and the store dispersion segment are connected in a directed edge direction to generate the risk aggregation path.

[0048] Preferably, determining the risk level and risk responsibility links in the pineapple cake supply chain based on the risk aggregation path includes:

[0049] Extract the receiving field, source marker, and process condition field from the risk coupling state of each node along the risk aggregation path;

[0050] According to the pre-set pineapple cake risk field sequence table, the receiving fields are divided into microbial risk fields, oxidation risk fields, moisture migration risk fields and mechanical damage risk fields;

[0051] Count the number of consecutive nodes where various risk fields appear in the risk aggregation path;

[0052] The risk level is determined based on the risk field category with the highest number of consecutive nodes.

[0053] The process type and batch identifier corresponding to the consecutive nodes are identified as the risk responsibility links;

[0054] Generate a risk assessment result that includes the risk level and the risk responsibility link.

[0055] Preferably, the step of determining the risk level and risk responsibility links of the pineapple cake supply chain and outputting them to the supply chain management terminal includes:

[0056] Based on the aforementioned risk responsibility process, a corresponding batch identifier disposal instruction field is generated. The disposal instruction field includes suspending outbound shipment, prioritizing sales, rework and re-inspection, changing packaging, and adjusting cold storage zoning.

[0057] Obtain the current store inventory quantity and remaining shelf life from the supply chain management terminal;

[0058] If the current store inventory exceeds the preset replenishment limit and the remaining shelf life is less than the preset short shelf life, then the outbound shipment will be suspended and written into the disposal instruction field.

[0059] If the current store inventory is less than the preset replenishment limit and the remaining shelf life is greater than the preset short shelf life, then priority sales will be written into the disposal instruction field.

[0060] The disposal instruction field, along with the risk level and the risk responsibility link, are encapsulated into a terminal message according to the batch identifier and sent to the supply chain management terminal.

[0061] Preferably, the acquisition of multi-source batch records of the pineapple cake supply chain includes:

[0062] Obtain the fruit filling record and the puff pastry oil record from the supplier portal;

[0063] Obtain the baking record and the packaging record from the production execution system;

[0064] The warehouse temperature and humidity records and the transportation trajectory records are obtained from the cold chain monitoring equipment.

[0065] Retrieve the sales return and exchange records from the store's POS system;

[0066] Extract the batch identifier, timestamp, location code, and field name for each record;

[0067] Records are grouped according to the batch identifier, and records with adjacent timestamps under the same batch identifier are aligned by hour;

[0068] For records with missing location codes, the missing location codes are filled in using the location codes of the previous delivery point on the same transport order;

[0069] The grouped, aligned, and padded records are written into the multi-source batch record.

[0070] Preferably, the step of counting the number of incoming and outgoing edges for each node in the supply chain batch transfer chain includes:

[0071] Traverse the directed edges in the batch transfer chain of the supply chain and extract the start node identifier and end node identifier of each directed edge;

[0072] An incoming edge count table is established based on the endpoint node identifier. For each directed edge traversed, the incoming edge count value corresponding to the endpoint node identifier is incremented.

[0073] An outgoing edge count table is established based on the starting node identifier. For each directed edge traversed, the outgoing edge count value corresponding to the starting node identifier is incremented.

[0074] Parallel directed edges generated at the same timestamp are respectively counted in the inbound edge count table and the outbound edge count table;

[0075] The incoming edge count table and the outgoing edge count table are merged according to the node identifier to obtain the number of incoming edges and outgoing edges for each node.

[0076] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0077] By aligning the fields of raw material water activity, fruit filling sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation from the records of fruit filling, pastry oil, baking, packaging, packaging, storage temperature and humidity, transportation trajectory, and sales return / exchange to the same time axis, missing fields are filled forward using adjacent process fields within the same batch, generating a risk load fingerprint. Along the directed edges of the batch transmission chain in the supply chain, based on the process type and transmission field mapping table, the risk load fingerprint of the upstream node is divided into multiple segmented values ​​according to dwell time, environmental exposure area, and contact material barrier level, and written into the receiving field of the downstream node to generate a stage risk transmission quantity. The source marker of the stage risk transmission quantity is matched with the process condition field of the corresponding node, splitting it into raw material-related components, processing-related components, and logistics-related components, and written into the raw material influence bit, processing influence bit, and logistics influence bit, forming a risk coupling state. The risk load fingerprint includes the upstream node identifier and process type source marker, ensuring the traceability of the risk load of the preceding stage in subsequent nodes. Segmented mapping breaks down risk transmission along directed edges, reflecting the changes in risk load over time, exposure area, and barrier level during process flow. Risk coupling decomposes transmission into three impact points: raw materials, processing, and logistics, making the source of risk contribution at each node clearly identifiable. Compared to threshold judgments for single-stage detection indicators, this segmented mapping and coupling method along the transmission chain extends risk assessment from isolated node snapshots to continuous transmission chain-level evaluation. The number of incoming and outgoing edges at each node in the supply chain batch transmission chain is statistically analyzed. Nodes with more incoming edges than outgoing edges are marked as convergence nodes, and nodes with more outgoing edges than incoming edges are marked as fork nodes. The source markers and receiving fields in the risk coupling state corresponding to each incoming edge are extracted from the convergence nodes. Incoming edges pointing to the same raw material batch form a raw material aggregation segment, and incoming edges pointing to the same transport order form a logistics aggregation segment. The store codes reached by each outgoing edge are extracted from the fork nodes, and outgoing edges sharing the same convergence node form a store dispersion segment. The raw material aggregation segment, logistics aggregation segment, and store dispersion segment are concatenated along directed edges to generate a risk aggregation path. The risk coupling state of each node is extracted along the risk aggregation path. Based on the pineapple cake risk field sequence table, the received fields are divided into microbial risk fields, oxidation risk fields, moisture migration risk fields, and mechanical damage risk fields. The number of consecutive nodes appearing for each type of risk field is counted, and the risk level is determined according to the category with the most consecutive nodes. The process type and batch identifier corresponding to the consecutive nodes are identified as the risk responsibility link. The identification of convergence nodes and branching nodes utilizes the difference in the number of incoming and outgoing edges in the batch network topology, providing a clear topological basis for the extraction of risk aggregation and dispersion paths. The risk aggregation path connects the raw material aggregation segment, the logistics aggregation segment, and the store dispersion segment, enabling risk level determination and responsibility link location to be carried out continuously along the path, rather than discretely between independent detection nodes. Attached Figure Description

[0078] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0079] Figure 1 This is a flowchart of a pineapple cake food supply chain risk assessment method based on deep learning;

[0080] Figure 2 This is a flowchart for generating risk load fingerprints and stage risk transmission quantities. Detailed Implementation

[0081] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0082] See Figure 1 This invention provides a deep learning-based risk assessment method for the pineapple cake food supply chain, comprising: acquiring multi-source batch records of the pineapple cake supply chain, the multi-source batch records including fruit filling records, pastry oil records, baking records, packaging records, storage temperature and humidity records, transportation trajectory records, and sales return and exchange records; establishing a supply chain batch transmission chain by using batch identifiers as nodes and determining directed edges by process flow timestamps and logistics transfer timestamps; generating a risk load fingerprint for each batch identifier, the risk load fingerprint including raw material water activity, fruit filling sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation; segmenting and mapping the risk load fingerprints of upstream nodes to downstream nodes according to the directed edges to generate stage risk transmission quantities; coupling the stage risk transmission quantities with the process condition fields of the corresponding nodes to form a risk coupling state; identifying convergence nodes and branching nodes in the supply chain batch transmission chain according to the risk coupling state to generate risk aggregation paths; determining the risk level and risk responsibility links of the pineapple cake supply chain according to the risk aggregation paths and outputting them to the supply chain management terminal.

[0083] In practice, the process of obtaining multi-source batch records for the pineapple cake supply chain includes retrieving filling records and pastry oil records from the supplier portal. The supplier portal provides data upload interfaces for both filling and pastry oil suppliers. Filling records include the batch number, sugar content, fruit fiber length, preservative addition status, raw material water activity, and filling production timestamp. Pastry oil records include the batch number, oil peroxide value, melting point range, fatty acid composition, and pastry oil production timestamp. When retrieving filling and pastry oil records from the supplier portal, each record is parsed according to the data format set by the supplier portal, and the record status code returned by the supplier portal is retained.

[0084] Baking and packaging records are retrieved from the Production Execution System (MES). The MES stores baking and packaging process data for pineapple cake production. Baking records include the batch number, hot air temperature, baking time, baking moisture loss rate, cumulative baking heat, and baking process timestamp. Packaging records include the batch number, oxygen permeability, sealing pressure, number of packaging material layers, and packaging process timestamp. When retrieving baking and packaging records from the MES, extraction is performed by production order number and production timestamp. Multiple baking records under the same production order number are arranged in chronological order, as are multiple packaging records under the same production order number.

[0085] Warehouse temperature and humidity records and transportation trajectory records are obtained from cold chain monitoring equipment. The cold chain monitoring equipment includes cold storage temperature and humidity sensors and transport vehicle vibration sensors. Warehouse temperature and humidity records include the cold storage batch number, the duration of temperature exceeding the refrigeration range, the number of humidity fluctuations, the cold storage location code, and the storage timestamp. Transportation trajectory records include the waybill number, the number of vibration peaks, the number of transfers, the transport vehicle location code, and the logistics transfer timestamp. When obtaining warehouse temperature and humidity records and transportation trajectory records from the cold chain monitoring equipment, each record undergoes integrity verification. Warehouse temperature and humidity records lacking the duration of temperature exceeding the refrigeration range are supplemented with a default value of zero, and transportation trajectory records lacking the number of vibration peaks are supplemented with a default value of zero.

[0086] Retrieve sales return and exchange records from the store's POS system. Each record includes the sales batch number, return / exchange quantity, return / exchange reason code, store code, and sales return / exchange timestamp. When retrieving these records, extraction is performed based on the store code and sales return / exchange timestamp. Return / exchange records for the same sales batch number under the same store code are merged. The merged return / exchange quantity is the sum of the quantities from each individual record. The merged return / exchange reason code retains the original return / exchange reason codes from each record.

[0087] For each record, extract the batch identifier, timestamp, location code, and field names. For fruit filling records, the batch identifier is the fruit filling batch number, the timestamp is the fruit filling production timestamp, the location code is the fruit filling supplier location code, and the field names include fruit filling sugar content, fruit fiber length, preservative addition status, and raw material water activity. For puff pastry oil records, the batch identifier is the puff pastry oil batch number, the timestamp is the puff pastry oil production timestamp, the location code is the puff pastry oil supplier location code, and the field names include oil peroxide value, melting point range, and fatty acid composition. For baking records, the batch identifier is the baking batch number, the timestamp is the baking process flow timestamp, the location code is the production workshop location code, and the field names include hot air temperature, baking time, baking moisture loss rate, and baking heat accumulation. For packaging records, the batch identifier is the packaging batch number, the timestamp is the packaging process flow timestamp, the location code is the packaging workshop location code, and the field names include oxygen permeability, sealing pressure, and number of packaging material layers. For warehouse temperature and humidity records, the batch identifier is extracted as the cold storage batch number, the timestamp is the warehouse timestamp, and the location code is the cold storage location code. Field names include the duration of temperature exceeding the refrigeration range and the number of humidity fluctuations. For transportation trajectory records, the batch identifier is extracted as the waybill number, the timestamp is the logistics transfer timestamp, and the location code is the transport vehicle location code. Field names include the number of vibration peaks and the number of transfers. For sales return and exchange records, the batch identifier is extracted as the sales batch number, the timestamp is the sales return and exchange timestamp, the location code is the store code, and field names include the quantity returned / exchanged and the return / exchange reason code.

[0088] Records are grouped according to batch identifiers. During grouping, a hash calculation is first performed on all records based on the batch identifier to obtain the group bucket number for each record. Records with the same batch identifier are mapped to the same group bucket. Records with the same group bucket number form a record group. Records within each record group are then sorted in ascending order by timestamp. After sorting, multiple groups of records are obtained, grouped by batch identifier and sorted by timestamp.

[0089] For records with adjacent timestamps under the same batch identifier, align them by hour. For a record group under the same batch identifier, iterate through the records within the group, sorted by timestamp in ascending order. For two adjacent records, if the difference between the timestamp of the later record and the timestamp of the earlier record is less than one hour, adjust the timestamp of the later record to the timestamp of the earlier record plus one hour. If the difference between the timestamp of the later record and the timestamp of the earlier record is greater than or equal to one hour, leave the timestamp of the later record unchanged. After aligning by hour, the timestamps of all records within the record group remain monotonically increasing.

[0090] For records with missing location codes, use the location code of the previous delivery point on the same waybill to fill in the missing code. For records with missing location codes in the transportation trajectory record and the storage temperature and humidity record, find the delivery point location code that is not missing under the same waybill number. Write the found previous delivery point location code into the record with missing location codes. For records with missing location codes in the fruit filling record, puff pastry and oil record, baking record, packaging record, and sales return record, find the location code of the record that is not missing under the same batch identifier, and write the found location code into the record with missing location codes.

[0091] The grouped, aligned, and padded records are written to the multi-source batch record. During writing, records are written one by one in the order of batch identifier, timestamp, location code, field name, and field value. Each record in the multi-source batch record includes a record identifier, batch identifier, timestamp, location code, field name, and field value. The record identifier is a globally unique identifier, generated as a hash value of the batch identifier, field name, and timestamp. After being written, the multi-source batch records are used in the supply chain batch transfer chain establishment process.

[0092] The process of establishing a batch transfer chain in the supply chain includes extracting the batch numbers of the filling, the pastry oil, and the fruit origin batch number from the raw material purchase order. The raw material purchase order includes the purchase order number, the filling batch number, the pastry oil batch number, the fruit origin batch number, the purchase timestamp, and the supplier code. When extracting the filling batch number from the raw material purchase order, the order is read line by line according to the purchase order number, and the filling batch number in each line is extracted as the filling node identifier. Similarly, when extracting the pastry oil batch number, the pastry oil batch number in each line is extracted as the pastry oil node identifier. Finally, when extracting the fruit origin batch number from the raw material purchase order, the fruit origin batch number in each line is extracted as the fruit origin node identifier.

[0093] Extract the process flow timestamps for mixing, frying, filling, shaping, baking, cooling, and packaging from the production work order. The production work order includes the work order number, and the process flow timestamps for mixing, frying, filling, shaping, baking, cooling, and packaging. When extracting the process flow timestamps from the production work order, read the work order line by line according to the work order number, and extract the process flow timestamps for mixing, frying, filling, shaping, baking, cooling, and packaging from each line of the production work order.

[0094] Extract logistics transfer timestamps from the logistics receipt slip for cold storage outbound, trunk transportation, and store inbound. The logistics receipt slip includes the transport order number, cold storage outbound logistics transfer timestamp, trunk transportation logistics transfer timestamp, and store inbound logistics transfer timestamp. When extracting the logistics transfer timestamps from the logistics receipt slip, read the logistics receipt slip line by line according to the transport order number, and extract the cold storage outbound logistics transfer timestamp, trunk transportation logistics transfer timestamp, and store inbound logistics transfer timestamp from each line of the logistics receipt slip separately.

[0095] The batch numbers of the fruit filling, the oil in the pastry, and the fruit's origin are used as node identifiers. These identifiers are generated by writing each of these batch numbers into the node table of the supply chain batch transfer chain. The node table also includes a node type field, whose values ​​can be: fruit filling node, pastry oil node, fruit origin node, mixing process node, frying process node, filling process node, shaping process node, baking process node, cooling process node, packaging process node, cold storage outbound node, trunk transportation node, and store inbound node.

[0096] The direction of directed edges is determined by the chronological order of process flow timestamps and logistics transfer timestamps. For any two nodes, their respective timestamps are obtained. If the timestamp of the preceding node is earlier than that of the following node, and there is a process flow relationship or logistics transfer relationship between the types of the preceding and following nodes, then a directed edge is established from the preceding node to the following node. Process flow relationships include mixing process nodes pointing to frying process nodes, frying process nodes pointing to filling process nodes, filling process nodes pointing to shaping process nodes, shaping process nodes pointing to baking process nodes, baking process nodes pointing to cooling process nodes, and cooling process nodes pointing to packaging process nodes. Logistics transfer relationships include cold storage outbound nodes pointing to trunk transportation nodes and trunk transportation nodes pointing to store inbound nodes. The direction of the directed edge is recorded as the starting node identifier and the ending node identifier.

[0097] For multiple nodes with the same timestamp, establish parallel directed edges based on work order number, transit order number, and store code. For multiple mixed process nodes with multiple work order numbers under the same timestamp, establish parallel directed edges from the node corresponding to the fruit filling batch number to each mixed process node. For multiple trunk line transportation nodes with multiple transit order numbers under the same timestamp, establish parallel directed edges from the cold storage outbound node to each trunk line transportation node. For multiple store inbound nodes with multiple store codes under the same timestamp, establish parallel directed edges from the trunk line transportation node to each store inbound node. The edge type field of the parallel directed edges is marked as parallel type.

[0098] Write the node identifier, directed edge direction, parallel directed edges, and corresponding timestamps into the supply chain batch transfer chain. During writing, write each node sequentially in the order of node identifier, node type, directed edge direction, parallel directed edge type, and timestamp. Each node in the supply chain batch transfer chain includes a node identifier, node type, and timestamp. Each directed edge in the supply chain batch transfer chain includes a start node identifier, end node identifier, directed edge direction, edge type, and timestamp. After writing, the supply chain batch transfer chain can be used in the risk payload fingerprint generation stage.

[0099] In specific implementation, please refer to Figure 2 The process of generating a risk payload fingerprint for each batch identifier includes extracting the filling sugar content, pulp fiber length, and preservative addition status from the filling records. The filling records are stored in multi-source batch records, and each record contains a filling batch number, a filling production timestamp, a filling sugar content field, a pulp fiber length field, and a preservative addition status field. During extraction, field values ​​are read one by one according to the field name in the filling record. The filling sugar content field value is retained to two decimal places, the pulp fiber length field value is in millimeters, and the preservative addition status field value is recorded as either added or not added. The extracted filling sugar content field, pulp fiber length field, and preservative addition status field are then associated with the filling batch number and filling production timestamp.

[0100] The water activity of raw materials is extracted from the filling records. The water activity field is stored in each filling record, and each record contains this field. During extraction, the field value is read according to the field name, and the value is rounded to three decimal places. The extracted water activity field is then associated with the filling batch number and the filling production timestamp.

[0101] Peroxide value, melting point range, and fatty acid composition of puff pastry oils were extracted from the oil records. These records were stored in multi-source batch records, with each record containing a batch number, production timestamp, peroxide value field, melting point range field, and fatty acid composition field. The peroxide value was expressed in millimoles per kilogram (mmol / kg), the melting point range field recorded the starting and ending temperatures, and the fatty acid composition field recorded the names and percentages of each fatty acid. The extracted peroxide value, melting point range, and fatty acid composition fields were then linked to the puff pastry oil batch number and production timestamp.

[0102] Hot air temperature, baking time, and baking moisture loss rate are extracted from baking records. Baking records are stored in multi-source batch records. Each baking record includes a baking batch number, a baking process flow timestamp, a hot air temperature field, a baking time field, and a baking moisture loss rate field. The hot air temperature field value is in degrees Celsius, the baking time field value is in minutes, and the baking moisture loss rate field value is in percentage. The extracted hot air temperature field, baking time field, and baking moisture loss rate field are then associated with the baking batch number and the baking process flow timestamp.

[0103] Baking heat accumulation is calculated based on hot air temperature and baking time. The baking heat accumulation is calculated by multiplying the hot air temperature field value by the baking time field value, with the product recorded in degrees Celsius per minute. As a derived field of the baking record, baking heat accumulation is associated with the baking batch number and the timestamp of the baking process flow.

[0104] Oxygen permeability, sealing pressure, and number of packaging material layers are extracted from packaging records. These records are stored in multi-source batch records. Each record includes a batch number, a packaging process flow timestamp, an oxygen permeability field, a sealing pressure field, and a numerical field for the number of packaging material layers. The oxygen permeability field is measured in cubic centimeters per square meter per day, the sealing pressure field is measured in megapascals (MPA), and the numerical field for the number of packaging material layers is recorded as an integer. The extracted oxygen permeability, sealing pressure, and numerical field for the number of packaging material layers are then linked to the batch number and the packaging process flow timestamp.

[0105] Extract the duration of temperature exceeding the cold storage range and the number of humidity fluctuations from the warehouse temperature and humidity records. These records are stored in multi-source batch records. Each record includes a cold storage batch number, a storage timestamp, a field for the duration of temperature exceeding the cold storage range, and a field for the number of humidity fluctuations. The duration of temperature exceeding the cold storage range is recorded in minutes, while the number of humidity fluctuations is recorded as an integer. The extracted duration of temperature exceeding the cold storage range and number of humidity fluctuations are then linked to the cold storage batch number and storage timestamp.

[0106] The vibration peak count and transfer count are extracted from the transportation trajectory records. The transportation trajectory records are stored in multi-source batch records. Each transportation trajectory record includes a tracking number, a logistics transfer timestamp, a vibration peak count field, and a transfer count field. The vibration peak count field and the transfer count field are recorded as integer values. The extracted vibration peak count and transfer count fields are then associated with the tracking number and logistics transfer timestamp.

[0107] Accumulated transport vibration is calculated based on the number of peak vibrations and the number of transshipments. The accumulated transport vibration is calculated by adding the values ​​from the peak vibration count field and the transshipment count field, with the sum recorded as a count. The accumulated transport vibration is a derived field of the transport trajectory record and is associated with the transport order number and logistics transfer timestamp.

[0108] Extract the return quantity and return reason code from the sales return and exchange records. The sales return and exchange records are stored in multi-source batch records. Each record contains a sales batch number, a sales return / exchange timestamp, a return quantity field, and a return reason code field. The return quantity field records an integer number of items, and the return reason code field records a preset reason code number. The extracted return quantity and return reason code fields are then associated with the sales batch number and sales return / exchange timestamp.

[0109] The extracted fields are aligned to the same timeline based on batch identifiers. Using the batch identifier as the primary key, the following fields under the same batch identifier are arranged in ascending order of their respective timestamps: fruit filling sugar content, fruit pulp fiber length, preservative addition status, raw material water activity, oil peroxide value, melting point range, fatty acid composition, hot air temperature, baking time, baking moisture loss rate, cumulative baking heat, oxygen permeability, sealing pressure, packaging material layer number, duration of temperature exceeding the refrigeration range, number of humidity fluctuations, number of vibration peaks, number of transfers, cumulative transportation vibration, number of returns / exchanges, and return / exchange reason code. The arranged field sequence constitutes the timeline aligned sequence under the same batch identifier.

[0110] For missing fields, forward filling is performed using adjacent process fields within the same batch. For a missing field in the timeline-aligned sequence under the same batch identifier, a non-missing value with the same field name at the most recent timestamp is searched backwards. The found non-missing value is written to the missing field's location. If no non-missing value with the same field name is found backwards, the missing field's missing status is retained and marked as having no forward value. After forward filling, at each timestamp in the timeline-aligned sequence, each field is either filled in or retains the missing marker.

[0111] The forward-filled timeline aligned sequence is used as the risk load fingerprint for the corresponding batch identifier. The risk load fingerprint includes fields for raw material water activity, filling sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation. It also includes batch identifiers and timestamp information. The risk load fingerprint is stored as a key-value pair structure, where the key is the batch identifier and the values ​​are the set of fields at each timestamp.

[0112] The process of generating risk transmission volume in the generation phase includes obtaining the process type corresponding to each directed edge. It iterates through each directed edge in the supply chain batch transmission chain, reading the start and end node identifiers of each directed edge. The node type field corresponding to the end node identifier is then read. The node type field can contain values ​​for mixing, frying, filling, shaping, baking, cooling, packaging, cold storage outbound, trunk transportation, store inbound, and sales nodes. Based on the node type field corresponding to the end node identifier, the process type corresponding to each directed edge is determined. Process types include mixing, frying, filling, shaping, baking, cooling, packaging, warehousing, transportation, and sales. When the node type field corresponding to the endpoint node identifier is a mixed process node, the directed edge corresponds to the mixed process type; when the node type field corresponding to the endpoint node identifier is a stir-frying process node, the directed edge corresponds to the stir-frying process type; when the node type field corresponding to the endpoint node identifier is a filling process node, the directed edge corresponds to the filling process type; when the node type field corresponding to the endpoint node identifier is a shaping process node, the directed edge corresponds to the shaping process type; when the node type field corresponding to the endpoint node identifier is a baking process node, the directed edge corresponds to the baking process type; when the node type field corresponding to the endpoint node identifier is a cooling process node, the directed edge corresponds to the cooling process type; when the node type field corresponding to the endpoint node identifier is a packaging process node, the directed edge corresponds to the packaging process type; when the node type field corresponding to the endpoint node identifier is a cold storage outbound node, the directed edge corresponds to the warehousing process type; when the node type field corresponding to the endpoint node identifier is a trunk transportation node, the directed edge corresponds to the transportation process type; when the node type field corresponding to the endpoint node identifier is a store inbound node or a sales node, the directed edge corresponds to the sales process type.

[0113] For each process type, a pre-defined transmission field mapping table is invoked. The transmission field mapping table is stored as a relational table, which includes a process type column, an upstream field name column, a downstream receiving field name column, and a transmission direction column. The upstream field name column records the field names involved in transmission from the upstream risk load fingerprint, the downstream receiving field name column records the receiving field names written by the downstream node after receiving the upstream field values, and the transmission direction column records the direction identifier from the upstream node to the downstream node. For mixing processes, the conduction field mapping table records the upstream raw material water activity field corresponding to the downstream mixing node's raw material water activity receiving field, with the conduction direction being positive. For frying processes, the conduction field mapping table records the upstream fruit filling sugar content field corresponding to the downstream frying node's filling sugar content receiving field, with the conduction direction being positive. For baking processes, the conduction field mapping table records the upstream oil peroxide value field corresponding to the downstream baking node's oil oxidation receiving field, with the conduction direction being positive. For packaging processes, the conduction field mapping table records the upstream oxygen permeability field corresponding to the downstream packaging node's packaging oxygen permeability receiving field, with the conduction direction being positive. For transportation processes, the conduction field mapping table records the upstream transportation vibration accumulation field corresponding to the downstream transportation node's vibration accumulation receiving field, with the conduction direction being positive.

[0114] Based on the conduction field mapping table, the upstream node field values ​​are divided into multiple segment values ​​according to the dwell time on the directed edge, environmental exposure area, and contact material barrier level. The dwell time on the directed edge is obtained; the dwell time is equal to the difference between the timestamp of the endpoint node and the timestamp of the starting node of the directed edge. The environmental exposure area and the contact material barrier level are recorded in the node attributes associated with the directed edge. For the upstream node field values ​​corresponding to the upstream field names specified in the conduction field mapping table, they are divided into several time segments according to the dwell time, with each time segment corresponding to a segment value. When dividing the time segments, the dwell time is divided by a preset segment duration to obtain the number of segments. Each segment value is equal to the upstream node field value multiplied by the environmental exposure area coefficient corresponding to that time segment, and then multiplied by the contact material barrier level coefficient. The environmental exposure area coefficient is determined based on the ratio of the environmental exposure area to the baseline area, and the contact material barrier level coefficient is obtained by querying the level coefficient table based on the contact material barrier level. Multiple segment values ​​are arranged in the order of the time segments.

[0115] Multiple segmented values ​​are written to the receive field of the downstream node. The name of the receive field of the downstream node is specified by the downstream receive field name column of the transmission field mapping table. During writing, the first segmented value is written to the first storage location of the receive field of the downstream node, the second segmented value is written to the second storage location of the receive field of the downstream node, and so on. At the same time, the upstream node identifier and process type are retained as source markers. The source markers are stored in the metadata of the receive field of the downstream node, and the source markers include the upstream node identifier field and the process type field. A stage risk transmission quantity is generated, which includes the downstream node identifier, downstream receive field name, segmented value sequence, upstream node identifier, and process type.

[0116] In practical implementation, the process of coupling the stage risk transmission quantity with the corresponding node's process condition field includes extracting the corresponding node's process condition field. The corresponding node is the supply chain batch transfer chain node pointed to by the downstream node identifier in the stage risk transmission quantity. The process condition field is stored in the node attributes of the supply chain batch transfer chain. The process condition field includes the temperature of the frying pan, the moisture content of the filling, the number of hot air circulations in baking, the dew point of the cooling tunnel, the cleanliness of the packaging workshop, the frequency of cold storage door openings, and the pre-cooling status of the transport vehicle. The frying pan temperature field value is in degrees Celsius, the filling moisture content field value is in percentage, the number of hot air circulations in baking is recorded as an integer, the dew point of the cooling tunnel is in degrees Celsius, the cleanliness of the packaging workshop is recorded as the cleanliness level number, the frequency of cold storage door openings is recorded as an integer, and the pre-cooling status of the transport vehicle is recorded as pre-cooled or not pre-cooled. When extracting the process condition field of the corresponding node, the values ​​of each process condition field are read from the node attributes of the supply chain batch transfer chain according to the node identifier.

[0117] Match the source marker of the stage risk transmission quantity with the process type of the process condition field. The stage risk transmission quantity includes a source marker, which contains an upstream node identifier field and a process type field. The process type corresponding to the process condition field is determined based on the node type field of the corresponding node. The node type field can take the following values: mixing process node, frying process node, filling process node, shaping process node, baking process node, cooling process node, packaging process node, cold storage outbound node, trunk transportation node, store inbound node, and sales node. The mixing process node corresponds to the mixing process type, the frying process node corresponds to the frying process type, the filling process node corresponds to the filling process type, the shaping process node corresponds to the shaping process type, the baking process node corresponds to the baking process type, the cooling process node corresponds to the cooling process type, the packaging process node corresponds to the packaging process type, the cold storage outbound node corresponds to the warehousing process type, the trunk transportation node corresponds to the transportation process type, and the store inbound node and sales node correspond to the sales process type. During matching, the process type field value in the source marker of the stage risk transmission amount is compared with the process type corresponding to the process condition field one by one. If the process type field value is the same as the process type corresponding to the process condition field, it is recorded as a successful match.

[0118] Based on the matching results, the stage risk transmission quantity is split into raw material-related components, processing-related components, and logistics-related components. The splitting is based on the process type field value in the source marker of the stage risk transmission quantity. When the process type field value is mixing, frying, filling, or shaping, the raw material-related component obtained from the stage risk transmission quantity splitting is equal to the segmented value sequence in the stage risk transmission quantity, while the processing and logistics-related components are set to null values. When the process type field value is baking, cooling, or packaging, the processing-related component obtained from the stage risk transmission quantity splitting is equal to the segmented value sequence in the stage risk transmission quantity, while the raw material and logistics-related components are set to null values. When the process type field value is warehousing or transportation, the logistics-related component obtained from the stage risk transmission quantity splitting is equal to the segmented value sequence in the stage risk transmission quantity, while the raw material and processing-related components are set to null values. When the process type field value is sales, the logistics-related component obtained from the stage risk transmission quantity splitting is equal to the segmented value sequence in the stage risk transmission quantity, while the raw material and processing-related components are set to null values.

[0119] The raw material-related components are written to the raw material influence bit, the processing-related components to the processing influence bit, and the logistics-related components to the logistics influence bit. The raw material influence bit is the field location in the node attributes of the corresponding node used to store the raw material-related components; the processing influence bit is the field location in the node attributes of the corresponding node used to store the processing-related components; and the logistics influence bit is the field location in the node attributes of the corresponding node used to store the logistics-related components. During writing, each segment value in the raw material-related components is written to the respective storage units of the raw material influence bit in segment value order; each segment value in the processing-related components is written to the respective storage units of the processing influence bit in segment value order; and each segment value in the logistics-related components is written to the respective storage units of the logistics influence bit in segment value order. Each storage unit retains the corresponding upstream node identifier and process type as a source marker.

[0120] When multiple source markers exist for the same node, they are merged according to the batch number of the source markers, forming a risk coupling state. The presence of multiple source markers for the same node indicates that the same node receives stage risk transmission from multiple directed edges. During merging, the number of different batch identifiers in the source markers of the same node is counted. The specific method for merging by batch number is as follows: for segment values ​​from different batch identifiers in the same influence position of the same node, the merged segment value sequence is obtained by summing the segment values ​​position by position in sequence; for segment values ​​from different source markers but with the same batch identifier in the same influence position of the same node, the merged segment value sequence is obtained by summing the segment values ​​position by position in sequence. After merging, the raw material influence position, processing influence position, and logistics influence position in the node attributes store the merged segment value sequence respectively. This forms a risk coupling state, which includes the node identifier, the merged segment value sequence of the raw material influence position, the merged segment value sequence of the processing influence position, the merged segment value sequence of the logistics influence position, and the set of source markers for each influence position.

[0121] The process of identifying convergence and branching nodes in the supply chain batch transfer chain based on risk coupling includes counting the number of incoming and outgoing edges for each node in the supply chain batch transfer chain. During the counting process, all directed edges in the supply chain batch transfer chain are traversed, and the start and end node identifiers of each directed edge are extracted. An incoming edge count table is built based on the end node identifier, and the incoming edge count value corresponding to the end node identifier is incremented for each directed edge traversed. An outgoing edge count table is built based on the start node identifier, and the outgoing edge count value corresponding to the start node identifier is incremented for each directed edge traversed. Parallel directed edges generated at the same timestamp are counted separately in the incoming and outgoing edge count tables. The incoming and outgoing edge count tables are merged according to node identifiers to obtain the number of incoming and outgoing edges for each node.

[0122] The number of incoming and outgoing edges of a node is calculated using the following formula:

[0123]

[0124] in, For nodes In direction The number of edges on; To identify nodes in the supply chain for batch transmission; These are direction parameters, and their values ​​include the in direction and the out direction. A set of directed edges in the supply chain batch transfer chain; for A directed edge in the middle; For the directed edge direction matching indicator parameter, when For the direction of entry and the directed edge The endpoint node identifier is equal to the node When identifying the node, The value is 1, when For outgoing and directed edges The starting node identifier is equal to the node When identifying the node, The value is 1, and in other cases... The value is 0.

[0125] Nodes with more incoming edges than outgoing edges are marked as sink nodes, and nodes with more outgoing edges than incoming edges are marked as branch nodes. For each node, compare the number of incoming edges with the number of outgoing edges. If the number of incoming edges is greater than the number of outgoing edges, mark the node as a sink node. If the number of outgoing edges is greater than the number of incoming edges, mark the node as a branch node. If the number of incoming edges is equal to the number of outgoing edges, neither sink nor branch node is marked.

[0126] Extract the source markers and receiving fields from the risk coupling state corresponding to each incoming edge of the aggregation node. The risk coupling state corresponding to each incoming edge is the set of source markers for each influencing bit and the sequence of merged segmented values ​​for each influencing bit stored in the risk coupling state of the aggregation node. Each source marker in the source marker set includes an upstream node identifier field and a process type field. The receiving field is the receiving field name stored in the node attributes of the aggregation node, which includes the field names corresponding to the raw material influence bit, processing influence bit, and logistics influence bit.

[0127] If multiple incoming edge source markers point to the same raw material batch, the aggregation node and its corresponding incoming edges will form a raw material aggregation segment. To determine whether multiple incoming edge source markers point to the same raw material batch, the upstream node identifier field in each incoming edge source marker is compared. If the raw material batch number parsed from multiple upstream node identifier fields is the same, then multiple incoming edge source markers point to the same raw material batch. The raw material aggregation segment includes the aggregation node identifier, the set of starting node identifiers for the corresponding incoming edges, and the raw material batch number they all point to.

[0128] If multiple incoming edge source markers point to the same transport order, they form a logistics aggregation segment. To determine whether multiple incoming edge source markers point to the same transport order, the upstream node identifier field in each incoming edge source marker is compared. If the transport order numbers parsed from multiple upstream node identifier fields are the same, then multiple incoming edge source markers point to the same transport order. A logistics aggregation segment includes a convergence node identifier, the set of starting node identifiers for the corresponding incoming edges, and the transport order number they all point to.

[0129] Extract the store codes reached by each outgoing edge from the fork node, and group outgoing edges sharing the same convergence node into a store distribution segment. The store codes reached by each outgoing edge from the fork node are stored in the endpoint node attributes corresponding to each outgoing edge in the supply chain batch transmission chain. The endpoint node attributes include a store code field. After extracting the store codes reached by each outgoing edge, find the convergence node identifier corresponding to the starting node identifier of each outgoing edge, and group outgoing edges with the same convergence node identifier into the same store distribution segment. The store distribution segment includes the fork node identifier, the set of outgoing edge endpoint node identifiers, the set of outgoing edge store codes, and the shared convergence node identifier.

[0130] The raw material aggregation segment, logistics aggregation segment, and store dispersion segment are connected in a directed edge direction to generate a risk aggregation path. During the connection, the path starts from the convergence node in the raw material aggregation segment, connects to the convergence node in the logistics aggregation segment along the directed edge direction of the supply chain batch transfer chain, and then connects to the branch node in the store dispersion segment along the directed edge direction. The risk aggregation path contains the node identifier sequence, directed edge direction sequence, and segment type sequence for each segment. The generated risk aggregation path is stored as a path node list and a path edge list.

[0131] The receiving field, source marker, and process condition field are extracted from the risk coupling state of each node along the risk clustering path. The risk clustering path is obtained through the risk clustering path generation process and includes a path node list and a path edge list. For each node in the path node list, the risk coupling state record corresponding to the node identifier is searched in the risk coupling state. The risk coupling state record includes the node identifier, the combined segmented value sequence of raw material influence bits, the combined segmented value sequence of processing influence bits, the combined segmented value sequence of logistics influence bits, and the set of source markers for each influence bit. The receiving field is the field name of the raw material influence bit corresponding to the raw material influence bit, the field name of the processing influence bit corresponding to the processing influence bit, and the field name of the logistics influence bit corresponding to the logistics influence bit in the risk coupling state record. The source marker is each source marker in the set of source markers for each influence bit, and each source marker includes an upstream node identifier field and a process type field. The process condition field is stored in the node attributes of the supply chain batch transfer chain. When extracting, the following fields are read from the node attributes according to the node identifier: the temperature of the frying pan, the moisture content of the filling, the number of hot air cycles in baking, the dew point of the cooling tunnel, the cleanliness of the packaging workshop, the frequency of opening the cold storage door, and the pre-cooling status of the transport vehicle.

[0132] Based on a pre-defined pineapple cake risk field sequence table, the received fields are categorized into microbial risk fields, oxidation risk fields, moisture migration risk fields, and mechanical damage risk fields. The pineapple cake risk field sequence table is stored as a relational table, containing a field name column and a risk category column. The field name column records the received field name, and the risk category column records the risk category name. In the pineapple cake risk field sequence table, the raw material impact field name corresponds to the moisture migration risk field category, the processing impact field name corresponds to the microbial risk field category and the oxidation risk field category, and the logistics impact field name corresponds to the mechanical damage risk field category and the microbial risk field category. During the categorization, each received field name is read individually, and a matching row is searched in the field name column of the pineapple cake risk field sequence table. The risk category name in the risk category column of the matching row is then assigned to the received field. If a received field corresponds to multiple risk category names, the received field is simultaneously categorized into multiple risk field categories. The categorization result is that each received field corresponds to one or more risk category tags.

[0133] This study counts the number of consecutive nodes for each risk field in a risk clustering path. The number of consecutive nodes for a risk field refers to the number of nodes in the risk clustering path where the receiving field belongs to the same risk field category appears consecutively. During the count, the nodes in the risk clustering path node list are traversed sequentially, and the set of risk field categories is extracted for each node. A continuous count variable is maintained for each risk field category. When traversing to a node, if the node's risk field category set contains the target risk field category, the continuous count variable corresponding to the target risk field category is incremented by one; otherwise, the continuous count variable corresponding to the target risk field category is reset to zero. The maximum continuous count variable value reached by each risk field category during the traversal is recorded. After the statistics are completed, the maximum number of consecutive nodes for each of the following risk fields is obtained: microbial risk field, oxidation risk field, moisture migration risk field, and mechanical damage risk field.

[0134] The maximum number of consecutive nodes is calculated using the following formula:

[0135]

[0136] in, Risk field category In the risk clustering path The maximum number of consecutive nodes on the array; The risk field category includes the following values: microbial risk field, oxidation risk field, moisture migration risk field, and mechanical damage risk field. Identify risk clustering paths; Risk aggregation path The set consisting of all consecutive subsequences of nodes in the array; for A continuous subsequence of nodes; For continuous node subsequences One of the nodes; For nodes The corresponding set of risk field categories; Match indicator parameters for risk categories, when the risk field category Belongs to node Corresponding risk field category set hour, The value is 1, when the risk field category Not a node Corresponding risk field category set hour, The value is 0. Risk clustering path. The set of all consecutive subsequences of nodes It consists of all consecutive segments formed by ordered adjacent nodes in the path node list. Maximum number of consecutive nodes. Through the The cumulative value of the indicator parameter is calculated for each consecutive subsequence of nodes, and the maximum value is taken.

[0137] Risk levels are determined based on the risk field category with the highest number of consecutive nodes. The maximum number of consecutive nodes for each of the microbial risk field, oxidation risk field, moisture migration risk field, and mechanical damage risk field is compared. The risk field category with the highest number of consecutive nodes is selected as the dominant risk field category. A pre-built risk level mapping table stores the correspondence between the dominant risk field category and the risk level. In the risk level mapping table, the microbial risk field corresponds to a high risk level, the oxidation risk field corresponds to a medium-high risk level, the moisture migration risk field corresponds to a medium risk level, and the mechanical damage risk field corresponds to a low risk level. The corresponding risk level is then searched in the risk level mapping table based on the dominant risk field category, and the found risk level is used as the risk level for the pineapple cake supply chain.

[0138] The process type and batch identifier corresponding to consecutive nodes are identified as risk responsibility links. The process type corresponding to a consecutive node is determined by the node type field in the node attributes of the consecutive node. The node type field values ​​include mixed process nodes, frying process nodes, filling process nodes, shaping process nodes, baking process nodes, cooling process nodes, packaging process nodes, cold storage outbound nodes, trunk transportation nodes, store inbound nodes, and sales nodes. Mixed process nodes correspond to mixed process types, frying process nodes correspond to frying process types, filling process nodes correspond to filling process types, shaping process nodes correspond to shaping process types, baking process nodes correspond to baking process types, cooling process nodes correspond to cooling process types, packaging process nodes correspond to packaging process types, cold storage outbound nodes correspond to warehousing process types, trunk transportation nodes correspond to transportation process types, and store inbound and sales nodes correspond to sales process types. The batch identifier corresponding to a consecutive node is the batch identifier field value stored in the node attributes of the consecutive node in the supply chain batch transfer chain. The process type and batch identifier of each node in the consecutive node segment corresponding to the maximum number of consecutive nodes corresponding to the dominant risk field category are extracted one by one to form risk responsibility links.

[0139] Generate a risk assessment result that includes risk level and risk responsibility details. The risk assessment result is stored in a structured data format, including a risk level field, a risk responsibility detail field, and a generation timestamp field. The risk level field contains the determined risk level of the pineapple cake supply chain. The risk responsibility detail field contains a list of process types and batch identifiers corresponding to consecutive nodes. The generation timestamp field contains the current system time. The generated risk assessment result is used for output by the supply chain management terminal.

[0140] Based on the risk responsibility stage, a disposal instruction field corresponding to the batch identifier is generated. The risk responsibility stage is obtained from the risk assessment results, which include a risk level field, a risk responsibility stage field, and a generation timestamp field. The risk responsibility stage field contains a list of process types and batch identifiers corresponding to consecutive nodes. For each batch identifier in the risk responsibility stage, a corresponding disposal instruction field is created. Disposal instruction fields include: suspend outbound shipment, prioritize sales, rework and re-inspection, repackage, and adjust cold storage zoning. When creating disposal instruction fields, suspend outbound shipment, prioritize sales, rework and re-inspection, repackage, and adjust cold storage zoning are all set to an inactive state. A relationship is established between the disposal instruction field and the corresponding batch identifier.

[0141] The system retrieves the current store inventory quantity and remaining shelf life from the supply chain management terminal. The supply chain management terminal receives query requests through the store inventory query interface and returns the query results. For each batch identifier in the risk responsibility process, an inventory query request is sent to the supply chain management terminal. The supply chain management terminal returns the current store inventory quantity and remaining shelf life based on the batch identifier and store code. The current store inventory quantity is in units of pieces and represents the real-time inventory quantity of the store corresponding to that batch identifier in the supply chain management terminal. The remaining shelf life is in days and is obtained by subtracting the current system time from the expiration time corresponding to the batch identifier.

[0142] The current store inventory is compared with the preset replenishment limit, and the remaining shelf life is compared with the preset short shelf life. The preset replenishment limit is a pre-set positive integer, and the preset short shelf life is a pre-set positive number. The comparison result determines the disposal action in the disposal instruction field. The specific comparison uses the disposal action determination formula:

[0143]

[0144] in, Batch Identifier The corresponding action number, A value of 1 indicates that the outbound process will be paused when written to the disposal instruction field. A value of 2 indicates that priority sales will be written into the disposal instruction field. A value of 0 indicates that neither "pause outbound" nor "priority sales" will be written. This is a batch identifier. Batch Identifier The corresponding current store inventory quantity is obtained from the supply chain management terminal. A pre-set replenishment limit is configured when the risk assessment system is initialized. Batch Identifier The corresponding remaining shelf life is obtained from the supply chain management terminal. To pre-set the short-term warranty period, the short-term warranty period is configured during the initialization of the risk assessment system. For logical AND operator. For the greater than operator, This is the less than operator.

[0145] When the current store inventory exceeds the preset replenishment limit and the remaining shelf life is less than the preset short shelf life, outbound shipments will be suspended and written to the disposal instruction field. Specifically, the writing method is as follows: if the disposal action number... If the calculation result is 1, then the "Pause Outbound" field in the "Disposal Instruction" field will be set to the active state, while the "Priority Sales" field in the "Disposal Instruction" field will remain in the inactive state.

[0146] When the current store inventory is less than the preset replenishment limit and the remaining shelf life is greater than the preset short shelf life, priority will be given to selling this information, which will be written into the disposal instruction field. Specifically, the writing method is as follows: if the disposal action number... If the calculation result is 2, then the "Priority Sales" field in the "Disposal Instruction" field will be set to the "Active" state, while the "Suspend Outbound" field in the "Disposal Instruction" field will remain in the "Inactive" state.

[0147] When the relationship between the current store inventory and the pre-set replenishment limit, and the relationship between the remaining shelf life and the pre-set short shelf life, do not fall into either of the two scenarios mentioned above, the "Suspend Outbound" and "Priority Sales" fields in the disposal instruction field remain inactive. The rework / re-inspection, repackaging, and cold storage zoning adjustments in the disposal instruction field are determined based on the process type of the corresponding batch identifier in the risk responsibility process. If the process type list in the risk responsibility process includes baking or packaging processes, then rework / re-inspection is written to the disposal instruction field; if the process type list in the risk responsibility process includes packaging processes, then repackaging is written to the disposal instruction field; if the process type list in the risk responsibility process includes warehousing processes, then adjusting cold storage zoning is written to the disposal instruction field.

[0148] The disposal instruction field, along with the risk level and risk responsibility stage, are encapsulated into a terminal message based on batch identifiers. The terminal message includes a header, body, and verification field. The header contains a message type identifier, a message sending timestamp, and a message sequence number. The body contains a batch identifier, risk level, risk responsibility stage, and disposal instruction field. The risk level is obtained from the risk level field of the risk assessment result, the risk responsibility stage is obtained from the risk responsibility stage field of the risk assessment result, and the disposal instruction field is the disposal instruction field generated and updated in the preceding steps. During encapsulation, the batch identifier, risk level, risk responsibility stage, and disposal instruction field are written into the message body according to a predefined message format. The message type identifier in the header is set to the risk assessment disposal instruction type. The verification field calculates a verification value based on the header and body.

[0149] The encapsulated terminal message is sent to the supply chain management terminal. Transmission occurs via the data communication link between the risk assessment system and the supply chain management terminal. Upon receiving the terminal message, the supply chain management terminal parses the batch identifier, risk level, risk responsibility link, and handling instruction fields in the message body, and then issues the handling action in the handling instruction field to the corresponding store's inventory management module. The terminal message transmission process employs a synchronous confirmation mechanism. After sending the terminal message, the risk assessment system waits for a confirmation message from the supply chain management terminal. If no confirmation message is received within a set time, the terminal message is resent.

[0150] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A deep learning-based risk assessment method for the pineapple cake food supply chain, characterized in that, include: Obtain multi-source batch records from the pineapple cake supply chain. These multi-source batch records include records of fillings, crust oils, baking, packaging, storage temperature and humidity, transportation routes, and sales returns and exchanges. Using batch identifiers as nodes and process flow timestamps and logistics transfer timestamps as indicators, a supply chain batch transfer chain is established. A risk load fingerprint is generated for each batch identifier, the risk load fingerprint including raw material water activity, filling sugar content, oil peroxide value, baking heat accumulation, packaging oxygen permeability, and transportation vibration accumulation; The risk load fingerprint of the upstream node is segmented and mapped to the downstream node according to the directed edge to generate the stage risk transmission quantity; The stage risk transmission quantity is coupled with the process condition field of the corresponding node to form a risk coupling state; Based on the risk coupling state, convergence nodes and branching nodes are identified in the batch transmission chain of the supply chain to generate risk aggregation paths; Based on the risk aggregation path, the risk level and risk responsibility links of the pineapple cake supply chain are determined and output to the supply chain management terminal.

2. The deep learning-based risk assessment method for pineapple cake food supply chain according to claim 1, characterized in that, The process of establishing a supply chain batch transfer chain, using batch identifiers as nodes and directed edges determined by process flow timestamps and logistics transfer timestamps, includes: Extract the batch numbers of the fruit filling, the oil in the shortcrust pastry, and the origin batch numbers of the fruit pulp from the raw material purchase order; Extract the process flow timestamps from the production work orders for mixing, stir-frying, filling, shaping, baking, cooling, and packaging. Extract logistics transfer timestamps from the logistics receipt slips for cold storage outbound, trunk transportation, and store inbound; The batch number of the fruit filling, the batch number of the oil in the pastry, and the batch number of the fruit pulp origin are used as node identifiers; The direction of the directed edge is determined according to the chronological order of the process flow timestamp and the logistics transfer timestamp; For multiple nodes with the same timestamp, establish parallel directed edges based on work order number, transit order number, and store code; Write the node identifier, the direction of the directed edge, the parallel directed edges, and the corresponding timestamp into the supply chain batch transmission chain.

3. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 1, characterized in that, The generation of a risk payload fingerprint for each batch identifier includes: The sugar content, pulp fiber length, and preservative addition status of the fruit filling were extracted from the fruit filling records. The peroxide value, melting point range, and fatty acid composition of the oil in the puff pastry were extracted from the oil record. The hot air temperature, baking time, and baking moisture loss rate were extracted from the baking records. Oxygen permeability, sealing pressure, and number of packaging material layers were extracted from the packaging records. Extract the duration of temperature exceeding the refrigeration range and the number of humidity fluctuations from the warehouse temperature and humidity records; The number of vibration peaks and the number of transfers were extracted from the transportation trajectory records. Extract the quantity and reason code for return / exchange from the sales return / exchange records; The fields are aligned to the same timeline according to the batch identifier, and missing fields are filled by forward filling with adjacent process fields in the same batch to form the risk load fingerprint.

4. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 1, characterized in that, The step of segmenting and mapping the risk load fingerprint of the upstream node to the downstream node according to the directed edge to generate the stage risk transmission quantity includes: Obtain the process type corresponding to the directed edge, wherein the process type includes mixing, frying, filling, shaping, baking, cooling, packaging, warehousing, transportation and sales; For each of the aforementioned process types, a pre-set transmission field mapping table is invoked. The transmission field mapping table specifies the field names involved in transmission in the upstream risk load fingerprint, the downstream receiving field names, and the transmission direction. According to the transmission field mapping table, the upstream node field value is divided into multiple segment values ​​based on the dwell time on the directed edge, the environmental exposure area, and the contact material barrier level. The multiple segment values ​​are written into the receiving field of the downstream node, and the upstream node identifier and the process type are retained as source markers to generate the stage risk transmission amount.

5. The deep learning-based risk assessment method for pineapple cake food supply chain according to claim 1, characterized in that, The process of coupling the stage risk transmission quantity with the corresponding node's process condition field to form a risk coupling state includes: Extract the process condition fields of the corresponding nodes. The process condition fields include the temperature of the frying pan, the moisture content of the filling, the number of hot air circulations in the baking, the dew point of the cooling tunnel, the cleanliness of the packaging workshop, the frequency of opening the cold storage door, and the pre-cooling status of the transport vehicle. Match the source marker of the stage risk transmission amount with the process type of the process condition field; Based on the matching results, the stage risk transmission volume is broken down into raw material-related components, processing-related components, and logistics-related components. Write the raw material associated component into the raw material influence bit, write the processing associated component into the processing influence bit, and write the logistics associated component into the logistics influence bit; When multiple source tags exist for the same node, they are merged according to the batch number of source tags to form the aforementioned risk coupling state.

6. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 1, characterized in that, The step of identifying convergence nodes and branching nodes in the supply chain batch transmission chain based on the risk coupling state and generating risk aggregation paths includes: Count the number of incoming and outgoing edges for each node in the supply chain batch transfer chain; Nodes with more incoming edges than outgoing edges are marked as convergence nodes, and nodes with more outgoing edges than incoming edges are marked as branching nodes. Extract the source marker and receiving field from the risk coupling state corresponding to each incoming edge of the aggregation node; If multiple incoming edge source markers point to the same raw material batch, then the aggregation node and the corresponding incoming edge are combined to form a raw material aggregation segment; If multiple incoming edge source markers point to the same transport order, they form a logistics aggregation segment; Extract the store codes reached by each outgoing edge from the forked node, and form a store distribution segment by outgoing edges that share the same convergence node. The raw material aggregation segment, the logistics aggregation segment, and the store dispersion segment are connected in a directed edge direction to generate the risk aggregation path.

7. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 1, characterized in that, The process of determining the risk level and risk responsibility links in the pineapple cake supply chain based on the risk aggregation path includes: Extract the receiving field, source marker, and process condition field from the risk coupling state of each node along the risk aggregation path; According to the pre-set pineapple cake risk field sequence table, the receiving fields are divided into microbial risk fields, oxidation risk fields, moisture migration risk fields and mechanical damage risk fields; Count the number of consecutive nodes where various risk fields appear in the risk aggregation path; The risk level is determined based on the risk field category with the highest number of consecutive nodes. The process type and batch identifier corresponding to the consecutive nodes are identified as the risk responsibility links; Generate a risk assessment result that includes the risk level and the risk responsibility link.

8. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 1, characterized in that, The process of determining the risk level and risk responsibility links in the pineapple cake supply chain and outputting this information to the supply chain management terminal includes: Based on the aforementioned risk responsibility process, a corresponding batch identifier disposal instruction field is generated. The disposal instruction field includes suspending outbound shipment, prioritizing sales, rework and re-inspection, changing packaging, and adjusting cold storage zoning. Obtain the current store inventory quantity and remaining shelf life from the supply chain management terminal; If the current store inventory exceeds the preset replenishment limit and the remaining shelf life is less than the preset short shelf life, then the outbound shipment will be suspended and written into the disposal instruction field. If the current store inventory is less than the preset replenishment limit and the remaining shelf life is greater than the preset short shelf life, then priority sales will be written into the disposal instruction field. The disposal instruction field, along with the risk level and the risk responsibility link, are encapsulated into a terminal message according to the batch identifier and sent to the supply chain management terminal.

9. The deep learning-based risk assessment method for pineapple cake food supply chain according to claim 1, characterized in that, The acquisition of multi-source batch records in the pineapple cake supply chain includes: Obtain the fruit filling record and the puff pastry oil record from the supplier portal; Obtain the baking record and the packaging record from the production execution system; The warehouse temperature and humidity records and the transportation trajectory records are obtained from the cold chain monitoring equipment. Retrieve the sales return and exchange records from the store's POS system; Extract the batch identifier, timestamp, location code, and field name for each record; Records are grouped according to the batch identifier, and records with adjacent timestamps under the same batch identifier are aligned by hour; For records with missing location codes, the missing location codes are filled in using the location codes of the previous delivery point on the same transport document; The grouped, aligned, and padded records are written into the multi-source batch record.

10. The pineapple cake food supply chain risk assessment method based on deep learning according to claim 6, characterized in that, The statistics on the number of incoming and outgoing edges for each node in the supply chain batch transfer chain include: Traverse the directed edges in the batch transfer chain of the supply chain and extract the start node identifier and end node identifier of each directed edge; An incoming edge count table is established based on the endpoint node identifier. For each directed edge traversed, the incoming edge count value corresponding to the endpoint node identifier is incremented. An outgoing edge count table is established based on the starting node identifier. For each directed edge traversed, the outgoing edge count value corresponding to the starting node identifier is incremented. Parallel directed edges generated at the same timestamp are respectively counted in the inbound edge count table and the outbound edge count table; The incoming edge count table and the outgoing edge count table are merged according to the node identifier to obtain the number of incoming edges and outgoing edges for each node.