Method and apparatus for determining compliance of a logistics route based on semantics
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
Smart Images

Figure CN122288533A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of supply chain digitization and product traceability, and in particular to a compliance method and apparatus for determining logistics routes based on semantics. Background Technology
[0002] In industries such as agricultural products, food, and beverages, product quality and safety are directly related to consumer health, market order, and corporate reputation. Therefore, these industries have extremely stringent requirements for product quality control and compliance. For large food manufacturers (such as coffee brands), their product supply chain involves multiple stages, including raw material warehousing, processing, packaging, storage, transportation, outbound delivery, and finally, end-user distribution. A complete product traceability system is needed to achieve transparency in the product flow path, controllability of product quality, and traceability of quality risks. Specifically, when product quality issues arise, the system needs to be able to accurately locate the batch to which the problematic product belongs, trace all processing stages and distribution nodes it has passed through, and then quickly complete the division of responsibility, risk isolation, and recall of problematic batches, minimizing the losses and negative impacts caused by quality problems.
[0003] Currently, mainstream end-to-end traceability systems in this field generally adopt RFID (Radio Frequency Identification) technology. This involves attaching RFID tags to products, packaging, or pallet units, and deploying RFID readers at key logistics nodes such as warehousing, outbound, sorting, loading / unloading, and quality inspection. This enables the automatic collection of unique product identification and distribution path information, thereby constructing a complete product trajectory on the traceability platform. To improve the standardization of event-level data and inter-system compatibility, some companies have introduced international standards such as EPCIS (Electronic Product Code Information Services) to standardize the expression of tag events.
[0004] However, the inventors have discovered at least the following problems in the prior art: Existing systems primarily rely on static compliance checks, which are ill-suited to handle the dynamic compliance demands of complex workflow scenarios and fail to promptly identify potential compliance risks. Furthermore, the comprehensiveness and real-time nature of data collection still have room for improvement, and insufficient data compatibility between different systems leads to gaps in the traceability chain, impacting accuracy and efficiency. In addition, existing systems require optimization in the accuracy of problematic batch location and the timeliness of risk isolation, making it difficult to fully meet the actual needs of large food manufacturers and stringent regulatory scenarios. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a compliance method and apparatus for determining logistics routes based on semantics. In multi-platform, multi-device, and multi-task scenarios, it performs standardized modeling and compliance judgment on tag event behavior. By dynamically identifying node types and completing node semantics through a large model, it achieves unified alignment of RFID events to standard path nodes, thereby improving the modeling capability, accuracy, and efficiency of compliance judgment of RFID path behavior in complex business scenarios.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for determining the compliance of logistics routes based on semantics is provided, comprising: Tag events from different systems are normalized to generate a standardized path structure; A standard task rule graph is constructed based on the standardized path structure. The compliance of the logistics route is determined based on the actual route and the standard task rule map.
[0007] According to one aspect of the present invention, normalizing tagged events from different systems to generate a standardized path structure includes: Read tag events from the different systems; Establish a rule base; Determine whether each tag event in the tag events matches the rule base; For tag events that match the rule base, the matched tag events are used as the standardized path structure; for tag events that do not match the rule base, a language construction model is used to complete the standardized path structure.
[0008] According to one aspect of the present invention, constructing a standard task rule graph based on the standardized path structure includes: Extract semantic units related to the labeled events from the standardized path structure as graph nodes to generate a node set; Establish an actual graph edge set among the tag event, the business nodes, task nodes, batch nodes, device nodes, location nodes, and time nodes through which the tag event passes; For each task type, a standard task rule graph is constructed, which includes the set of nodes and the set of graph edges.
[0009] According to one aspect of the present invention, determining the compliance of the actual logistics route based on the actual logistics route and the standard task rule map includes: For each tagged event, obtain the actual semantic graph and the standard task rule graph corresponding to the task type of the tagged event; Perform path structure difference analysis to identify abnormal structure information, and convert the abnormal structure information into natural language semantic fragments; Generate complete natural language based on the anomaly type of the abnormal structure information; The complete natural language is input into the inference model to perform semantic reasoning to determine the compliance of the logistics route.
[0010] According to one aspect of the present invention, it further includes: For non-compliant logistics routes, output the anomaly type, violation stage, and related explanatory text.
[0011] According to one aspect of the present invention, performing path structure difference analysis to identify abnormal structure information includes: The actual semantic graph and the standard task rule graph are aligned in time sequence to identify the abnormal structure information, wherein the abnormal structure information includes: jump behavior, loop behavior, unauthorized behavior, and repeated reading.
[0012] According to a second aspect of the present invention, an apparatus for determining the compliance of logistics routes based on semantics is provided, comprising: The path standardization module is used to normalize tagged events from different systems to generate a standardized path structure. A standard task rule graph construction module is used to construct a standard task rule graph based on the standardized path structure. The logistics route compliance determination module is used to determine the compliance of the logistics route based on the actual route and the standard task rule map.
[0013] According to a third aspect of the present invention, an electronic device for determining the compliance of logistics routes based on semantics is provided, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the compliance of logistics routes based on semantics in any of the above embodiments.
[0014] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method for determining the compliance of logistics routes based on semantics according to any of the above embodiments.
[0015] According to a fifth aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for determining compliance of logistics routes based on semantics according to any of the above embodiments.
[0016] One embodiment of the above invention has the following advantages or beneficial effects: In multi-platform, multi-device, and multi-task scenarios, standardized modeling and compliance judgment of tag event behavior are performed. By dynamically identifying node types and completing node semantics through a large model, unified alignment of RFID events to standard path nodes is achieved, thereby improving the modeling capability of RFID path behavior and the accuracy and efficiency of compliance judgment in complex business scenarios.
[0017] Furthermore, by proposing a standard path normalization mechanism that combines path rules and large-scale model completion, a language-based model is used to achieve node semantic recognition and context filling in scenarios where actual paths do not match the standardized path structure. This significantly enhances the completeness and generalization ability of path structure construction. In addition, a contextual association structure among "tag-node-task-role-device" is established to realize the structural expression and semantic abstraction of path behavior. This enables compliance judgment and causal explanation of complex path behaviors based on semantic differences, thereby improving intelligent compliance review capabilities in cross-platform, heterogeneous process, and dynamic regulatory scenarios.
[0018] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0019] The accompanying drawings are provided to better understand this application and do not constitute an undue limitation thereof. Wherein: Figure 1 This is a schematic diagram of the main process of a method for determining the compliance of logistics routes based on semantics according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the main process of normalizing logistics information reading events from different systems to generate a standardized path structure according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the main process of constructing a standard task rule graph based on a standardized path structure according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the main process for determining the compliance of the logistics route based on the actual route and the standard task rule map according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the main modules of a device for determining the compliance of logistics routes based on semantics according to an embodiment of the present invention; Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied; Figure 7This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0020] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application.
[0021] It should be noted that the information collection, gathering, updating, analysis, processing, use, transmission, and storage involved in the technical solution disclosed herein all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures will be taken regarding any potentially involved user personal information to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security. For example, after collecting potentially involved user personal information of quality inspectors or recipients, we will use technical means to de-identify the data.
[0022] Figure 1 This is a schematic diagram of the main flow of a method for determining the compliance of logistics routes based on semantics according to an embodiment of the present invention. Figure 1 As shown, the method for determining the compliance of logistics routes based on semantics mainly includes the following steps S101-S103.
[0023] Step S101 is a step of normalizing the tag events from different systems to generate a standardized path structure.
[0024] According to embodiments of the present invention, different systems include Manufacturing Execution System (MES), Warehouse Management System (WMS), and Transportation Management System (TMS) in the logistics process.
[0025] Specifically, MES (Manufacturing Execution System) is a subsystem for the production and processing stage, connecting production planning with on-site execution. It primarily records key information during product processing (e.g., processing time, process parameters, quality inspection results, operators, etc.), enabling visualization and controllability of the production process. It also collects tagged events from the processing stage (e.g., records related to raw material input, semi-finished product flow, and finished product output). WMS (Warehouse Management System) is a subsystem for managing the flow and storage of materials within the warehouse. It primarily records information on raw material or finished product inbound (e.g., inbound time, batch, quantity, storage location), outbound information (e.g., outbound time, recipient, outbound quantity), and warehouse operations (e.g., sorting, inventory, transfer), collecting tagged events from the warehousing stage. TMS (Transportation Management System) is a subsystem for managing the entire transportation process from the warehouse to the end user or the next node. It primarily plans transportation routes, schedules transportation vehicles, records transportation process information (e.g., transportation vehicles, carriers, transportation time, transit points, temperature and humidity, etc.), and collects tagged events from the transportation stage.
[0026] The following will refer to Figure 2 Detailed description of step S101.
[0027] Figure 2 This is a schematic diagram of the main process of step S101, according to an embodiment of the present invention, to normalize logistics information reading events from different systems to generate a standardized path structure. Figure 2 As shown, step S101 of the present invention, which normalizes logistics information reading events from different systems to generate a standardized path structure, mainly includes the following steps S201-S205.
[0028] like Figure 2 As shown, in step S201, tag events from different systems are read.
[0029] According to an embodiment of the present invention, the original tag reading event is collected. x i , . x i The attribute tags in the data represent: tag number, acquisition time, original device installation location identifier, reading device number, antenna number, tag movement direction (e.g., supported), and additional fields (e.g., signal strength, temperature, humidity, etc.). When the device is already bound to business context information, it can also acquire the task number. task id Batch number batch id Fields such as...
[0030] In step S202, a rule base is established.
[0031] According to embodiments of the present invention, heterogeneous tag events from the aforementioned different systems are subjected to field unification, node identification, and context completion. A standard path normalization method combining path rules and large model completion is adopted to map device number, location field, and task type into a unified standardized path structure, which is then stored in a rule base.
[0032] According to an embodiment of the present invention, the rule base includes a multi-field mapping table M and its extended fields, such as rule priority, validity period, version, confidence level, etc.
[0033] Specifically, the device ID, location field, task type, and node semantics of tagged events from different subsystems (e.g., MES, WMS, and TMS) are manually collected to create a multi-field mapping table. The multi-field mapping table M is as follows: .
[0034] in, It is the primary key for rule matching, and can be the device ID, a location field, or a combination of both. The device ID is obtained from the original tag read event. x i Based on the original identifier fields directly collected from the device side or the acquisition side, semantic normalization and business abstraction are performed on device numbers, location identifiers, task types, etc., from different subsystems (such as WMS, MES, TMS) through manual configuration or system maintenance. This maps the original fields from different systems and naming rules to fields with standard business node semantics. Furthermore, This indicates a unique identifier for a standard business node; Indicates the node type (e.g., "Inbound", "Quality Inspection", "Cold Chain Temporary Storage"). Indicates the semantic name of the node; Indicates the task type corresponding to the node (e.g., "cold chain processing", "automatic picking", etc.). Indicates the operational role that the equipment is expected to perform (e.g., "automated equipment", "quality inspector"). Standard semantic labels (e.g., "C305-Cold Chain Temporary Storage Center") are used for human-machine consensus expression and language model processing.
[0035] The multi-field mapping table M can be viewed as a normalized template table that integrates multi-source semantic mappings such as device rules, location rules, task rules, and permission rules. In this invention, the "multi-field mapping table" refers to the table used to map RFID raw read event fields, such as (reader number). d i = reader id Location field l i = location code (e.g., direction, task type) can be mapped to standard business node semantics. The set of rule mappings, where, It can be selected from the reader number. d i = reader id Location field l i = location code Or a combination of both; It can be determined based on the reader ID or location field. For example, the reader ID can be used to determine that the reader belongs to the "inbound" type. It can be determined based on the reader ID or location field. For example, it can be determined as an inbound scan based on the reader ID and location field. It can be determined based on the reader ID or location field. For example, automatic picking can be determined based on the reader ID and location field. It can be determined based on the reader number or location field. For example, it can be identified as an automated device based on the reader number and location field. It can be determined based on the reader number or location field. For example, based on the reader number and location field, it can be determined as cold chain warehouse A1.
[0036] In step S203, it is determined whether each tag event in the tag events matches the rule base.
[0037] For each tag event, based on d i and l i Match in the rule base.
[0038] According to embodiments of the present invention, it is not simply based on "the existence of the tag event in the rule base". d i and / or l i Instead of relying on matching, a configurable multi-key matching strategy is adopted to adapt to situations where the granularity of fields varies across different systems.
[0039] Matching decisions can be made at the following levels (in descending order of priority): (a) Exact match (strong match) using key combinations: When the rule base contains ( d i , l iIf an entry is used as the primary key and satisfies additional constraints (such as direction, antenna, business period, or warehouse scope), then the tag event is determined to match the rule base, and the corresponding standard node semantics are output. This type of match can be marked as a "stable mapping rule".
[0040] (b) Device key matching (second strongest match): when l i When missing or unstable, if it exists only as d i If the entry is a primary key, then the tag event is determined to match the rule base; if the same... d i For multiple node entries, it is necessary to perform disambiguation by combining the context (such as warehouse scope, nearest anchor point, task type) and select the one with the highest consistency.
[0041] (c) Position key matching (second strongest matching): when d i When equipment is replaced or different system serial numbers are inconsistent, it can be used l i It is used as the primary key for matching; similarly, if there are multiple candidates, the selection is made through contextual consistency constraints.
[0042] (d) Fuzzy / regular expression matching (optional extension): For cases where the location field has an encoding prefix or a regional level, Nengou supports prefix matching / regular expression matching (for example, multiple library location codes in the same region are unified into the same business node type). Such a match can be marked as "weak match".
[0043] Therefore, "rule base matching" is not a simple existence check, but rather a determination of whether a match is found based on the primary key type, matching level, and context constraints. When a match is found, a structured node is generated based on the tag event. t, node id , type, desc, source =rule base), and the tagged event is marked as a stable mapping rule, where t represents the time of the business occurrence corresponding to the structured node. node id This represents the unique number of the structured node. type Indicates the type of the structured node. desc This represents the semantic description information of the business node. source This indicates the source of the structured node's generation; if there is a no-match or multiple candidate conflicts in the match result, the subsequent large language model completion will be used to complete the semantics of the tag event.
[0044] If a tag event is determined to match the rule base, the method proceeds to step S204. In step S204, for tag events that match the rule base, the matched tag event is used as a standardized path structure.
[0045] If it is determined that the tag event does not match the rule base, the method proceeds to step S205. In step S205, for the tag event that does not match the rule base, a language construction model is used to complete it to generate a standardized path structure.
[0046] According to an embodiment of the present invention, all context fields of the tag event are extracted to form a field set. The field set may include: tag, business occurrence time, reader ID, location field, product type, task type, task ID, batch ID, batch type, direction, reading mode, etc. Furthermore, the previous valid node is extracted from the path of the tag event, for example, the type and time of the previous business node, for context enhancement in semantic judgment.
[0047] Different Prompt template types were constructed for different types of tag events to achieve semantic normalization and completion for missed tag events. For example, three types of models were designed: T sem , T desc and T classify .in, T sem A standard node identification type template is provided to guide the language model in determining the business node to which the current event belongs, as well as its number and type. T desc This is a template for node semantic completion types, used to complete missing fields or generate semantic tags (e.g., node type, node name, etc.). T classify The node is a point type classification template used to determine which type of operation node the current event belongs to (e.g., inbound / outbound / processing / quality inspection, etc.).
[0048] According to an embodiment of the present invention, when a tag event lacks a standard node number and the device location semantics are ambiguous, a trigger will be executed. T sem template, T sem The template is as follows: Template T sem ="tag{ tag id}At{ timestamp} by device { reader id} Read, position is '{ location code}'Task type is '{ task type}', the product is '{ prod type "Please determine which business node this tag event belongs to, and provide the node number and type." After filling in the extracted field set and the previous valid node, the Prompt construct is expressed as: "Tag r_203 was read by device D3 at 09:33, location is 'Cold Chain Outbound Door', task type is 'Outbound Task', product is 'Cold Chain Coffee'. Determine that this tag event belongs to the 'Outbound Node', node number is 'O1', and node type is 'Outbound'."
[0049] According to an embodiment of the present invention, when a tag event requires determining the node name, it can be triggered. T desc template, T desc The template is as follows: Template T desc ="tag{ tag id}At{ timestamp} by device { reader id} Read, position is '{ location code}'Task type is '{ task type}', the product is '{ prod type "Please determine the node name of this tag event." After filling in the extracted field set and the previous valid node, the Prompt construct is expressed as: "Tag r_203 was read by device D3 at 09:33, location is 'Cold Chain Outbound Door', task type is 'Outbound Task', product is 'Cold Chain Coffee'. Determine that the node name of this tag event is 'Coffee Outbound'."
[0050] According to an embodiment of the present invention, when it is necessary to classify tagged events, it can be triggered T classify template, T classify The template is as follows: Template T desc ="tag{ tag id}At{ timestamp} by device { reader id} Read, position is '{ location code}'Task type is '{ task type}', the product is '{ prod type "Please determine which type of operation node this tag event belongs to." After filling in the extracted field set and the previous valid node, the Prompt construct is expressed as: "Tag r_203 was read by device D3 at 09:33, location is 'Cold Chain Outbound Door', task type is 'Outbound Task', product is 'Cold Chain Coffee'. Determine that this tag event belongs to the 'Outbound' type."
[0051] You can build any type of Prompt template based on the fields or semantic categories that need to be completed. In addition, the template library supports custom extensions, allowing you to add templates for special scenarios (such as reverse logistics, abnormal returns, cold chain transfers, etc.) to improve the system's ability to handle boundary conditions.
[0052] After generating the Prompt construction, the Prompt is passed into the embedded language model. The embedded language model generates a structured result based on its semantic understanding ability and pre-training corpus. This structure will be completed in the label path and recorded as a candidate rule item in the rule candidate table.
[0053] The node structure output by the embedded language model is added to a standardized structure path according to unified fields to construct structured rule candidates. Rule candidates can be expressed as: ( d i , l i task type , prod type )→( node id , node type , node name The rule candidate can be recorded in the rule candidate table, with its source tagged as "language model," for manual review during rule maintenance, and supports path traceability and interpretable analysis. After manual review, the rule candidate can be recorded as a standardized path structure.
[0054] According to embodiments of this application, an exception type mapping dictionary can be pre-defined. Organized into a slotted template set based on "exception type + description structure," it covers common exception types such as missing nodes, path skipping, looping behavior, unauthorized operations, and repeated readings. Its main function is to serve as a semantic alignment layer between the rule layer and the large language model, mapping structured exception labels (such as missing...). node skip dege , ove permission(e.g., ...) are standardized natural language fragments used for prompt filling. It is a semantic support component preceding the prompt, used to unify exception expression, reduce prompt drift, and enhance system interpretability. Each exception type corresponds to one or more natural language templates, containing dynamic variable slots (e.g., label number, node name, jump length, timestamp, etc.) to facilitate the subsequent filling and generation of structured fields. This exception type mapping dictionary maintains a decoupled design from the Prompt template library, allowing for independent expansion or targeted optimization based on business scenarios according to user needs.
[0055] According to embodiments of this application, a fragment-level semantic description template is provided, which, unlike complete link reconstruction, is specifically used for structured semantic completion of local abnormal nodes, avoiding full link rewriting.
[0056] In the solution of this application embodiment, for boundary scenarios not covered by the rule base, a preset Prompt template construction mechanism is used to generate prompt words in combination with the tag event context, and submit them to the integrated large language model to complete node semantic recognition and field completion, and finally form a path node sequence with consistent structure and complete context.
[0057] Back Figure 1 Step 102 involves constructing a standard task rule graph based on a standardized path structure. The following will refer to... Figure 3 Step 102 is described in detail.
[0058] Figure 3 This is a schematic diagram of the main flow of step S102, which involves constructing a standard task rule graph based on a standardized path structure according to an embodiment of the present invention. Figure 3 As shown, step S102 of constructing a standard task rule graph based on a standardized path structure according to an embodiment of the present invention mainly includes the following steps S301-S303.
[0059] like Figure 3 As shown, in step S301, semantic units related to tag events are extracted from the standardized path structure as graph nodes to generate a node set. Based on the standardized path output in step S101, key semantic units related to tag path behavior are extracted as graph nodes to form a node set V. The tag itself is abstracted as a tag node, used to record the tag number and its start and end points in the path; key operational steps related to the business process are abstracted as business nodes, including at least a business node number, node type, and semantic description field; the time of the event is abstracted as a time node, used to support the subsequent construction of path temporal relationships; task or batch information is abstracted as task and batch nodes, used to represent the operational unit to which the current tag belongs; simultaneously, based on the read device number... reader id , location code , antenna id The mapping forms nodes, which are used to reconstruct the physical deployment location information.
[0060] In step S302, an actual graph edge set is established among the tag event, the business nodes, task nodes, batch nodes, device nodes, location nodes, and time nodes that the tag event passes through.
[0061] In the embodiments of this application, a behavioral path edge is established between the tag event and the business nodes through which the tag event passes, indicating that the tag passes through a certain business node at a certain point in time; a temporal edge (e.g., Node) is established between the business nodes in chronological order. t1 → Node t2 Task association edges are established between tag nodes and task / batch nodes (e.g., Tag → Task / Batch); perception source edges are established between business nodes and device / location nodes (e.g., Node → Device / Location); and time constraint edges are established between tags and time nodes (e.g., Tag → Time). Each edge has attributes such as "occurrence time, source method, and confidence level" for subsequent path reasoning or model-assisted analysis.
[0062] In step S303, for each task type, a standard task rule graph is constructed, which includes a set of nodes and a set of standard graph edges.
[0063] Based on master data or task template presets, corresponding standard path structures are established for various tasks (such as cold chain processing, automated sorting, and quality inspection processes), generating standard task rule graphs. Each graph corresponds to a standard path graph for a task type, including a node set V (i.e., standard business nodes) and a standard graph edge set (i.e., standard time-series edge set), additionally including rule information such as role permissions, task stage order, and operation methods. This graph serves as a path reference template for subsequent compliance judgments of logistics paths.
[0064] In the technical solution of this application embodiment, a multi-dimensional tag semantic graph is constructed. The tag semantic graph takes "tag-node-device-task-location" as the core entity structure. By extracting entities from the associated data of each link and carrying out multi-edge relationship modeling, a graph structure that supports context association, jump detection and interpretable reasoning is finally constructed, which provides reliable standardized task rule graph support for semantic reasoning to determine the compliance of logistics routes.
[0065] Back Figure 1Step 103 determines the compliance of the logistics route based on the actual path and standard task rule map. The following will refer to... Figure 4 Step 103 is described in detail.
[0066] Figure 4 This is a schematic diagram of the main process of step S103, which determines the compliance of a logistics route based on the actual route and standard task rule map according to an embodiment of the present invention. Figure 4 As shown, according to an embodiment of the present invention, step S103, which determines the compliance of a logistics route based on the actual route and the standard task rule map, mainly includes the following steps S401-S404.
[0067] like Figure 4 As shown, in step S401, for each tag event, an actual semantic graph and a standard task rule graph corresponding to the task type are obtained. The actual task rule graph corresponding to each task type is received from step S102 as the actual semantic graph of the path behavior. Simultaneously, based on the task type contained in the tag event, the standard task rule graph corresponding to that task type is automatically loaded as a reference object for path structure difference analysis. Furthermore, node sequences are extracted from both the actual task rule graph and the standard task rule graph, and the actual graph edge set and actual graph edge set are extracted, recording attributes such as edge time order, device source, and operation direction. Contextual content such as the target information, role constraints, and device type of the task currently being performed by the tag is simultaneously loaded for subsequent path structure difference analysis and semantic interpretation.
[0068] In step S402, path structure difference analysis is performed to identify abnormal structure information, and the abnormal structure information is converted into natural language semantic fragments.
[0069] First, the node sequences in the actual task rule graph are aligned with the node sequences in the standard task rule graph according to their event order. For example, the Longest Common Subsequence (LCS) algorithm can be used for comparison. The LCS algorithm can compute the maximum overlap between two node sequences in a time complexity of O(n×m) and explicitly output the differences. The result of the differences is decomposed into three parts: the set of matching nodes, the set of missing nodes (i.e., nodes that appear in the standard task rule graph but are missing in the actual task rule graph), and the set of inserted nodes (i.e., nodes that are extra in the actual task rule graph).
[0070] Alternatively, the Longest Common Substring (LCSS) algorithm can be used for alignment. LCS allows subsequences to be discontinuous, while LCSS requires them to be continuous. It calculates the longest continuous common substring between two sequences using dynamic programming, making it suitable for detecting "continuous and uninterrupted" task step alignment. LCSS is well-suited for scenarios requiring strict adherence to continuous task step alignment.
[0071] Then, each anomalous node is structurally labeled to record its timestamp, insertion position, and preceding and following nodes, providing a data foundation for subsequent semantic interpretation and graph annotation. Based on the node sequences in the actual task rule graph and the standard task rule graph, two graphs with edge-directed structures are constructed, and edge path links are extracted according to the time sequence. By traversing the structure and comparing the paths, structural anomalies are identified and classified into: skipping behavior, circling behavior, unauthorized behavior, and repeated reading, etc.
[0072] In the embodiments of this application, if there is a slave node Node i Jump directly to Node k However, in the node sequence of the standard task rule graph, there exists a defined necessary node Node between these two nodes. j If "Node" appears in the same path, it is considered a jump behavior. i → Node j → Node k "A circular structure exceeding the acceptable number of times defined in the business process is considered a skipping behavior. If each edge extracted from the node sequence in the actual task rule graph is associated with a reader..." id , task type Expected constraints on device roles role If there is a mismatch, it is considered unauthorized access. If a node in the node sequence of the actual task rule graph is read frequently by the same label more than the system-set threshold number of times, it is considered multiple repeated reads. All structural anomalies will be accompanied by structural description fields, such as "jump distance" and "violation of role", forming an anomaly event substructure.
[0073] In the embodiments of this application, the abnormal structural information (including missing nodes, inserted nodes, skip edges, and non-compliant equipment behavior) identified during the structural difference analysis stage is converted into natural language semantic fragments. For example, "Label r_203 missing node 'cold chain quality inspection point'", "jumping directly from 'temporary storage area' to 'loading area', skipping 1 necessary step", "Equipment D7 was operated by 'quality inspector', performed the warehousing task, and exhibited unauthorized behavior", etc., all fragments form a semantic set.
[0074] In step S403, complete natural language is generated based on the anomaly type of the anomaly structure information. In the embodiments of this application, the semantic set output in step S402 is used as input, and the corresponding template type in the Prompt template is dynamically matched with the current anomaly type, including: T sem A standard node identification type template is provided to guide the language model in determining the business node to which the current event belongs, as well as its number and type. T desc This is a template for node semantic completion, used to complete missing fields or generate semantic tags (e.g., node type, node name, etc.) to produce complete natural language. For example: "The path of tag r_203 is: 'Temporary Storage Area' → 'Loading Area'. The standard path should be: 'Temporary Storage Area' → 'Cold Chain Quality Inspection Point' → 'Loading Area'. The current path is missing the node 'Cold Chain Quality Inspection Point'. Please determine if this path is compliant and provide the reason."
[0075] In step S404, the complete natural language is input into the inference model to perform semantic reasoning to determine the compliance of the logistics route.
[0076] In the embodiments of this application, the complete natural language generated in step S403 is encapsulated according to the pre-defined structured input specifications of the language model. A structured text wrapping mechanism (such as JSON Prompt Wrapper or special delimiter templates) is used to add task type tags, example format definitions, and output structure templates before and after the Prompt, ensuring that the language model can recognize context boundaries and understand task intent.
[0077] Then, the encapsulated Prompt is input to the large language model inference interface for local deployment or integration. If the model is a fine-tuned version, context vectors specific to the task scenario (such as standard path graph encoding, operator role constraint embedding, etc.) are injected as implicit hints. The inference process adopts a single-turn inference (STI) strategy, where the model outputs a complete judgment result in one round of dialogue, avoiding context shifts caused by conversational state residue. The output results are parsed and standardized. In the embodiments of this application, the model's returned results are parsed, and different parsing methods can be used for different types of models. For example, if the model supports structured output (such as JSON or function-call format), it is directly mapped to a compliance judgment field set, including: compliance_result (compliance judgment), violation_type (violation type), anomaly_nodes (anomaly node list), and explanation (semantic explanation content); if the model output is pure natural language text, fields are extracted and standardized through a regular expression parser or hint constraint template to ensure that all output results can be called by subsequent modules of the program.
[0078] Then, a semantic consistency verification strategy is executed to check for any content in the model output that does not conform to the structural logic. For example, it checks whether abnormal nodes actually exist in the actual path graph and whether the violation type is consistent with the Prompt description. If errors or missing output are found, a fault-tolerant prompting mechanism (such as reconstructing the prompt and retrying) is used to supplement the reasoning, or the result is marked as "requiring manual review." The final structured output is archived together with the original Prompt to generate a semantic reasoning record structure. This structure includes complete input prompts, model version, timestamp, reasoning conclusion, and explanatory text. Additionally, a natural language explanation field is added to the structure for audit presentation and human-computer collaborative analysis.
[0079] For non-compliant logistics routes, output the anomaly type, violation stage, and related explanatory text.
[0080] Figure 5 This is a schematic diagram of the main modules of a device 500 for determining the compliance of logistics routes based on semantics according to an embodiment of the present invention. Figure 5 As shown, the device for determining the compliance of logistics routes based on semantics according to an embodiment of the present invention includes: a route standardization module 501, a standard task rule graph construction module 502, and a logistics route compliance determination module 503.
[0081] The path standardization module 501 is used to normalize logistics information read events from different systems to generate standardized path structures. The path standardization module reads tag events from different systems; establishes a rule base; determines whether each tag event matches the rule base; for tag events that match the rule base, the matched tag events are used as standardized path structures; for tag events that do not match the rule base, a language construction model is used to complete the process and generate standardized path structures.
[0082] The standard task rule graph construction module 502 is used to construct a standard task rule graph based on a standardized path structure. In this module, semantic units related to tagged events are extracted from the standardized path structure as graph nodes to generate a node set; a graph edge set is established among tagged events, business nodes traversed by the tagged events, task nodes, batch nodes, device nodes, location nodes, and time nodes; for each task type, a standard task rule graph is constructed, which includes both a node set and a graph edge set.
[0083] The logistics route compliance determination module 503 is used to determine the compliance of logistics routes based on actual routes and standard task rule graphs. In this module, semantic reasoning is performed based on the actual routes and standard task rule graphs to determine compliance. This includes: for each tagged event, obtaining the actual semantic graph and the standard task rule graph corresponding to the task type; performing route structure difference analysis to identify abnormal structure information and converting this information into natural language semantic fragments; generating complete natural language based on the anomaly type of the abnormal structure information; and inputting the complete natural language into the reasoning model to perform semantic reasoning to determine the compliance of the logistics route.
[0084] The technical solution of this invention can perform standardized modeling and compliance judgment of tag event behavior in multi-platform, multi-device and multi-task scenarios. By dynamically identifying node types and completing node semantics through a large model, it achieves unified alignment of RFID events to standard path nodes, thereby improving the modeling capability of RFID path behavior and the accuracy and efficiency of compliance judgment in complex business scenarios.
[0085] Figure 6 An exemplary system architecture 600 to which embodiments of the present invention can be applied is shown, including terminal devices 601, 602, 603, network 604, and server 605 (only an example).
[0086] Terminal devices 601, 602, and 603 can be various electronic devices with displays and support for web browsing, and have various communication client applications installed. Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc.
[0087] Network 604 is a medium used to provide a communication link between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0088] Server 605 can be a server that provides various services, such as a backend management server that performs path standardization, standard task rule graph construction, and logistics path compliance determination for users through terminal devices 601, 602, and 603. It should be noted that the method provided in this embodiment of the invention is generally executed by server 605, and correspondingly, the apparatus is generally located within server 605.
[0089] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0090] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0091] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0092] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0093] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0094] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0096] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor. For example, a processor can be described as follows: a path standardization unit for normalizing tag events from different systems to generate a standardized path structure; a standard task rule graph construction unit for constructing a standard task rule graph based on the standardized path structure; and a logistics path compliance determination unit for determining the compliance of logistics paths based on actual paths and the standard task rule graph. The names of these units do not necessarily constitute a limitation on the unit itself.
[0097] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to: Normalize logistics information reading events from different systems to generate standardized path structures; A standard task rule graph is constructed based on the standardized path structure. Based on the actual path and the standard task rule graph, semantic reasoning is performed to determine the compliance of the logistics path.
[0098] The technical solution of this invention can perform standardized modeling and compliance judgment of tag event behavior in multi-platform, multi-device and multi-task scenarios. By dynamically identifying node types and completing node semantics through a large model, it achieves unified alignment of RFID events to standard path nodes, thereby improving the modeling capability of RFID path behavior and the accuracy and efficiency of compliance judgment in complex business scenarios.
[0099] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for determining the compliance of logistics routes based on semantics, characterized in that, include: Tag events from different systems are normalized to generate a standardized path structure; A standard task rule graph is constructed based on the standardized path structure. The compliance of the actual logistics route is determined based on the actual logistics route and the standard task rule map.
2. The method according to claim 1, characterized in that, The normalization process for tag events from different systems to generate a standardized path structure includes: Read tag events from the different systems; Establish a rule base; Determine whether each tag event in the tag events matches the rule base; For tag events that match the rule base, the matched tag events are used as the standardized path structure; for tag events that do not match the rule base, a language construction model is used to complete the standardized path structure.
3. The method according to claim 2, characterized in that, The construction of a standard task rule graph based on the standardized path structure includes: Extract semantic units related to the labeled events from the standardized path structure as graph nodes to generate a node set; Establish an actual graph edge set among the tag event, the business nodes, task nodes, batch nodes, device nodes, location nodes, and time nodes through which the tag event passes; For each task type, a standard task rule graph is constructed, which includes the set of nodes and the set of standard graph edges.
4. The method according to claim 3, characterized in that, The determination of the compliance of the actual logistics route based on the actual logistics route and the standard task rule map includes: For each tagged event, obtain the actual semantic graph of the actual logistics path and the standard task rule graph corresponding to the task type of the tagged event; Perform path structure difference analysis to identify abnormal structure information, and convert the abnormal structure information into natural language semantic fragments; Generate complete natural language based on the anomaly type of the abnormal structure information; The complete natural language is input into the inference model to perform semantic reasoning to determine the compliance of the actual logistics route.
5. The method according to claim 4, characterized in that, Also includes: For actual logistics routes that are identified as non-compliant, output the anomaly type, violation stage, and related explanatory text.
6. The method according to claim 4, characterized in that, Path structure difference analysis to identify anomalous structure information includes: The actual semantic graph and the standard task rule graph are aligned in time sequence to identify the abnormal structure information, wherein the abnormal structure information includes: skipping behavior, circling behavior, unauthorized behavior, and repeated reading.
7. A device for determining the compliance of logistics routes based on semantics, characterized in that, include: The path standardization module is used to normalize tagged events from different systems to generate a standardized path structure. A standard task rule graph construction module is used to construct a standard task rule graph based on the standardized path structure. The logistics route compliance determination module is used to determine the compliance of the logistics route based on the actual route and the standard task rule map.
8. An electronic device for determining compliance of logistics routes based on semantics, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.