Cross-border e-commerce task processing method and device
By acquiring diagnostic prompts from multi-dimensional failure contexts, and utilizing local diagnostic strategy classifiers and large language models to automate the processing of cross-border e-commerce tasks, the problem of low efficiency in cross-border e-commerce task scheduling is solved, and automated repair of data compliance and task execution is achieved, thereby improving processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing automated task scheduling technologies for cross-border e-commerce are prone to errors when faced with e-commerce platform interface updates, business rule adjustments, and special requirements of different country sites. This results in low processing efficiency, reliance on manual intervention, and difficulty in automating data compliance.
By acquiring diagnostic prompts from multi-dimensional failure contexts, and utilizing a local diagnostic strategy classifier and a large language model for verification and remediation strategy generation, cross-border business rules are automatically processed, remediation instructions are generated, and tasks are re-executed to ensure data compliance.
It enables automated handling of cross-border e-commerce task failures while meeting data compliance requirements, improving processing efficiency, reducing manual intervention, increasing task execution success rate, and enhancing the system's automated repair capabilities.
Smart Images

Figure CN121836854A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cross-border e-commerce information processing technology, and in particular to a cross-border e-commerce task processing method and apparatus. Background Technology
[0002] Cross-border e-commerce companies typically need to sell and operate their products on multiple e-commerce platforms in multiple countries and regions. To improve operational efficiency and reduce labor costs, these companies widely adopt automation technologies, deploying a series of microservices or software agents to perform repetitive, high-frequency tasks. These tasks include automating new product listings, intelligently adjusting prices based on competitor activity and inventory levels, synchronizing inventory quantities across platforms, automatically responding to customer inquiries using natural language processing technology, and batch processing order and logistics information.
[0003] However, existing automated task scheduling technologies face significant challenges in the complex and ever-changing cross-border e-commerce landscape. Current microservices or proxies are prone to errors when dealing with frequent API updates, business rule adjustments, front-end page redesigns, or the specific requirements of different country sites on e-commerce platforms. When automated tasks fail, existing mechanisms typically involve simply logging errors and interrupting the task, or blindly retrying.
[0004] In existing technologies, the aforementioned problems heavily rely on manual intervention. Operations and maintenance personnel need to spend a significant amount of time reading and analyzing logs scattered across different national nodes and various systems, resulting in low efficiency. As data compliance regulations become increasingly stringent in various countries, data compliance risks in cross-border e-commerce applications are difficult to handle automatically, necessitating a suitable approach that improves processing efficiency while meeting data compliance requirements. Summary of the Invention
[0005] This invention provides a method and apparatus for processing cross-border e-commerce tasks, which solves the problem of low efficiency in processing related fault tasks in the prior art, and achieves the effect of improving processing efficiency while meeting data compliance requirements.
[0006] This invention provides a cross-border e-commerce task processing method, comprising: Upon receiving the first instruction corresponding to the first task, the first microservice is invoked to execute the first task; If the first microservice fails to execute the first task, a first diagnostic prompt containing multi-dimensional failure context is obtained; the first diagnostic prompt contains contextual information related to the task execution failure as prompt words for the large language model; The first instruction and the first diagnostic prompt are verified based on the local diagnostic policy classifier set at the deployment location of the first microservice to obtain a first identification result; the first identification result includes the data compliance identification result and the type of cross-border business rule; If the first identification result meets the preset conditions, the first instruction and the first diagnostic prompt are input into the large language model to obtain the second instruction output by the large language model; the large language model is associated with the type of the cross-border business rule; The second instruction is sent to the first microservice to invoke the first microservice to re-execute the first task.
[0007] According to a cross-border e-commerce task processing method provided by the present invention, the first diagnostic prompt includes the original user request that triggered the first task, the platform country and language, the attribute information of the first microservice, the error identification information returned by the first microservice, and the cross-border business rules associated with the first task; the method further includes verifying the first instruction and the first diagnostic prompt based on a local diagnostic strategy classifier set at the deployment location of the first microservice to obtain a first identification result. Using a local diagnostic strategy classifier, the first instruction and the first diagnostic prompt are identified by named entities based on the original user request and the platform country, to obtain a second identification result. If the second identification result indicates that the first task does not involve personal identity information, the types of the cross-border business rules are classified to obtain the type of cross-border business rules corresponding to the first task; the types of cross-border business rules include logical rules and fuzzy rules; the first identification result includes the second identification result and the type of cross-border business rules corresponding to the first task.
[0008] According to a cross-border e-commerce task processing method provided by the present invention, before inputting the first instruction and the first diagnostic prompt into the large language model, the method further includes: The data values in the first diagnostic prompt are replaced with their types to generate an alternative diagnostic prompt in which the data structure remains unchanged but the values are replaced by type placeholders. The alternative diagnostic prompt is sent to the large language model as the first diagnostic prompt to obtain the repair strategy template containing parameterized placeholders output by the large language model.
[0009] According to a cross-border e-commerce task processing method provided by the present invention, the type of the cross-border business rule is confirmed through the following process: The text content of the cross-border business rules is compiled from natural language into symbolic logic expressions; Perform semantic structure analysis on the symbolic logic expression; If the analysis results are unambiguous, then the type of the cross-border business rule is determined to be a logical rule.
[0010] According to a cross-border e-commerce task processing method provided by the present invention, after performing semantic structure analysis on the symbolic logic expression, the method includes: If the analysis results are ambiguous, a boundary condition challenge is generated based on the text content of the cross-border business rules. Based on the quantity and quality of the generated queries, the type of the cross-border business rule is determined to be a fuzzy rule.
[0011] According to a cross-border e-commerce task processing method provided by the present invention, after obtaining the second instruction output by the large language model, the method further includes: Based on the original first diagnostic prompt held locally by the first microservice, the parameterized placeholders in the template are backfilled with real values to adjust the second instruction.
[0012] According to a cross-border e-commerce task processing method provided by the present invention, after sending the second instruction to the first microservice to invoke the first microservice to re-execute the first task, the method further includes: If the first task is successfully executed, the feature vector of the first diagnostic prompt, the large language model, and the second instruction are recorded to generate a decision log. Based on the decision log, adjust the parameters of the local diagnostic strategy classifier.
[0013] According to a cross-border e-commerce task processing method provided by the present invention, the method further includes obtaining a first diagnostic prompt containing multi-dimensional failure contexts. Retrieve execution status data of multiple related tasks within a preset time window above and below the failure timestamp of the first task; Error identification information is extracted from the execution status data and incorporated into the error identification information in the first diagnostic prompt.
[0014] The present invention also provides a cross-border e-commerce task processing device, comprising: The first execution module is used to call the first microservice to execute the first task upon receiving the first instruction corresponding to the first task; The acquisition module is used to acquire a first diagnostic prompt containing multi-dimensional failure context when the first microservice fails to execute the first task; the first diagnostic prompt contains contextual information related to the task execution failure as prompt words for the large language model; The verification module is used to verify the first instruction and the first diagnostic prompt based on the local diagnostic policy classifier set in the deployment location of the first microservice, and obtain a first identification result; the first identification result includes the data compliance identification result and the type of cross-border business rule; The processing module is configured to input the first instruction and the first diagnostic prompt into the large language model when the first recognition result meets preset conditions, and obtain the second instruction output by the large language model; the large language model is associated with the type of the cross-border business rule; The second execution module is used to send the second instruction to the first microservice to invoke the first microservice to re-execute the first task.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the cross-border e-commerce task processing method described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cross-border e-commerce task processing method as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the cross-border e-commerce task processing method described above.
[0018] The cross-border e-commerce task processing method and apparatus provided by this invention automatically gathers all relevant clues into structured information by acquiring the first diagnostic prompts of multi-dimensional failure contexts. When the automated repair process is initiated, the data undergoes a strict compliance review and the appropriate large language model is identified based on the type of cross-border business rules. This transforms the fault handling process from relying on human experience to utilizing the natural language understanding, logical reasoning, and general knowledge capabilities of the large language model to handle problems that hard-coded rules cannot solve. This achieves automated fault resolution after task execution failure, improves processing efficiency in the cross-border e-commerce environment, and ensures data compliance. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1This is one of the flowcharts of the cross-border e-commerce task processing method provided by the present invention; Figure 2 This is the second flowchart of the cross-border e-commerce task processing method provided by the present invention; Figure 3 This is a schematic diagram of the cross-border e-commerce task processing device provided by the present invention; Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] The following is combined with Figure 1 Figure 4 illustrates a cross-border e-commerce task processing method and apparatus according to the present invention.
[0023] like Figure 1 As shown, the method includes steps 110, 120, 130, 140 and 150.
[0024] Step 110: Upon receiving the first instruction corresponding to the first task, invoke the first microservice to execute the first task.
[0025] Step 120: If the first microservice fails to execute the first task, obtain the first diagnostic prompt containing multi-dimensional failure context.
[0026] The first diagnostic prompt includes contextual information related to task execution failure as prompt words for the large language model.
[0027] Step 130: Verify the first instruction and the first diagnostic prompt based on the local diagnostic policy classifier set at the first microservice deployment location to obtain the first identification result.
[0028] The first identification result includes the data compliance identification result and the type of cross-border business rules.
[0029] Step 140: If the first recognition result meets the preset conditions, input the first instruction and the first diagnostic prompt into the large language model to obtain the second instruction output by the large language model.
[0030] The relationship between large language models and the types of cross-border business rules.
[0031] Step 150: Send the second instruction to the first microservice to invoke the first microservice to re-execute the first task.
[0032] Upon receiving a business instruction, such as an instruction from an operations staff member via an internal system to list a phone case with the product number K100 on website A, this instruction is parsed as a first instruction corresponding to the first task in this embodiment of the invention. This instruction contains all the information required for listing, such as the product title, description, image links, price, and inventory. This first instruction can then be dispatched to a first microservice responsible for interacting with website A for execution.
[0033] When the first microservice in the microservice execution cluster is executing an assignment task, it may fail for various reasons. For example, it might return a failure response containing specific error identification information. In this case, the failure event can be captured.
[0034] If the first task fails, contextual information related to the failure can be collected from the system to generate a first diagnostic alert. This first diagnostic alert includes rich data, encompassing not only the error identifier returned by the first microservice, but also the original user request for the first task, the platform's country and language, the attribute information of the first microservice, and the cross-border business rules associated with the first task.
[0035] In a microservices deployment environment, the execution status of each task can be monitored through a distributed monitoring system. When the first microservice is executing the first task, failure scenarios include, but are not limited to, explicit technical errors, execution timeouts, and business logic execution failures.
[0036] Explicit technical errors refer to microservices returning explicit unsuccessful HTTP status codes (such as 4xx client errors, 5xx server errors), or including a false flag along with the specific error code and error message in the returned JSON file.
[0037] An execution timeout means that a request was sent to the microservice, but no response was received within a preset time threshold, such as 30 seconds, and only a no-response error message was returned.
[0038] Business logic execution failure refers to a situation where, in certain designs, even if a microservice technically returns success, its execution result may be unreasonable at the business level. For example, a price adjustment microservice might successfully execute but return a negative new price. In this case, the caller or a separate validation service could trigger an exception indicating business logic execution failure.
[0039] The original user request that triggered the first task, namely the complete content of the initial instruction to list the phone case product numbered K100 on site A, retains the original intent of the task.
[0040] The cross-border business rules associated with the primary task are related to the country and the primary task itself. Relevant rules can be extracted from the rule base, such as "title length must not exceed 200 characters," "prices must be in Euros," and "certain extreme words are prohibited in the description." These rules can be structured or described in natural language.
[0041] After the first task fails, all information related to the multi-dimensional failure context can be constructed into a structured first diagnostic prompt. The first instruction and the first diagnostic prompt can be input into the Large Language Model (LLM) to obtain the second instruction output by the LLM. By leveraging the powerful general knowledge, code understanding, and logical reasoning capabilities of the LLM, complex fault diagnosis and instruction repair tasks that are difficult to achieve with traditional programs can be completed.
[0042] A large language model can be a large general-purpose model, a finely tuned domain-specific model, or a code generation or logic reasoning model, etc. Different types of large language models can be invoked based on the characteristics of different business types.
[0043] The first diagnostic prompt includes the original user request that triggered the first task, the platform's country and language, the attribute information of the first microservice, the error identification information returned by the first microservice, and the cross-border business rules associated with the first task.
[0044] The initial user request that triggers the first task provides the task intent and raw input. For example, in a product listing task, this request contains the most raw, unprocessed data such as the product title, description text, price, and image URL uploaded by the user.
[0045] It's important to note that many task failures stem from incorrect input data, such as an incorrect image size description. Without this original request, LLM cannot trace the problem back to its source and can only investigate intermediate steps where information has already been processed and lost.
[0046] Platform country and language information are used to provide a rule environment and regional constraints, clarifying the target environment for task execution. The complexity of cross-border e-commerce lies in regional differences. The same operation may have different rules on different platforms in different countries. For example, there may be differences in pricing units, units of measurement, data and content compliance, and API version.
[0047] The attribute information of the first microservice is used to provide the identity and status of the task executor. This can include the microservice's name, version number, deployment location, and recent operational status such as average response time and error rate. If a microservice version is too low, or is known to be unstable, the LLM can repeatedly modify instructions to adapt it to the microservice.
[0048] The error message returned by the first microservice can be used to identify the most direct technical failure. When a microservice fails, it can provide direct technical feedback, such as an HTTP status code and a specific error code or message included in the response body. LLM can then use this message, combined with other information, to infer the underlying cause of the failure.
[0049] The cross-border business rules associated with the primary task can provide context for these business rules. These can be textual business rules stored internally within the system, specifying which rules must be followed when performing a specific task on a specific platform. In some scenarios, technical errors returned by microservices, such as "price calculation failed," actually reflect a violation of a certain business rule. Providing this rule text to the LLM can help it directly pinpoint conflicts at the business logic level and generate corrective instructions that meet business requirements, such as multiplying the original price by 1.19 and resubmitting.
[0050] To meet data compliance requirements, before inputting the first instruction and the first diagnostic prompt into the large language model, the first instruction and the first diagnostic prompt can be verified based on a local diagnostic policy classifier set up at the deployment location of the first microservice to obtain a first identification result. The first identification result includes the data compliance identification result and the type of cross-border business rule.
[0051] The large language model is associated with the types of cross-border business rules, which include logical rules and fuzzy rules.
[0052] A local diagnostic strategy classifier is an intelligent module deployed at the data source. It can be a specially trained machine learning model or a rule engine containing complex logical judgments.
[0053] A local diagnostic strategy classifier is used for sensitive information identification and data compliance identification. Upon receiving the first diagnostic alert, a compliance check is required.
[0054] In some embodiments, the first instruction and the first diagnostic prompt are verified based on a local diagnostic policy classifier set at the first microservice deployment site to obtain a first identification result. The method includes steps 210 and 220.
[0055] Step 210: Using a local diagnostic strategy classifier, the first instruction and the first diagnostic prompt are identified by named entities based on the original user request and the platform country, to obtain the second identification result.
[0056] Step 220: If the second identification result is that the first task does not involve personal identity information, classify the types of cross-border business rules to obtain the types of cross-border business rules corresponding to the first task.
[0057] The types of cross-border business rules include logical rules and fuzzy rules; the first identification result includes the second identification result and the type of cross-border business rule corresponding to the first task.
[0058] The local diagnostic strategy classifier can invoke a named entity recognition module to identify personally identifiable information. For example, the named entity recognition module will scan the original user request portion of the first diagnostic prompt, as well as other fields that may contain user input. For instance, if the information from a failed customer service task contains the user's name, email address, or home address, the named entity recognition module will immediately identify these entities, obtaining the first identification result involving personally identifiable information.
[0059] In this case, the task can be marked as requiring manual processing, and the relevant authorized operations and maintenance personnel can be notified to process it manually in order to meet data compliance requirements.
[0060] Of course, in other embodiments, the data can also be abstracted and anonymized. Based on the type of cross-border business rules, the first instruction and the first diagnostic prompt are sent to the corresponding large language model, including: replacing the data value in the first diagnostic prompt with a type to generate an alternative diagnostic prompt where the data structure remains unchanged but the value is replaced by a type placeholder; sending the alternative diagnostic prompt as the first diagnostic prompt to the large language model to obtain a repair strategy template containing parameterized placeholders output by the large language model.
[0061] After deciding to communicate with a remote large language model, instead of directly sending the first diagnostic prompt containing real business data, alternative diagnostic prompts will be generated through data generalization processing.
[0062] In the alternative diagnostic prompts, all specific, potentially sensitive numerical values and strings can be replaced with abstract, information-free type placeholders, while the data structure and semantic relationships are fully preserved. The alternative diagnostic prompts, along with the initial instructions, error indicators, and other security information, can be sent to a remote large language model. Because no real data is contained, the transmitted data complies with data compliance requirements.
[0063] Even after receiving this abstract alternative diagnostic suggestion, the remote large language model can still perform effective reasoning.
[0064] After receiving the second instruction output by the large language model, the cross-border e-commerce task processing method of this embodiment of the invention further includes, based on the original first diagnostic prompt held locally by the first microservice, backfilling the parameterized placeholders in the template with real values to adjust the second instruction.
[0065] The large language model outputs a similarly abstract repair strategy template containing parameterized placeholders. This abstract repair strategy template can be safely transmitted back to the locally deployed system. The actual values corresponding to these placeholders can be found in the original diagnostic prompts, and these actual values can be substituted into the modification logic described in the template to execute the modifications. The modified description is then used to replace the old description in the original instruction, generating a completely new second instruction.
[0066] You can set up multiple large language models and assign the problem to the language model that is best suited to solve that type of problem, based on the problem type.
[0067] For example, a large language model associated with logical rules is a specially trained model, even one more geared towards code generation and mathematical computation. Its strengths lie in precise logical reasoning and numerical calculation. When failure is due to a violation of logical rules (such as an incorrect price format), it can accurately generate corrected, properly formatted instructions.
[0068] For example, a large language model associated with fuzzy rules is a model with stronger general knowledge and better skills in semantic understanding, sentiment analysis, and creative writing. When a failure is due to a violation of fuzzy rules, such as the title being judged as unattractive, a new, more creative and attractive title can be generated.
[0069] The first diagnostic prompt includes contextual information related to the task execution failure, which serves as a prompt word for the large language model. The contextual information related to the task execution failure helps the large language model identify the cause of the failure, while the prompt word provides a clear instruction to the large language model to correct the failure, so that the large language model can output a second instruction.
[0070] If the first identification result meets the preset conditions, the newly generated second instruction can be resent to the first microservice to invoke it to re-execute the first task. The preset conditions may include the data compliance identification result meeting the data compliance conditions and the type of cross-border business rules meeting the matching type conditions of the large language model.
[0071] The newly generated second instruction is sent to the first microservice to invoke it to re-execute the listing task. Because the second instruction has been modified to address the cause of the failure, the success rate of this execution will be greatly improved.
[0072] According to the cross-border e-commerce task processing method provided by the embodiments of the present invention, by obtaining the first diagnostic prompts of multi-dimensional failure context, all relevant clues are automatically gathered into structured information. When the automated repair process is started, the data undergoes a strict compliance review and the appropriate large language model is confirmed based on the type of cross-border business rules. The fault handling process is transformed from relying on human experience to utilizing the natural language understanding, logical reasoning and general knowledge capabilities of the large language model to handle problems that cannot be solved by hard-coded rules. This achieves automated fault resolution after task execution failure, improves processing efficiency in the cross-border e-commerce environment and ensures data compliance.
[0073] After confirming data compliance, in-depth analysis and classification of cross-border business rules associated with failed tasks can be performed. Cross-border business rules can include logical rules and fuzzy rules as described in the aforementioned embodiments.
[0074] Logical rules are rules that can be clearly described using formal, deterministic language. Examples include "the weight of the product must be greater than 0 and less than 50 kilograms," "the number of characters in the product title must be between 10 and 200," and "the price must have two decimal places." These rules are characterized by being unambiguous and capable of being precisely determined through mathematical or logical operations.
[0075] Fuzzy rules refer to rules that rely on natural language understanding, cultural background, and subjective judgment. Examples include rules such as "product descriptions must be attractive and highlight core selling points," "main image style must conform to minimalist aesthetics," and "users are dissatisfied with automated customer service replies." These rules are characterized by semantic ambiguity and are difficult to define using simple formal logic.
[0076] In some embodiments, the type of a cross-border business rule is determined through the following process: compiling the text content of the cross-border business rule from natural language into a symbolic logic expression; performing semantic structure analysis on the symbolic logic expression; and determining the type of the cross-border business rule as a logic rule if the analysis result is unambiguous.
[0077] To determine whether a rule is a logical rule, a module for converting natural language to formal logic can be invoked. This module can process the data based on advanced semantic parsing algorithms. When the text content of a business rule, such as "the price of a product must be between ten euros and one hundred euros, and must end in 99," is input into this conversion module, it can first be compiled into a symbolic logic expression.
[0078] Specifically, the module first identifies the entities (prices), relationships (between, ending with), and values (ten, one hundred, ninety-nine). Then, it attempts to compile these natural language fragments into a machine-understandable symbolic logic expression. This expression can be any formal language, such as Prolog, SMT-LIB, or a custom domain-specific language.
[0079] After compilation, the module performs structural analysis on the generated symbolic logic expression. It checks the expression's syntax for completeness, the definition of variables, the clarity of logical relationships, and the presence of internal contradictions, thereby identifying any ambiguity. If the compilation process completes successfully and the generated expression is semantically complete and unambiguous, then the original natural language rule can be confirmed as a logical rule.
[0080] When a rule, such as "the main image of the product needs to reflect a sense of sophistication and technology," is input into the conversion module, the compilation process is likely to fail because it cannot convert abstract, subjective concepts such as "sense of sophistication" or "sense of technology" into precise symbolic logic.
[0081] At this point, after performing semantic structure analysis on the symbolic logical expression, the cross-border e-commerce task processing method of this embodiment of the invention further includes: generating boundary condition challenges based on the text content of the cross-border business rules when the analysis result is ambiguous; and determining the type of the cross-border business rules as fuzzy rules based on the number and quality of the generated challenges.
[0082] The conversion module will report the analysis results as ambiguous if the compilation fails or generates an incomplete expression full of unknown variables.
[0083] Once the rule is determined to be ambiguous, the content in the template library is used to question the ambiguous rule itself.
[0084] It can generate a series of questions aimed at clarifying its boundary conditions, such as regarding a sense of sophistication: Does a sense of sophistication refer to the use of a solid color background, or does it refer to the need for a model to showcase it, or is it related to specific lighting effects?
[0085] The generated boundary condition queries can be analyzed. If multiple non-repeating queries pointing in different directions of interpretation can be generated, it indicates the inherent fuzziness of the original rule. At this point, based on the quantity and quality of these generated queries, the type of this business rule can be ultimately determined to be a fuzzy rule.
[0086] After sending the second instruction to the first microservice to call the first microservice to re-execute the first task, the cross-border e-commerce task processing method also includes: if the first task is executed successfully, recording the feature vector of the first diagnostic prompt, the large language model, and the second instruction to generate a decision log; and adjusting the parameters of the local diagnostic strategy classifier based on the decision log.
[0087] When the task is successfully re-executed based on the generated second instruction, a positive feedback loop can be triggered. Specifically, a detailed decision log can be generated. This log can include structured learning samples. For example, it can include feature vectors of the failure scenario, the large language model used, and the corrected second instruction for the success.
[0088] Decision logs can be used as training datasets to retrain local diagnostic policy classifiers. This can be a form of supervised learning or reinforcement learning, and the specific training objectives can be adjusted according to specific training needs, thereby adapting to the ever-changing external environment and continuously improving the efficiency and accuracy of its automated repair.
[0089] In some embodiments, the method for processing cross-border e-commerce tasks further includes: retrieving execution status data of multiple associated tasks within a preset time window above and below the failure timestamp of the first task; and extracting error identification information from the execution status data and incorporating it into the error identification information in the first diagnostic prompt.
[0090] Specifically, a preset time window can be set centered on the timestamp of the failed task. Then, the execution status data of all other related tasks executed within this time window can be retrieved from the log system. This relationship can be based on a shared business process ID, user session ID, or determined by the same upstream event.
[0091] Error identification information can be extracted from the logs of these related tasks, and then this information can be incorporated into the first diagnostic prompt of the current task as a special related error field. In this way, the root cause can be identified by analyzing the clustering and similarity of failure events in the time dimension.
[0092] The cross-border e-commerce task processing device provided by the present invention is described below. The cross-border e-commerce task processing device described below can be referred to in correspondence with the cross-border e-commerce task processing method described above.
[0093] like Figure 3 As shown, the cross-border e-commerce task processing device of this embodiment includes a first execution module 310, an acquisition module 320, a verification module 330, a processing module 340, and a second execution module 350.
[0094] The first execution module 310 is used to call the first microservice to execute the first task upon receiving the first instruction corresponding to the first task; The acquisition module 320 is used to acquire a first diagnostic prompt containing multi-dimensional failure context when the first microservice fails to execute the first task. The first diagnostic prompt contains contextual information related to the task execution failure as prompt words for the large language model. The verification module 330 is used to verify the first instruction and the first diagnostic prompt based on the local diagnostic policy classifier set in the first microservice deployment location, and obtain the first identification result; the first identification result includes the data compliance identification result and the type of cross-border business rule; The processing module 340 is used to input the first instruction and the first diagnostic prompt into the large language model when the first recognition result meets the preset conditions, and obtain the second instruction output by the large language model; the large language model is associated with the type of cross-border business rules; The second execution module 350 is used to send the second instruction to the first microservice to invoke the first microservice to re-execute the first task.
[0095] According to the embodiments of the present invention, the cross-border e-commerce task scheduling device automatically gathers all relevant clues into structured information by obtaining the first diagnostic prompts of multi-dimensional failure contexts. When the automated repair process is started, it performs strict compliance review on the data and confirms the appropriate large language model based on the type of cross-border business rules. This transforms the fault handling process from relying on human experience to utilizing the natural language understanding, logical reasoning, and general knowledge capabilities of the large language model to handle problems that cannot be solved by hard-coded rules. This achieves automated fault resolution after task execution failure, improves processing efficiency in the cross-border e-commerce environment, and ensures data compliance.
[0096] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a cross-border e-commerce task processing method, which includes: upon receiving a first instruction corresponding to a first task, calling a first microservice to execute the first task; upon monitoring that the first microservice fails to execute the first task, obtaining a first diagnostic prompt containing multi-dimensional failure context; the first diagnostic prompt contains contextual information related to the task execution failure as prompt words for a large language model; verifying the first instruction and the first diagnostic prompt based on a local diagnostic strategy classifier set at the deployment location of the first microservice to obtain a first identification result; the first identification result includes a data compliance identification result and the type of cross-border business rule; if the first identification result meets preset conditions, inputting the first instruction and the first diagnostic prompt into the large language model to obtain a second instruction output by the large language model; the large language model is associated with the type of cross-border business rule; and sending the second instruction to the first microservice to call the first microservice to re-execute the first task.
[0097] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the cross-border e-commerce task processing method provided by the above methods. The method includes: upon receiving a first instruction corresponding to a first task, calling a first microservice to execute the first task; upon monitoring that the first microservice fails to execute the first task, obtaining a first diagnostic prompt containing multi-dimensional failure context; the first diagnostic prompt includes contextual information related to the task execution failure as prompt words for a large language model; verifying the first instruction and the first diagnostic prompt based on a local diagnostic strategy classifier set at the deployment location of the first microservice to obtain a first identification result; the first identification result includes a data compliance identification result and the type of cross-border business rule; when the first identification result meets preset conditions, inputting the first instruction and the first diagnostic prompt into the large language model to obtain a second instruction output by the large language model; the large language model is associated with the type of cross-border business rule; and sending the second instruction to the first microservice to call the first microservice to re-execute the first task.
[0099] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the cross-border e-commerce task processing method provided by the above methods. The method includes: upon receiving a first instruction corresponding to a first task, invoking a first microservice to execute the first task; upon monitoring that the first microservice fails to execute the first task, obtaining a first diagnostic prompt containing multi-dimensional failure context; the first diagnostic prompt containing contextual information related to the task execution failure as prompt words for a large language model; verifying the first instruction and the first diagnostic prompt based on a local diagnostic strategy classifier set at the deployment location of the first microservice to obtain a first identification result; the first identification result includes a data compliance identification result and the type of cross-border business rule; if the first identification result meets preset conditions, inputting the first instruction and the first diagnostic prompt into a large language model to obtain a second instruction output by the large language model; the large language model is associated with the type of cross-border business rule; and sending the second instruction to the first microservice to invoke the first microservice to re-execute the first task.
[0100] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing cross-border e-commerce tasks, characterized in that, include: Upon receiving the first instruction corresponding to the first task, the first microservice is invoked to execute the first task; If the first microservice fails to execute the first task, obtain a first diagnostic prompt containing multi-dimensional failure context. The first diagnostic prompt includes contextual information related to task execution failure as prompt words for the large language model; The first instruction and the first diagnostic prompt are verified based on the local diagnostic policy classifier set at the deployment location of the first microservice to obtain a first identification result; the first identification result includes the data compliance identification result and the type of cross-border business rule; If the first identification result meets the preset conditions, the first instruction and the first diagnostic prompt are input into the large language model to obtain the second instruction output by the large language model; the large language model is associated with the type of the cross-border business rule; The second instruction is sent to the first microservice to invoke the first microservice to re-execute the first task.
2. The cross-border e-commerce task processing method according to claim 1, characterized in that, The first diagnostic prompt includes the original user request that triggered the first task, the platform's country and language, the attribute information of the first microservice, the error identification information returned by the first microservice, and the cross-border business rules associated with the first task; the method of verifying the first instruction and the first diagnostic prompt based on a local diagnostic strategy classifier set in the deployment location of the first microservice to obtain a first identification result includes: Using a local diagnostic strategy classifier, the first instruction and the first diagnostic prompt are identified by named entities based on the original user request and the platform country, to obtain a second identification result. If the second identification result indicates that the first task does not involve personal identity information, the types of the cross-border business rules are classified to obtain the type of cross-border business rules corresponding to the first task; the types of cross-border business rules include logical rules and fuzzy rules; the first identification result includes the second identification result and the type of cross-border business rules corresponding to the first task.
3. The cross-border e-commerce task processing method according to claim 1, characterized in that, Before inputting the first instruction and the first diagnostic prompt into the large language model, the method further includes: The data values in the first diagnostic prompt are replaced with their types to generate an alternative diagnostic prompt in which the data structure remains unchanged but the values are replaced by type placeholders. The alternative diagnostic prompt is sent to the large language model as the first diagnostic prompt to obtain the repair strategy template containing parameterized placeholders output by the large language model.
4. The cross-border e-commerce task processing method according to claim 2, characterized in that, The type of the cross-border business rule is determined through the following process: The text content of the cross-border business rules is compiled from natural language into symbolic logic expressions; Perform semantic structure analysis on the symbolic logic expression; If the analysis results are unambiguous, then the type of the cross-border business rule is determined to be a logical rule.
5. The cross-border e-commerce task processing method according to claim 4, characterized in that, After performing semantic structure analysis on the symbolic logical expression, the method includes: If the analysis results are ambiguous, a boundary condition challenge is generated based on the text content of the cross-border business rules. Based on the quantity and quality of the generated queries, the type of the cross-border business rule is determined to be a fuzzy rule.
6. The cross-border e-commerce task processing method according to claim 3, characterized in that, After obtaining the second instruction output by the large language model, the method further includes: Based on the original first diagnostic prompt held locally by the first microservice, the parameterized placeholders in the template are backfilled with real values to adjust the second instruction.
7. The cross-border e-commerce task processing method according to claim 2, characterized in that, After sending the second instruction to the first microservice to invoke the first microservice to re-execute the first task, the method further includes: If the first task is successfully executed, the feature vector of the first diagnostic prompt, the large language model, and the second instruction are recorded to generate a decision log. Based on the decision log, adjust the parameters of the local diagnostic strategy classifier.
8. The cross-border e-commerce task processing method according to claim 1, characterized in that, The method for obtaining a first diagnostic prompt containing multi-dimensional failure contexts further includes: Retrieve execution status data of multiple related tasks within a preset time window above and below the failure timestamp of the first task; Error identification information is extracted from the execution status data and incorporated into the error identification information in the first diagnostic prompt.
9. A cross-border e-commerce task processing device, characterized in that, include: The first execution module is used to call the first microservice to execute the first task upon receiving the first instruction corresponding to the first task; The acquisition module is used to acquire a first diagnostic prompt containing multi-dimensional failure context when the first microservice fails to execute the first task. The first diagnostic prompt includes contextual information related to task execution failure as prompt words for the large language model; The verification module is used to verify the first instruction and the first diagnostic prompt based on the local diagnostic policy classifier set in the deployment location of the first microservice, and obtain a first identification result; the first identification result includes the data compliance identification result and the type of cross-border business rule; The processing module is configured to input the first instruction and the first diagnostic prompt into the large language model when the first recognition result meets preset conditions, and obtain the second instruction output by the large language model; the large language model is associated with the type of the cross-border business rule; The second execution module is used to send the second instruction to the first microservice to invoke the first microservice to re-execute the first task.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the program, it implements the cross-border e-commerce task processing method as described in any one of claims 1 to 8.