Java optimized order processing and logistics tracking method and system in e-commerce environment and related equipment

By inserting link data acquisition instructions into the order system of the Java Virtual Machine and using reinforcement learning agents to dynamically adjust the sampling frequency and instrumentation configuration, the flexibility and efficiency issues of link monitoring in the Java Virtual Machine environment are solved, and efficient link data acquisition and diagnosis are achieved.

CN121120183APending Publication Date: 2025-12-12孙雪丹
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511071346.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In order systems with Java Virtual Machine at their core, existing link monitoring solutions are insufficient to meet the requirements for real-time and refined diagnosis. Especially in high-concurrency or distributed deployment scenarios, traditional methods lack the ability to flexibly adjust the link sampling frequency and field content, resulting in uncontrollable system overhead and diagnostic blind spots.

Method used

By using bytecode enhancement methods, link data acquisition instructions are inserted into the order system of the Java Virtual Machine. Link state sequences are constructed and input into the reinforcement learning agent. The sampling frequency and instrumentation configuration are dynamically adjusted, and diagnostic action instructions are generated to optimize link monitoring.

Benefits of technology

It enables efficient collection of key data and dynamic adjustment of link monitoring strategies without interrupting business logic, adapting to dynamic changes in system behavior and avoiding the rigidity and uncontrollable performance overhead problems of traditional solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120183A_ABST
    Figure CN121120183A_ABST
Patent Text Reader

Abstract

The invention provides a Java optimized order processing and logistics tracking method and system in an e-commerce environment and related equipment. The method comprises the following steps: in an order system running in a Java virtual machine, inserting a link data acquisition instruction into a target type method for processing an order state, payment calling and logistics interaction based on a bytecode enhancement method; constructing data acquired in response to the link data acquisition instruction into a link state sequence consisting of a service identifier, a node position, time consumption and an abnormal identifier; inputting the link state sequence into a reinforcement learning agent with a preset state space and an action space, and outputting a diagnosis action instruction including exception reporting, sampling enhancement, node marking and instrumentation adjustment; adjusting the sampling frequency, the collection field and the instrumentation configuration of the link data collection instruction according to the diagnosis action instruction; and recording a link state sequence, a diagnosis action instruction and a system operation index, and updating strategy model parameters of the reinforcement learning agent according to the link state sequence, the diagnosis action instruction and the system operation index.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of computer information technology, in particular to an order processing and logistics tracking method for Java optimization in an e-commerce environment, an order processing and logistics tracking system for Java optimization in an e-commerce environment, an electronic device and a storage medium. BACKGROUND

[0002] With the continuous expansion of the transaction scale of e-commerce platforms, the order processing and logistics tracking system faces increasing challenges in stability, performance and observability. Especially in large order systems with Java virtual machine (JVM) as the core running environment, the service call link is complex, the state transition is frequent, and the call path evolves dynamically, making it difficult for traditional link monitoring solutions relying on log collection and static instrumentation to meet the needs of real-time and detailed diagnosis.

[0003] Existing technologies usually use middleware or proxy frameworks (such as Spring AOP, Agent plug-ins, etc.) to implement unified log recording or exception tracking, but such methods mostly use fixed templates to sample link events, lack flexibility in adjusting sampling frequency and field content for different nodes, and are prone to cause uncontrollable system overhead or diagnostic blind spots. In high-concurrency or distributed deployment scenarios, how to improve link observability, diagnostic granularity and plug-in strategy adaptation without introducing significant performance loss has become a problem to be solved.

[0004] On the other hand, although some platforms have introduced index-driven adaptive monitoring mechanisms, most solutions still rely on manual configuration or static rules, making it difficult to cope with the dynamic evolution characteristics of system behavior as business changes. Especially when it comes to key business paths such as order state processing, payment interface calls and logistics information synchronization, there is a lack of an intelligent diagnostic mechanism that can continuously learn and dynamically optimize link plug-in strategies, limiting further improvement in system stability and exception positioning efficiency.

[0005] It should be noted that the statements in the above background section are only used to provide background information related to the present application, and do not necessarily constitute the prior art. SUMMARY

[0006] To at least partially overcome the problems in the related art, the embodiments of the present disclosure provide an order processing and logistics tracking method for Java optimization in an e-commerce environment, an order processing and logistics tracking system for Java optimization in an e-commerce environment, an electronic device and a storage medium.

[0007] According to one aspect of the present disclosure, an order processing and logistics tracking method for Java optimization in an e-commerce environment is provided, comprising:

[0008] In an order system running in a Java virtual machine, a bytecode-based enhancement method is used to insert link data collection instructions for collecting call time, execution time consumption, input summary and exception identification into target class methods for processing order status, payment calling and logistics interaction;

[0009] Data collected in response to the link data collection instructions is constructed into a link status sequence composed of service identification, node location, time consumption and exception identification;

[0010] The link status sequence is input into a reinforcement learning agent with a preset state space and action space, and diagnostic action instructions including exception reporting, sampling enhancement, node marking and insertion adjustment are output;

[0011] The insertion control module adjusts the sampling frequency, collection field and insertion configuration of the link data collection instructions according to the diagnostic action instructions;

[0012] The link status sequence, the diagnostic action instructions and system running indicators are recorded, and the policy model parameters of the reinforcement learning agent are updated accordingly.

[0013] In an exemplary embodiment of the present disclosure, the bytecode-based enhancement method inserts link data collection instructions into target class methods, including:

[0014] Before the target class method is loaded, a class loading interception module identifies business methods containing order status changes, payment request processing and logistics status updates;

[0015] Based on the signature features and context dependency information of the identified business methods, a bytecode insertion engine injects pre- and post-collection points into the method body, the pre-collection point is used to record call time and input summary, and the post-collection point is used to record execution time consumption and exception identification;

[0016] Through an intermediate bytecode cache mechanism, the target class method after insertion is written to a temporary cache area and consistency verification is performed against the original class bytecode;

[0017] The target class method after insertion is loaded into the Java virtual machine running environment.

[0018] In an exemplary embodiment of the present disclosure, the data collected in response to the link data collection instructions is constructed into a link status sequence composed of service identification, node location, time consumption and exception identification, including:

[0019] Based on the original sampling events generated at each target class method based on the link data collection instructions, original meta-information containing the name of the method belonging to the service, the method path and the thread context identification is extracted;

[0020] The call link aggregation module concatenates the sampling events triggered successively in the same request context in chronological order, constructs the call link segments corresponding to the request, and generates a globally unique link tracking identifier for each segment;

[0021] For each node in the call link segment, the time consumption interval is parsed and it is judged whether it contains an abnormal signal or a timeout mark. The service identifier, node position index, time consumption value and abnormal identifier are integrated into a structured node state vector;

[0022] The node state vectors are arranged in turn according to the call order to construct a link state sequence that can be input to the reinforcement learning agent, and the timestamp is recorded.

[0023] In an exemplary embodiment of the present disclosure, the input of the link state sequence to the reinforcement learning agent with a preset state space and action space comprises:

[0024] Based on the service identifier and position index of each node in the link state sequence, a time sequence state input containing multiple rounds of context is constructed;

[0025] The call state coding module performs normalization preprocessing and time alignment on each node state vector, and maps the result to the state space of the reinforcement learning agent;

[0026] The reinforcement learning agent performs policy forward calculation on the current state input, and outputs a multi-dimensional action vector for indicating the sampling behavior of each node in the link;

[0027] The significant activation components in the multi-dimensional action vector are post-processed to generate a diagnostic action instruction set containing instruction fields such as abnormal reporting, node marking or sampling adjustment.

[0028] In an exemplary embodiment of the present disclosure, the generation of the diagnostic action instruction set containing instruction fields such as abnormal reporting, node marking or sampling adjustment comprises:

[0029] Extract the average abnormal rate of the current link state sequence in the last N rounds and the policy distribution entropy of the corresponding nodes;

[0030] Calculate the policy uncertainty index of each node, and mark the nodes with uncertainty higher than the preset threshold as attention nodes;

[0031] According to the execution time consumption, context position and abnormal frequency of the attention nodes, a sampling intensity factor is allocated to dynamically adjust the triggering frequency of the link data collection instruction;

[0032] The sampling intensity factor and node marking information are packaged as a sampling enhancement sub-instruction, which is part of the diagnostic action instruction and is issued to the plug-in control module.

[0033] In an example embodiment of the present disclosure, the step of adjusting the link data collection instruction by the call-instrumentation control module comprises:

[0034] The node identifier, adjustment type and target sampling parameter in the diagnostic action instruction are parsed and mapped into an instrumentation configuration request for the corresponding target class method;

[0035] The runtime instrumentation management interface is called, and for the node identified as a sampling frequency adjustment, a dynamic sampling interval is calculated based on the current system load index and event density, and a judgment statement for rate limiting is injected;

[0036] For a collection field adjustment request, the reachable path of the corresponding input parameter, context variable or exception stack information in the target method body is determined through a field access tracking mechanism, and the collection field list is updated accordingly;

[0037] The configuration items of the sampling frequency, collection field and instrumentation start-stop state are written into the instrumentation configuration registry, and the target class is incrementally replaced through a hot-reloading mechanism to realize online evolution of the link data collection strategy.

[0038] In an example embodiment of the present disclosure, the step of updating the policy model parameters of the reinforcement learning agent comprises:

[0039] In each round of link collection and diagnosis process, a joint observation sample containing the link state sequence, corresponding diagnostic action instruction, execution timestamp and node-level system index is constructed;

[0040] The joint observation sample is cached in a distributed training buffer, and the sampling quality is scored by a policy effectiveness evaluation module to eliminate duplicate links, empty samples or low return samples;

[0041] Periodically sample high-value samples from the buffer to form a small batch training set, input to the policy optimization engine, and calculate the gradient and update the policy model parameters through the reinforcement learning algorithm.

[0042] According to an aspect of the present disclosure, an order processing and logistics tracking system for Java optimization in an e-commerce environment is provided, comprising:

[0043] An instruction insertion module is configured to insert link data collection instructions for collecting call time, execution time, input summary and exception identifier into target class methods for processing order status, payment call and logistics interaction based on bytecode enhancement methods in an order system running on a Java virtual machine;

[0044] a data integration module configured to construct data collected in response to the link data collection instruction into a link state sequence composed of a service identifier, a node location, a time consumption, and an exception identifier;

[0045] an agent calling module configured to input the link state sequence into a reinforcement learning agent having a preset state space and action space, and output a diagnostic action instruction including an exception reporting, a sampling enhancement, a node marking, and a probe adjustment;

[0046] a probe control module configured to adjust a sampling frequency, a collection field, and a probe configuration of the link data collection instruction according to the diagnostic action instruction;

[0047] a model updating module configured to record the link state sequence, the diagnostic action instruction, and a system running index, and update a policy model parameter of the reinforcement learning agent according to the system running index.

[0048] According to an aspect of the present disclosure, an electronic device is provided, comprising:

[0049] a processor; and

[0050] a memory configured to store executable instructions of the processor;

[0051] wherein the processor is configured to execute any of the above-mentioned methods by executing the executable instructions.

[0052] According to an aspect of the present disclosure, a computer readable storage medium is provided, which stores a computer object program, and the computer object program is executed by a processor to implement any of the above-mentioned methods.

[0053] The technical solutions provided by the embodiments of the present disclosure can have the following beneficial effects:

[0054] In the order processing and logistics tracking method for Java optimization in an e-commerce environment in the exemplary embodiments of the present application, the link data collection instruction is embedded into the key business method through bytecode enhancement, which can collect the execution characteristic data closely related to the system behavior without interrupting the original business logic, and form a high-fidelity link event basis. The timestamp, time consumption, summary and exception information collected are parsed, aggregated and structured modeled, and are uniformly expressed as a link state sequence, which not only reproduces the call path, but also retains the local performance of each node in the context. The reinforcement learning agent uses the above state sequence as the input of policy evaluation, and outputs the targeted diagnostic action instruction according to the current policy in each cycle, including sampling frequency enhancement, field adjustment, node marking and exception reporting. In addition, unlike the traditional scheme which fixes the sampling strategy as a rule table, the present scheme enables the sampling decision to have the ability to continuously update as the system behavior evolves. Further, the action instruction generated by the agent is sent to the instrumentation control module, which directly drives the runtime to dynamically adjust the link collection behavior, including changing the sampling condition, enabling the field and starting and stopping the instrumentation site, realizing the response loop of the strategy decision layer to the data source regulation layer. During system operation, the link state, diagnostic instruction and running index together constitute the feedback signal, which is written into the experience buffer for periodic training of the agent, so that it gradually learns the optimal instrumentation adjustment strategy after multiple rounds of sampling and evaluation, and adapts to the dynamic changes of different business traffic, call paths and exception patterns. Further, the exemplary embodiments of the present application avoid the problems of rigidity, insufficient coverage and uncontrollable performance overhead of link data collection in the traditional scheme.

[0055] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0056] The drawings herein are incorporated into the specification and form part of the specification, show embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.

[0057] Figure 1 A system architecture diagram of the order processing and logistics tracking method for Java optimization in an e-commerce environment is shown, to which the embodiments of the present disclosure can be applied.

[0058] Figure 2 A flowchart of the order processing and logistics tracking method for Java optimization in an e-commerce environment in the embodiments of the present disclosure is shown.

[0059] Figure 3A schematic diagram of a Java-optimized order processing and logistics tracking system in an e-commerce environment is shown.

[0060] Figure 4 A structural schematic diagram of an electronic device suitable for implementing embodiments of the present disclosure is shown.

[0061] In the drawings, identical or corresponding reference signs indicate identical or corresponding parts. DETAILED DESCRIPTION

[0062] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in this specification, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0063] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these

[0064] Figure 1 A system architecture schematic diagram of a Java-optimized order processing and logistics tracking method in an e-commerce environment is shown.

[0065] As Figure 1 shown, the system architecture 100 can include one or more of terminal devices, such as a smartphone 101, a portable computer 102, a desktop computer 103, a network 104, and a server 105. The network 104 is a medium to provide a communication link between the terminal devices and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0066] It should be understood that the number of terminal devices, networks, and servers in the system architecture 100 is merely illustrative. Any number of terminal devices, networks, and servers can be provided according to implementation needs. For example, the server 105 can be a server cluster composed of multiple servers. Figure 1

[0067] ​The order processing and logistics tracking method for Java optimization in an e-commerce environment provided by the embodiments of the present disclosure can be executed by a terminal device, and accordingly, the order processing and logistics tracking system for Java optimization in an e-commerce environment can be arranged in the terminal device. However, it is easy for those skilled in the art to understand that the order processing and logistics tracking method for Java optimization in an e-commerce environment provided by the embodiments of the present disclosure can also be executed by a server 105, and accordingly, the order processing and logistics tracking system for Java optimization in an e-commerce environment can also be arranged in the server 105, which is not specially limited in the present exemplary embodiment.

[0068] The embodiments of the present disclosure first provide an order processing and logistics tracking method for Java optimization in an e-commerce environment. The method will be described below by taking a server as an example.

[0069] Figure 2 A flowchart of an order processing and logistics tracking method for Java optimization in an e-commerce environment in the embodiments of the present disclosure is schematically shown. As shown in the figure, the method can include steps S210 to S250: Figure 2

[0070] In step S210, based on a bytecode enhancement method, link data collection instructions for collecting call time, execution time consumption, input summary and exception identification are inserted into target class methods for processing order status, payment calling and logistics interaction in an order system running in a Java virtual machine.

[0071] In step S220, data collected in response to the link data collection instructions is constructed into a link state sequence composed of service identification, node position, time consumption and exception identification.

[0072] In step S230, the link state sequence is input into a reinforcement learning agent with a preset state space and action space, and diagnostic action instructions including exception reporting, sampling enhancement, node marking and insertion adjustment are output.

[0073] In step S240, a plug-in control module adjusts the sampling frequency, collection field and plug-in configuration of the link data collection instructions according to the diagnostic action instructions.

[0074] In step S250, the link state sequence, the diagnostic action instructions and system running indicators are recorded, and the policy model parameters of the reinforcement learning agent are updated accordingly.

[0075] The order processing and logistics tracking method for Java optimization in an e-commerce environment in the present exemplary embodiment will be described in detail below.

[0076] ​In step S210, in the order system running in the Java virtual machine, based on the bytecode enhancement method, link data collection instructions for collecting calling time, execution time, input summary and exception identification are inserted into the target class method for processing order state, payment calling and logistics interaction.

[0077] In the example embodiment, to achieve non-intrusive performance monitoring and exception capture of the order system key business link, first, a bytecode enhancement method is introduced in the order system running in the Java virtual machine, and based on this, a patching operation is completed on the target class method for processing order state, payment calling and logistics interaction. The patching operation is embedded in the form of link data collection instructions in the business method, which is used to collect running indicators including calling time, execution time, input summary and exception identification. The insertion process includes four stages of target method identification, collection point injection, bytecode consistency processing and loading into the JVM running environment. For example, each stage can be specifically as follows:

[0078] Before the target class method is loaded, the system pre-processes the class to be loaded by the JVM through the class loading interception module. The class loading interception module can be built based on Java Instrumentation API, and the basic principle is to hang a custom ClassFileTransformer before the class loader performs defineClass or loadClass operation, intercept the bytecode stream and perform specific processing logic. In this embodiment, the processing logic is used to identify the method body containing the behaviors of "order state change", "payment request processing" and "logistics state update". The identification of the above behaviors is not only dependent on the literal matching of the method name, but also based on the multi-dimensional combination judgment of the method signature, parameter structure, package path and context class inheritance relationship. For example, for the order state change method, not only the method named updateStatus() is identified, but also the function body that accepts order state enumeration parameters, operates order database fields and is located in a specific business package path. Such method characteristics can be predefined as a rule set, which is automatically identified and marked as a patching target through a matching mechanism during class loading.

[0079] After the target method identification is completed, a bytecode instrumentation engine is called to perform enhancement processing on the method body. The bytecode instrumentation engine can be implemented based on the ASM framework or Javassist, and its core function is to inject a pre-collection point and a post-collection point at the beginning and end of the method body respectively without destroying the original logical structure. The pre-collection point is used to record the call time and input digest. Specifically, a current timestamp capture logic (such as calling System.nanoTime()) is inserted at the method entry, and the method input digest value is calculated by combining the parameter deserialization operation. This digest value can be obtained by concatenating the field level of the parameter object and calculating the hash code, or the key parameters can be extracted based on the user annotated annotation field to generate the digest. To improve the efficiency and context relevance of the digest calculation, the parameter digest can also be mixed with thread ID, request ID or RPC call chain context data for hybrid coding.

[0080] The post-collection point is used to record the execution time and exception identification at the end of the method execution. In the normal return path, a time consumption calculation statement is injected at the end of the method, which is based on the time difference between the entry recorded timestamp and the current time. In the exception path, a try-catch-finally structure is inserted to capture unhandled exceptions and record the exception class name and stack information digest as the exception identification field. The above insertion operation needs to ensure that there is no semantic conflict with the original method logic, so the instrumentation engine needs to perform static analysis on the method body control flow before insertion to ensure that the collection point is not located in the jump instruction block or overlaps with the resource release operation. If the original method already contains exception handling logic, a supplementary collection statement is inserted in the outer encapsulation nested structure to avoid repeated capture or logic bypass.

[0081] After the collection point injection is completed, the instrumentation engine outputs the enhanced bytecode to an intermediate bytecode cache mechanism for temporary storage and verification. The cache mechanism can be based on local memory mapping cache or temporary file structure, and its functions include receiving the instrumented bytecode, saving the mapping relationship and original class name, and performing consistency verification operation. Consistency verification includes legality verification of bytecode structure (such as using CheckClassAdapter to detect whether the class structure conforms to the JVM specification), method stack frame and local variable table matching verification, and bytecode instruction logic closure analysis. If the verification fails, the current instrumentation result is discarded and the original bytecode is loaded to ensure system stability.

[0082] When the instrumented target class method is verified, the class loader loads it into the Java virtual machine running environment to replace the original non-instrumented version. This process can be achieved through the retransform mechanism of JavaInstrumentation Agent, so that the target class can be enhanced online without restarting the system. At runtime, the instrumented version of the target class has the ability to collect link data, and the inserted collection points will be automatically triggered at each method call, and the collected results will be submitted to the subsequent link sequence construction and agent policy generation module.

[0083] In step S220, the data collected in response to the link data collection instruction is constructed into a link state sequence composed of service identification, node position, time consumption and exception identification.

[0084] In the example embodiment, in order to realize the structural modeling of the collected link running data, so as to be input to the reinforcement learning agent for adaptive instrumented decision-making, the link state sequence construction operation is performed. The construction operation takes the original sampling event generated by the link data collection instruction as input, and sequentially completes the meta-information extraction, context aggregation, node state extraction and serialization modeling, etc. Processing flow, to ensure that the final link state sequence has service identification, node position, time consumption and exception identification, etc. Key fields, and preserves the original call order and time semantics. For example, step S220 can specifically include:

[0085] After the sampling event is triggered and generated by the link collection instruction, the meta-information extraction is first performed in the example embodiment. Each sampling event is triggered independently at the pre-instrumented and post-instrumented points of the target class method, the pre-instrumented event records the method call time and input summary, and the post-instrumented event records the return time and exception signal. To realize the association between events and call chains, a set of original meta-information with business and running environment semantics is extracted from the event, which can include the service name of the method, the complete path of the method in the engineering structure, and the thread context identification. The service name is obtained by mapping the package path and registration configuration of the class, the method path is identified by the class name and method signature, and the thread context identification includes thread ID, thread name, call stack summary, and possibly trace-id, span-id, etc. Field in RPC call header.

[0086] After the meta-information extraction is completed, the example embodiment calls a link aggregation module to merge the original events to form a logically continuous link segment. The link aggregation module is based on the trace-id and thread identification in the request context, and splices multiple sampling events that occur within a time window according to the occurrence time and method call order. In the aggregation process, to avoid the cross-linking of different threads due to the coincidence of trace-id, a multi-dimensional aggregation key can be used, that is, the trace-id and thread ID are combined to identify a unique link track. When the aggregation module performs sequence reconstruction, the events are sorted according to the call timestamp in the events, and the method stack-in and stack-out relationship is verified to eliminate isolated events or nodes interrupted by abnormal calls. For each completed link segment, the example embodiment generates a globally unique link tracking identifier, which can use a UUID generation strategy or be compressed by Hash based on the trace-id and starting timestamp, to facilitate the establishment of link mapping relationships in subsequent training samples.

[0087] After obtaining the complete link segment, the example embodiment further performs state analysis and structured modeling on each link node. Each node represents a specific method call, and its state includes four key fields: service identification, node position index in the call sequence, execution time consumption, and exception identification. The service identification is the logical marker of the service to which the method belongs, which is used to distinguish the source in multi-module deployment; the node position index is generated by call order coding to ensure that different level methods in the link can be mapped to a one-dimensional vector input; the time consumption field is directly calculated based on the call time difference recorded in the post-sampling event, and is normalized to improve the numerical stability of the model input; the exception identification field is determined by the runtime exception throwing condition, if the sampling event contains an uncaught exception, or the return status code indicates a business exception, the node exception flag field is set to 1, otherwise it is 0. In addition, to support exception type differentiation, the example embodiment can also record the exception type ID or the summary hash of the exception stack, which is used for subsequent exception pattern learning in modeling.

[0088] After the node state vector is parsed, the example embodiment arranges all node state vectors in sequence according to the call order, constructs a link state sequence, and records the corresponding timestamp information for subsequent time series modeling. The timestamp is used to record the start time of the link, the relative time or absolute time of each node, and the specific format can use UNIX timestamp, business cycle offset, or request window number.

[0089] In step S230, the link state sequence is input to a reinforcement learning agent with a preset state space and action space, and the diagnostic action instructions including exception reporting, sampling enhancement, node labeling, and probe adjustment are output.

[0090] In the example embodiment, the constructed link state sequence is input into a reinforcement learning agent with a preset state space and action space to generate a set of diagnostic action instructions for the current link execution situation. The process consists of multiple stages such as state expression, encoding processing, policy inference, action extraction, and parameter calculation. For example, each stage can be specifically as follows:

[0091] In the state expression stage, the example embodiment takes the link state sequence as input, where each node state contains service identification, call order index, execution time consumption, exception identification, and relative timestamp, etc. core fields, defined as follows:

[0092]

[0093] Where svc (i) represents service identification encoding, pos (i) represents the order index of the node in the link; d (i) is the normalized execution time consumption, e (i) ∈{0,1} is the exception identification; δt (i) is the time offset of the node relative to the start time of the link.

[0094] In order to enhance the modeling ability of the model to the context dependence, the example embodiment introduces the near K historical link state sequence to form an extended state window when constructing the input:

[0095]

[0096] The window can be maintained through a sliding mechanism, so that each model inference contains recent link behavior, which facilitates the mining of periodic abnormalities or link load change trends.

[0097] In the state encoding stage, the example embodiment calls the state encoding module to perform normalization and alignment processing on each node state vector in the above-mentioned state window. The normalization operation performs standard scaling on continuous value fields according to historical statistical mean and standard deviation. Specifically, the standardization expression of the time consumption field is:

[0098]

[0099] Where μ d , σ d represent the mean and standard deviation of the time consumption, respectively, and ∈ is a small positive number to prevent division by zero. The exception identification e (i) remains the original Boolean value, and the time offset field δt (i) also performs normalization to ensure that the model has the ability to perceive different link execution rhythms.

[0100] After encoding, all node states are packed into a unified tensor format as the input tensor of the policy network where n is the number of nodes and d is the dimension of each state vector.

[0101] In the present example embodiment, the policy inference stage is completed by a reinforcement learning agent, whose internal structure consists of a policy network and a value function network. The policy network is responsible for outputting the action distribution probability of each node according to the current state tensor, which can be formally expressed as:

[0102]

[0103] where W (1) ,W (2) ,b (1) ,b (2) are network weights and bias parameters, and σ(·) is an activation function, commonly ReLU or Tanh function.

[0104] The value function network outputs the expected cumulative return V φ (S t ) of the current state, which is used for policy update in the training stage. The output dimension of the policy network is equal to the size of the action space, covering multiple action types such as "keep unchanged", "increase sampling rate", "decrease sampling rate", "label node", "trigger abnormal report", etc. Each type of action is represented by an integer ID, and the final policy action of the current node is indicated by the category with the maximum output probability.

[0105] In the action extraction stage, the present example embodiment performs filtering and significance detection on all node action outputs. First, the action entropy of each node is calculated:

[0106]

[0107] where m is the number of action categories. The higher the entropy value, the greater the uncertainty of the node policy, indicating that the current model policy has not yet formed a stable preference. If the action probability distribution of a certain node presents a high peak state, i.e., there is one probability much higher than other actions, then the action is considered to be a significant activation action.

[0108] Further, the following threshold rules are used in the present example embodiment to determine whether to include a node in the "focus node set":

[0109]

[0110] where τ H and τ P are the entropy threshold and activation probability threshold, respectively, which are dynamically adjusted by the model training process.

[0111] For each node in the set of nodes of interest, the sampling enhancement factor is also calculated in the example embodiment according to its current state:

[0112]

[0113] wherein the three terms respectively reflect the response latency, anomaly risk and policy uncertainty of the node, λ1, λ2, λ3 are weighting coefficients for adjusting the different emphases of the system on latency control, anomaly capture or policy stability. The factor α (i) ∈ [0, 1] is mapped to the actual sampling frequency multiplication factor through a linear or nonlinear function:

[0114] r (i) = r0·(1+γ·α (i) )

[0115] wherein r0 is the default sampling frequency, γ is a tunable gain coefficient for controlling the upper limit of the instrumentation density.

[0116] Finally, the example embodiment integrates the node identification, action type, sampling enhancement factor and flag label into a structured diagnostic action instruction, and the format of each instruction is:

[0117] Instr (i) = <node_id, a (i) , r (i) , flag>

[0118] wherein node_id is the link node identifier, a (i) is the selected action, r (i) is the sampling adjustment multiplier, and flag is an additional control field (such as “immediate effect”, “anomaly freeze”, “low overhead flag”, etc.).

[0119] In step S240, the instrumentation control module is called to adjust the sampling frequency, collection field and instrumentation configuration of the link data collection instruction according to the diagnostic action instruction.

[0120] In the example embodiment, the instrumentation control module is called to dynamically adjust the sampling frequency, collection field and instrumentation configuration of the link data collection instruction running in the Java virtual machine in response to the diagnostic action instruction output by the reinforcement learning agent. In the example embodiment, step S240 can include:

[0121] In the initial stage, the example embodiment performs structured parsing on the diagnostic action instruction set from the agent. Each instruction contains fields such as node identification, adjustment type, target sampling parameter, and additional control markers. The example embodiment first locates the corresponding class method description information in the running state target class mapping table according to the node identification, which specifically includes the class fully qualified name, method signature, injection point position, and the corresponding collection link. On this basis, the example embodiment parses the sampling frequency adjustment request, field change request, or stub start-stop request according to the adjustment type field, and encapsulates it as a stub configuration request entity.

[0122] In the sampling frequency adjustment path, the example embodiment calls the runtime stub management interface to inject dynamic rate limiting logic into the target node. First, the example embodiment jointly calculates the acceptable minimum sampling period Δt min based on the global load information of the system running state (such as CPU occupancy, average response time, memory occupancy, etc.) and the current sampling event density (the number of sampling events per unit time).

[0123]

[0124] Where Δt base is the lower limit of the sampling frequency, C load is the comprehensive load index, ρ is the event density per unit time, and δ is the anti-oscillation control item.

[0125] The example embodiment inserts this adjustment period as a rate control parameter into the pre-collection point logic of the target class method, specifically by adding a timestamp judgment statement. Only when the difference between the last trigger time and the current time is greater than the period, the sampling operation is performed, thereby reducing the system overhead caused by redundant sampling while ensuring the observability of the key node.

[0126] In the collection field adjustment path, the example embodiment adjusts the request for field access in the instruction according to the field to call the field access tracking mechanism, and performs static path traversal and reachability verification on the local variables and context reference objects in the target method body. The example embodiment first parses the logical name of the target field, and generates an abstract syntax tree (AST) representation according to the method structure. Then, through symbolic execution and data flow analysis, the reachable path containing the field is found, such as the nested attribute in the input parameter object, the ThreadLocal variable in the call context, the stack information of the exception object thrown in the exception handling block, etc. If the path has multiple-hop references or reflective access, the example embodiment will insert field access chain expansion logic to recursively call the getter method of the intermediate object or access the nested field through the field offset operation at runtime. For example, for the field path request.getUser().getRoleId(), the example embodiment automatically identifies and generates the corresponding getter call chain; if an inner class or anonymous class is involved, the example embodiment uses the ASM framework to directly insert the bytecode reading instruction for the field offset.

[0127] To ensure that the instrumentation configuration takes effect immediately at runtime and does not interfere with the existing class loading structure, the example embodiment writes the above sampling frequency and collection field configuration items into the instrumentation configuration registry. The registry is a thread-safe memory structure that maintains the mapping relationship between the target class method and its instrumentation configuration. Each configuration update is accompanied by a version number change mark, and the update timestamp is recorded to support configuration rollback and cache consistency refresh. After the registry is updated, the example embodiment performs an incremental replacement operation on the target class through a hot reloading mechanism; specifically, the mechanism reloads the class definition of the modified bytecode based on the retransformClasses() method of the Instrumentation API or by unloading and reloading the target class through a custom class loader. To ensure compatibility, the example embodiment performs bytecode legality verification before performing class replacement, including local variable table integrity, stack frame balance, and control flow graph loop analysis, and inserts NOP padding instructions to repair structural misalignment.

[0128] The instrumentation control module in the example embodiment supports both node-level granularity adjustment and module-level or service-level sampling strategy reuse. By introducing a namespace field and inheritance mark in the configuration registry, the example embodiment can implement a sampling frequency inheritance relationship among multiple target classes to reduce the burden of repeated configuration. The replacement operation supports incremental field updates, that is, only the instruction area dependent on the collection point is replaced without interfering with the method body logic. The example embodiment can also generate an update log and an instrumentation snapshot for each instrumentation update and store it in the operation audit module for backtracking analysis and model training data labeling.

[0129] In step S250, the link state sequence, the diagnostic action command, and the system operation indicators are recorded, and the policy model parameters of the reinforcement learning agent are updated accordingly. In this example embodiment, step S250 may include:

[0130] In each cycle of data acquisition and diagnostic execution, this example implementation uses three types of information—link state sequence, diagnostic action instructions, and system operation metrics—as the core to construct joint observation samples. The link state sequence records node-level call information generated by the instrumentation acquisition mechanism, including features such as service identifier, location index, standardized latency, anomaly identifier, and time offset. The diagnostic action instruction field corresponds to the current policy network's control behavior for the link's output, typically represented by an action ID and sampling intensity parameter encoding. System operation metrics contain key performance data during execution, such as link processing latency, node hit rate, error rate, JVM memory usage, system load, and thread wait time. These metrics can be obtained by calling JMX interfaces or binding system probes and correspond one-to-one with link tracing identifiers. The above three types of information are structured and encapsulated to form observation sample entries, defined as quintuples:

[0131] x=(S t A t ,R t M t ,T t )

[0132] Where S t For the link state sequence, A t R is a set of action instructions. t M is the instant reward value constructed based on the result feedback. t T is the system index vector. t This is the sampling timestamp. This quintuple is written into the training buffer as the smallest unit of the original training data.

[0133] Considering the extremely high request density, frequent initial sampling, and large data volume in high-concurrency e-commerce systems, this example implementation uses a distributed training buffer structure to cache and manage joint observation samples to ensure the representativeness and convergence efficiency of training samples. This buffer achieves multi-threaded concurrent read / write operations through memory mapping or external key-value storage (such as Redis or RocksDB), supporting rapid sample deduplication and priority sorting. During the write process, the policy effectiveness evaluation module scores each newly generated sample. The scoring logic combines link anomaly density, policy output diversity, and system feedback benefits into a weighted score. The specific scoring function can be set as follows:

[0134] Q(x)=α·err\_rate(x)+β·entropy(A t )+γ·Rt

[0135] Where α, β, and γ are policy adjustment weights, err_rate(x) represents the average anomaly identification rate of the link nodes, and entropy(A t R represents the entropy value of the action distribution; a higher value indicates a stronger exploratory strategy. t This is the immediate reward value of the sampled system, used to characterize the system's effectiveness in terms of policy behavior. Samples with scores below a threshold are marked as low quality and removed; entries with severe repetitive structures or empty sampling links are also discarded to ensure that the model does not overfit on low-information-density data.

[0136] To continuously improve model performance, this example implementation sets a training scheduler to drive policy model updates at fixed intervals or under triggering conditions. The scheduler samples high-value samples from the buffer, ranked by quality score, to form mini-batch training sets. The size B of each training set can be dynamically adjusted based on the policy network size and gradient volatility; for example, 32 ≤ B ≤ 256. The training samples are used to calculate the policy gradient and value function deviation, and the policy parameters are updated through a reinforcement learning optimization engine. If a policy gradient-based algorithm (such as PPO, REINFORCE) is used, the update process is calculated as follows:

[0137]

[0138] Where π θ Let V be the current policy network, θ be its parameters, and V be the network type. φ (S t The value function network estimates the expected return for the current state, used to construct the advantage function A. t =R t -V φ (S t If a Q-value optimization algorithm (such as DQN) is used, the TD error is calculated using the target network and the empirical replay mechanism, and the Bellman residual is minimized.

[0139] After training, the policy network weights θ are immediately updated to the agent control module and take effect in the next round of instrumentation behavior decision-making. Simultaneously, the policy optimization engine saves the current policy snapshot and training metrics to the policy version repository. The policy scheduler can be configured to trigger policy degradation detection logic. If the policy output entropy value drops sharply over multiple consecutive training cycles, or system performance metrics deteriorate, this example implementation can automatically roll back to the previous stable policy version to avoid system instability caused by extreme policies.

[0140] In the order processing and logistics tracking method for Java optimization in an e-commerce environment in the exemplary embodiments of the present application, the link data collection instruction is embedded into the key business method through bytecode enhancement, which can collect the execution characteristic data closely related to the system behavior without interrupting the original business logic, forming a high-fidelity link event basis. The timestamp, time consumption, summary, and exception information collected are parsed, aggregated, and structured modeled, and are uniformly expressed as a link state sequence, which not only reproduces the call path, but also retains the local performance of each node in the context. The reinforcement learning agent uses the above state sequence as the input of policy evaluation, and outputs the targeted diagnostic action instruction in each cycle according to the current policy, including sampling frequency enhancement, field adjustment, node marking, and exception reporting. In addition, unlike the traditional scheme that fixes the sampling strategy as a rule table, the present scheme enables the sampling decision to be continuously updated as the system behavior evolves. Further, the action instruction generated by the agent is sent to the instrumentation control module, which directly drives the runtime to dynamically adjust the link collection behavior, including changing the sampling condition, enabling the field, and starting and stopping the instrumentation site, realizing the response loop of the data source regulation layer to the strategy decision layer. During system operation, the link state, diagnostic instruction, and running index together constitute the feedback signal and are written into the experience buffer for periodic training of the agent, so that it gradually learns the optimal instrumentation adjustment strategy after multiple rounds of sampling and evaluation, adapting to the dynamic changes of different business traffic, call paths, and exception patterns. Further, the exemplary embodiments of the present application avoid the problems of rigidity, insufficient coverage, and uncontrollable performance overhead of link data collection in the traditional scheme.

[0141] In the exemplary embodiments of the present application, an order processing and logistics tracking system for Java optimization in an e-commerce environment is also provided. Referring to Figure 3 As shown in the figure, the order processing and logistics tracking system 300 can include an instruction insertion module 310, a data integration module 320, an agent calling module 330, an instrumentation control module 340, and a model updating module 350. Among them:

[0142] The instruction insertion module 310 is used to insert link data collection instructions for collecting call time, execution time, input summary, and exception identification into target class methods that process order status, payment calls, and logistics interactions in an order system running on a Java virtual machine based on a bytecode enhancement method;

[0143] The data integration module 320 is used to construct the data collected in response to the link data collection instruction into a link state sequence composed of service identification, node location, time consumption, and exception identification;

[0144] The intelligent agent calling module 330 is configured to input the link state sequence into a reinforcement learning intelligent agent with a preset state space and action space, and output a diagnostic action instruction including an exception report, a sampling enhancement, a node marking, and a stub adjustment;

[0145] The stub control module 340 is configured to adjust a sampling frequency, a sampling field, and a stub configuration of the link data collection instruction according to the diagnostic action instruction.

[0146] The model updating module 350 is configured to record the link state sequence, the diagnostic action instruction, and a system operation index, and update a policy model parameter of the reinforcement learning intelligent agent.

[0147] The specific details of the modules of the order processing and logistics tracking system optimized in the e-commerce environment have been described in detail in the method for optimizing order processing and logistics tracking in the e-commerce environment, and thus will not be described here.

[0148] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium having a program product stored thereon, which can implement the method described in the specification. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing an electronic device to perform the steps described in the “Exemplary Method” section of the specification according to various exemplary embodiments of the present disclosure when the program product is run on the electronic device.

[0149] The program product can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on an electronic device such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used or combined with an instruction execution system, device, or apparatus.

[0150] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0151] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein. The propagated data signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that can send, receive, or otherwise carry program code in the form of commands or instructions executed by a programmable processor.

[0152] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0153] Program code, used by or in connection with the described embodiments, can be written in any of a number of suitable programming languages and implementing methods, including an object-oriented programming language such as Java, C#, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, application specific circuitry, or field programmable gate array (FPGA) circuitry, includes the circuitry described in connection with the described embodiments, or other variations thereof.

[0154] Additionally, the exemplary embodiments of this disclosure further provide an electronic device capable of implementing the above-mentioned order processing and logistics tracking method under the e-commerce environment with Java optimization.

[0155] The electronic device 400 according to such an embodiment of the disclosure will be described below with reference to the accompanying drawings. Figure 4 The electronic device 400 shown is merely an example and should not bring any limitation to the function and use range of the embodiments of the disclosure. Figure 4 The electronic device 400 shown is merely an example and should not bring any limitation to the function and use range of the embodiments of the disclosure.

[0156] As shown in Figure 4 Figure 4 The electronic device 400 is in the form of a general computing device. The components of the electronic device 400 can include, but are not limited to, the above-mentioned at least one processing unit 410, the above-mentioned at least one storage unit 420, a bus 430 connecting different system components, including the storage unit 420 and the processing unit 410, and a display unit 440.

[0157] The storage unit 420 stores program code that can be executed by the processing unit 410 to cause the processing unit 410 to perform the steps described in the above "Example Methods" section of this specification in accordance with various example embodiments of the present disclosure. For example, the processing unit 410 can perform the method steps of the example embodiments of the present disclosure.

[0158] The storage unit 420 can include a readable medium in the form of volatile storage such as random access memory (RAM) 421 and / or cache memory 422, and also can include non-volatile storage such as read only memory (ROM) 423.

[0159] The storage unit 420 also can include program / utility 424 having a set of one or more program modules 425, including operating system, one or more application programs, other program modules, and program data, each of which can give the electronic device 400 its functionality, as some examples.

[0160] The bus 430 can represent one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus architectures.

[0161] The electronic device 400 also can communicate with one or more external devices 700 such as a keyboard or pointing device, a Bluetooth device, etc.; other devices such as printers, scanners, etc.; and / or various types of networks including a local area network (LAN), a wide area network (WAN), and / or the Internet. The communication can occur via the I / O interface 450. The electronic device 400 also can communicate with one or more devices that enable user interaction with the electronic device 400, and / or one or more devices that enable communication of the electronic device 400 with one or more other computing devices. Such communication can occur via the I / O interface 450. The electronic device 400 also can communicate with one or more networks such as a local area network (LAN), a wide area network (WAN), and / or the Internet, via the network adapter 460. As indicated above, the network adapter 460 can be communicatively coupled to the other components of the electronic device 400 via the bus 430. It will be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device 400, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0162] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB, a mobile hard disk, or the like) or a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the methods according to the embodiments of the disclosure.

[0163] In addition, the above-described drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the disclosure, and are not intended for limiting purposes. It is easy to understand that the processes shown in the above-described drawings do not indicate or limit the time sequence of the processes. In addition, it is also easy to understand that the processes can be executed synchronously or asynchronously, for example, in a plurality of modules.

[0164] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB, a mobile hard disk, or the like) or a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the methods according to the embodiments of the disclosure.

[0165] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure and includes what is present in the prior art and those that are present in the following claims. The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

[0166] It should be understood that the present disclosure is not limited to the precise structures described above and illustrated in the drawings and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A Java-optimized order processing and logistics tracking method for e-commerce environments, characterized in that, include: In the order system running on the Java Virtual Machine, bytecode enhancement methods are used to insert link data collection instructions into the target class methods that handle order status, payment calls, and logistics interactions. These instructions are used to collect call times, execution times, input summaries, and exception identifiers. The data collected in response to the link data collection command is constructed into a link status sequence consisting of service identifier, node location, time consumption, and anomaly identifier; The link state sequence is input into a reinforcement learning agent with a preset state space and action space, and the output includes diagnostic action instructions such as anomaly reporting, sampling enhancement, node labeling and instrumentation adjustment. The instrumentation control module is invoked to adjust the sampling frequency, acquisition fields, and instrumentation configuration of the link data acquisition command according to the diagnostic action command; The link state sequence, the diagnostic action instructions, and the system operation indicators are recorded, and the policy model parameters of the reinforcement learning agent are updated accordingly.

2. The method according to claim 1, characterized in that, The method for inserting link data acquisition instructions into target class methods based on bytecode enhancement includes: Before the target class method is loaded, the class loading interception module is called to identify business methods that include order status changes, payment request processing, and logistics status updates; Based on the signature features and context dependency information of the identified business methods, the bytecode instrumentation engine is invoked to inject pre- and post-collection points into the method body. The pre-collection points are used to record the call time and input summary, and the post-collection points are used to record the execution time and exception identifier. The instrumented target class method is written to a temporary cache area through an intermediate bytecode caching mechanism, and consistency is checked against the original class bytecode. Load the instrumented target class method into the Java Virtual Machine runtime environment.

3. The method according to claim 1, characterized in that, The process of constructing a link status sequence consisting of service identifier, node location, time consumption, and anomaly identifier from the data collected in response to the link data collection command includes: Based on the original sampling events generated at each target class method according to the link data acquisition command, the original meta-information containing the name of the service to which the method belongs, the method path, and the thread context identifier is extracted. The call chain aggregation module concatenates sampled events that are triggered consecutively in the same request context in chronological order to construct the call chain fragments of the corresponding request, and generates a globally unique link tracing identifier for each fragment; For each node in the call chain segment, its time consumption range is parsed and it is determined whether it contains an abnormal signal or a timeout mark. The service identifier, node location index, time consumption value and abnormal identifier are integrated into a structured node state vector. The state vectors of each node are arranged in the order of invocation to construct a link state sequence that can be used as input to the reinforcement learning agent, and its timestamp is recorded.

4. The method according to claim 1, characterized in that, The step of inputting the link state sequence into a reinforcement learning agent with a preset state space and action space includes: Based on the service identifier and location index of each node in the link state sequence, a time-series state input containing multiple rounds of context is constructed; The state encoding module is invoked to perform normalization preprocessing and time alignment on the state vectors of each node, and the results are mapped to the state space of the reinforcement learning agent. The reinforcement learning agent performs policy forward computation on the current state input and outputs a multi-dimensional action vector to indicate the sampling behavior of each node in the link; The significant activation components in the multidimensional action vector are post-processed to generate a set of diagnostic action instructions that include instruction fields for anomaly reporting, node marking, or sampling adjustment.

5. The method according to claim 4, characterized in that, The set of diagnostic action instructions generated, which includes instruction fields for anomaly reporting, node marking, or sampling adjustment, includes: Extract the average anomaly rate of the current link state sequence in the most recent N rounds and the policy distribution entropy of the corresponding node; Calculate the strategy uncertainty index for each node, and mark nodes with uncertainties higher than a preset threshold as nodes of interest; Based on the execution time, context location, and anomaly frequency of the nodes of interest, a sampling intensity factor is allocated to dynamically adjust the triggering frequency of link data acquisition commands. The sampling intensity factor and node marker information are encapsulated into a sampling enhancement sub-instruction, which is then sent to the piling control module as part of the diagnostic action instruction.

6. The method according to claim 1, characterized in that, The steps for invoking the instrumentation control module to adjust the link data acquisition command include: The node identifier, adjustment type, and target sampling parameters in the diagnostic action command are parsed and mapped to the instrumentation configuration request of the corresponding target class method; Call the runtime instrumentation management interface to calculate the dynamic sampling interval for nodes marked as having their sampling frequency adjusted, based on the current system load index and event density, and inject judgment statements for rate limiting. For requests to adjust the collected fields, the reachable path of the corresponding input parameters, context variables or exception stack information in the target method body is determined through the field access tracing mechanism, and the list of collected fields is updated accordingly. The configuration items for sampling frequency, acquisition fields, and instrumentation start / stop status are written into the instrumentation configuration registry, and the target class is incrementally replaced through a hot reload mechanism to realize the online evolution of the link data acquisition strategy.

7. The method according to claim 1, characterized in that, The updating of the policy model parameters of the reinforcement learning agent includes: In each round of link acquisition and diagnosis, a joint observation sample is constructed, which includes the link status sequence, corresponding diagnostic action instructions, execution timestamps, and node-level system indicators. The joint observation samples are cached in a distributed training buffer, and the sampling quality is scored by a policy effectiveness evaluation module to remove duplicate links, empty samples, or low-return samples. High-value samples are periodically sampled from the buffer to form a mini-batch training set, which is then input into the policy optimization engine. Gradients are calculated and policy model parameters are updated using a reinforcement learning algorithm.

8. A Java-optimized order processing and logistics tracking system for e-commerce environments, characterized in that, include: The instruction insertion module is used to insert link data collection instructions into the target class methods that handle order status, payment calls, and logistics interactions in the order system running on the Java Virtual Machine, based on bytecode enhancement methods. These instructions are used to collect call time, execution time, input summary, and exception identifiers. The data integration module is used to construct a link status sequence consisting of service identifier, node location, time consumption, and anomaly identifier from the data collected in response to the link data collection command. The agent invocation module is used to input the link state sequence into a reinforcement learning agent with a preset state space and action space, and output diagnostic action instructions including anomaly reporting, sampling enhancement, node marking and instrumentation adjustment; The instrumentation control module is used to adjust the sampling frequency, acquisition fields, and instrumentation configuration of the link data acquisition command according to the diagnostic action command; The model update module is used to record the link state sequence, the diagnostic action instructions, and the system operation indicators, and update the policy model parameters of the reinforcement learning agent accordingly.

9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-7 by executing the executable instructions.

10. A computer-readable storage medium having a computer object program stored thereon, characterized in that, When the computer target program is executed by the processor, it implements the method described in any one of claims 1-7.