A data processing method, apparatus, device, and program product

By separating pricing rules from logic and re-calculating them, the complexity and errors in order amount calculation are solved, data processing consistency and security are achieved, and the system's accuracy and troubleshooting efficiency are improved.

CN122111824APending Publication Date: 2026-05-29GUANGZHOU FAISCO INFORMATON TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU FAISCO INFORMATON TECH
Filing Date
2026-01-23
Publication Date
2026-05-29

Smart Images

  • Figure CN122111824A_ABST
    Figure CN122111824A_ABST
Patent Text Reader

Abstract

The application discloses a data processing method, device and equipment and a program product. The method comprises the following steps: obtaining an order processing request, analyzing the order processing request in combination with a business context, and identifying an order processing rule set; performing a structured processing on the order processing rule set to obtain a code structure body; performing a replay calculation processing on the code structure body through a calculation engine to obtain a calculation result; and performing a comparison and verification processing on the order processing request according to the calculation result to obtain a data processing result. The embodiment of the application can improve the consistency and security of data, and can be widely applied in the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and program product. Background Technology

[0002] With the booming development of e-commerce platforms, order data processing logic is no longer simply the sum of product unit prices. It requires integrating a large number of potentially overlapping or mutually exclusive calculation rules. These rules are typically managed by different business teams and are frequently introduced and modified during application system iterations. Related technologies calculate order amounts by tightly coupling all calculation logic into the core order generation process. However, in practical applications, it has been found that the complex and dynamic combination of rules makes it difficult to test and cover all scenarios for pricing code. Minor logical changes or the introduction of new rules can easily create a ripple effect, leading to calculation errors and affecting data consistency and the atomicity of calculations.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main objective of this application is to provide a data processing method, apparatus, device, and program product that can improve the consistency of data processing and the security of application software.

[0005] To achieve the above objectives, one aspect of this application provides a data processing method, the method comprising:

[0006] Obtain the order processing request, parse the order processing request in conjunction with the business context, and identify the set of order processing rules; The order processing rule set is structured to obtain a code structure; The calculation engine performs re-calculation on the code structure to obtain the calculation result. The order processing request is compared and verified based on the calculation results to obtain the data processing results.

[0007] In some embodiments, parsing the order processing request in conjunction with the business context to identify the order processing rule set includes the following steps: The business context is processed into a feature vector to obtain a context vector; The order processing request is extracted and vectorized to obtain an order vector; The context vector and the order vector are subjected to similarity matching processing. Based on the matching results, the order processing rules in the business context are identified, and the order processing rule set is obtained.

[0008] In some embodiments, the step of structuring the order processing rule set to obtain a code structure includes the following steps: Each order processing rule in the set of order processing rules is segmented into words to obtain a segmented sequence; The word segmentation sequence is identified based on a preset domain dictionary to obtain the operation type and operation value; Based on the order processing request, the operation type and the operation value are associated with a code mapping process to obtain the code structure.

[0009] In some embodiments, the step of performing re-calculation on the code structure using a calculation engine to obtain the calculation result includes the following steps: The code structure is pre-compiled to obtain compiled code; The computation engine executes the compiled code according to a predetermined execution order and replays the rule matching process, and records the computation decision trajectory to obtain the computation result.

[0010] In some embodiments, the step of comparing and verifying the order processing request based on the calculation result to obtain the data processing result includes the following steps: Key decision points are determined based on the calculation results; When a difference is detected between the order processing result of the order processing request and the calculation result, the root cause of the difference is located based on the key decision point to obtain the anomaly rule; The order processing result is updated based on the aforementioned exception rules to obtain the data processing result.

[0011] In some embodiments, the step of identifying the root causes of discrepancies based on the key decision points to obtain anomaly rules includes the following steps: Based on the key decision points, data flow analysis and rule dependency analysis are performed to construct a causal relationship graph. The anomaly rules are obtained by performing backward slicing and forward verification on the key decision points using the causal relationship graph.

[0012] In some embodiments, updating the order processing result based on the anomaly rule to obtain the data processing result includes the following steps: The abnormal rules are subjected to conflict capture and correction processing to obtain corrected rules; The correction rule is processed by propagation path calculation to obtain the critical path; The critical path is recalculated, and the order processing result is updated based on the calculation result to obtain the data processing result.

[0013] To achieve the above objectives, another aspect of this application provides a data processing apparatus, the apparatus comprising: The order parsing module is used to obtain order processing requests, parse the order processing requests in combination with business context, and identify a set of order processing rules. The rule abstraction module is used to perform structured processing on the order processing rule set to obtain a code structure; The replay calculation module is used to perform replay calculations on the code structure through the calculation engine to obtain the calculation results. The comparison and verification module is used to compare and verify the order processing request based on the calculation results to obtain the data processing results.

[0014] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0015] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.

[0016] The embodiments of this application include at least the following beneficial effects: This application provides a data processing method, apparatus, device, and program product. This solution obtains an order processing request, parses the order processing request in conjunction with the business context, and identifies a set of order processing rules. It can identify various processing rules in the business context, improving the accuracy of rule processing. Furthermore, this solution obtains a code structure by structuring the set of order processing rules, and then performs re-calculation processing on the code structure using a calculation engine to obtain the calculation result. Finally, it compares and verifies the order processing request based on the calculation result to obtain the data processing result. This effectively captures calculation errors during code execution, improving system security. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of an implementation environment provided in the embodiments of this application; Figure 2 This is a flowchart of a data processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0019] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0020] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0022] With the booming development of e-commerce platforms, marketing methods are becoming increasingly diversified and complex. Order pricing logic is no longer simply the sum of the unit prices of goods, but requires the integration of a large number of marketing rules that may overlap or be mutually exclusive, such as: direct price reductions, discounts, flash sales, coupons, points redemption, spending-to-refund promotions, shipping fee rules, etc. These rules are usually managed by different business teams and are frequently introduced and modified during system iterations.

[0023] In related technologies, all these pricing logics are tightly coupled into the core order generation process. This architecture has significant drawbacks: 1. High complexity and error-prone: The complex and dynamic combination of rules makes it difficult to test the pricing code to cover all scenarios. Even minor logical changes or the introduction of new rules can easily create a ripple effect, leading to calculation errors.

[0024] 2. Lack of effective real-time monitoring: Once an order amount is generated, it is persisted, and the system lacks the ability to perform real-time reverse verification when the order is generated. Abnormal orders can usually only be discovered through manual reconciliation or user complaints afterward, by which time financial losses or negative experiences may have already occurred.

[0025] 3. Difficulty in locating the problem: When an error occurs in the amount, because the calculation process is a black box and the intermediate state is not recorded, it is difficult for developers to reproduce and locate the root cause of the problem, resulting in low troubleshooting efficiency.

[0026] In view of this, this application provides a data processing method, apparatus, device, and program product. This solution separates the definition and extraction of pricing rules from the execution of pricing logic, and abstracts the rules into structured data and persists them, thereby providing an independent and reproducible verification mechanism after an order is generated. The verification mechanism updates the order data, thereby improving the consistency of data processing and the security of the application software.

[0027] This application provides a data processing method, relating to the field of computer technology. The data processing method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the data processing method, but is not limited to the above forms.

[0028] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0029] Figure 1 This is a schematic diagram illustrating the implementation environment of a method provided in this application. (Refer to...) Figure 1 The main hardware and software components of this implementation environment include a terminal 101 and a server 102, which are communicatively connected. The method can be executed based on the interaction between the terminal 101 and the server 102. Furthermore, the terminal 101 and the server 102 can be nodes in a blockchain; this embodiment does not specifically limit this.

[0030] Figure 2 This is an optional flowchart of a data processing method provided in an embodiment of this application. Figure 2 The method may include, but is not limited to, steps S201 to S204.

[0031] Step S201: Obtain the order processing request, parse the order processing request in conjunction with the business context, and identify the order processing rule set; Step S202: Perform structured processing on the order processing rule set to obtain a code structure; Step S203: The code structure is re-performed by the calculation engine to obtain the calculation result; Step S204: Compare and verify the order processing request based on the calculation results to obtain the data processing results.

[0032] Steps S201 to S204 of this embodiment involve parsing the user request and business context during the order request processing to identify all pricing rules applicable to the current order and extracting a set of order processing rules. This set of rules is then structured to obtain a code structure. The extracted processing rules are stored as JSON strings in a JSON structured data format and associated with the order number in a persistent storage device, such as a database or distributed file system. After the order generation process is completed, an asynchronous recalculation task is initiated. This task reads the rule data corresponding to the current order number from the persistent storage device and recalculates the total order price strictly according to the rule definition order. This embodiment uses chained expression evaluation during the calculation process to avoid storing intermediate floating-point results, preventing the accumulation of precision errors and ensuring the determinism of the calculation process. By comparing the result obtained from the recalculation with the data in the order processing request, if there is a discrepancy, an exception handling process is immediately triggered to update the data. Alarm information can also be sent to the monitoring platform, log system, or developers for manual verification.

[0033] One of the above technical solutions has the following advantages or beneficial effects: By providing an independent verification mechanism, the embodiments of this application can effectively capture data processing errors caused by code defects, rule conflicts, dirty data, etc., and greatly improve the data security of the system.

[0034] In some embodiments, parsing the order processing request in conjunction with the business context to identify the order processing rule set includes the following steps: The business context is processed into a feature vector to obtain a context vector; The order processing request is extracted and vectorized to obtain an order vector; The context vector and the order vector are subjected to similarity matching processing. Based on the matching results, the order processing rules in the business context are identified, and the order processing rule set is obtained.

[0035] In this embodiment, convolutional networks can be used to extract features from the business context, such as user dimensions, product dimensions, and environment dimensions, and cross-dimensional correlation features can also be extracted. Then, different types of features are processed using hierarchical encoding techniques: numerical features are standardized and binned, categorical features are embedded or hashed, time-series features are extracted and encoded with statistics, and textual features are encoded using a lightweight text model. Then, multi-source features are integrated into a unified high-dimensional vector through concatenation, attention weighting, or multimodal fusion techniques, and post-processed such as dimensionality reduction and normalization are performed to finally output the context vector. Similarly, feature extraction and vectorization are performed on the request information in the order processing request to obtain the order vector. Finally, the context vector and the order vector are matched for similarity. Based on the matched feature vectors, order processing rules applicable to the current order processing request in the business context can be identified, and a set of order processing rules can be extracted.

[0036] One of the above technical solutions has the following advantages or beneficial effects: By identifying the processing rules in the business context, the embodiments of this application can extract the rules corresponding to the orders that need to be processed, providing a data foundation for subsequent rule calculation and replay.

[0037] In some embodiments, the step of structuring the order processing rule set to obtain a code structure includes the following steps: Each order processing rule in the set of order processing rules is segmented into words to obtain a segmented sequence; The word segmentation sequence is identified based on a preset domain dictionary to obtain the operation type and operation value; Based on the order processing request, the operation type and the operation value are associated with a code mapping process to obtain the code structure.

[0038] In this embodiment, constant values ​​are identified and protected using regular expressions, followed by basic segmentation based on maximum forward matching and a domain dictionary. Next, syntactic analysis and structural annotation are performed to identify the boundaries and nesting relationships of conditional clauses, and business synonyms are normalized and mapped. Finally, a tokenized sequence with type labels and structural relationships is output, resulting in a word sequence. The domain dictionary can collect historical order rule data and extract high-frequency words. Based on these high-frequency words, corresponding atomic operators, business entities, logical connectors, and structural markers can be constructed. Furthermore, synonym mining technology is used to expand operation types and operation values. The domain dictionary can be used to identify and match the segmented sequence to obtain the corresponding operation types and operation values. Finally, based on the order information from the order processing request, the matched operation types and operation values ​​can be associated, and a code structure is obtained through code mapping in JSON string format.

[0039] In some embodiments, the step of performing re-calculation on the code structure using a calculation engine to obtain the calculation result includes the following steps: The code structure is pre-compiled to obtain compiled code; The computation engine executes the compiled code according to a predetermined execution order and replays the rule matching process, and records the computation decision trajectory to obtain the computation result.

[0040] In this embodiment, the structured rule definitions are converted into an abstract syntax tree (API) based on an intermediate representation layer by pre-compiling the code structure. Then, lexical analysis, syntax analysis, and semantic analysis are performed, followed by various optimization strategies such as constant folding, common subexpression elimination, and dead code removal to simplify and optimize the API. Finally, depending on the target execution environment (JVM, CLR, JavaScript engine, or custom virtual machine), the optimized API is converted into corresponding bytecode, machine code, or interpreted intermediate code, and runtime context binding and just-in-time (JIT) compilation triggers are embedded to generate a high-efficiency, serializable, and hot-updateable compiled code package. The compiled code is executed by a computation engine that replays the rule matching process according to a predetermined execution order. The computation engine first loads the pre-compiled, directly executable rule function package and a predefined rule execution sequence table. During replay, the computation engine strictly schedules according to the sequence table, injects a snapshotted order context into each rule, calls the corresponding compiled function for high-speed condition judgment, and records the matching result and intermediate state of each rule. Subsequently, the computing engine arbitrates the matching rule set according to predefined conflict resolution strategies, such as priority and mutual exclusion groups, and finally generates the result according to the action execution function, and records the computing decision trajectory to obtain the computing result.

[0041] One of the above technical solutions has the following advantages or beneficial effects: the embodiments of this application eliminate the overhead of rule interpretation through pre-compilation, enabling single rule evaluation to reach the microsecond level; and through the calculation engine, the complete input, output and time consumption of each rule matching are recorded to generate a fine calculation trace, which improves the debugging efficiency and system transparency of complex rule sets.

[0042] In some embodiments, the step of comparing and verifying the order processing request based on the calculation result to obtain the data processing result includes the following steps: Key decision points are determined based on the calculation results; When a difference is detected between the order processing result of the order processing request and the calculation result, the root cause of the difference is located based on the key decision point to obtain the anomaly rule; The order processing result is updated based on the aforementioned exception rules to obtain the data processing result.

[0043] In this embodiment, key decision points are obtained by automatically identifying nodes that have a decisive impact on the final result, system performance, or business logic from the calculation trajectory in the calculation results. For example, in a rule matching pipeline, the result of a certain condition judgment directly determines whether more than ten subsequent rules are executed; this point has high structural influence and can be identified as a key decision point. When a difference is detected between the order processing result of an order processing request and the calculation result, anomaly rules are obtained by locating the root cause of the difference at the key decision points, and the order processing result is updated based on the anomaly rules to ensure data processing consistency.

[0044] In some embodiments, the step of identifying the root causes of discrepancies based on the key decision points to obtain anomaly rules includes the following steps: Based on the key decision points, data flow analysis and rule dependency analysis are performed to construct a causal relationship graph. The anomaly rules are obtained by performing backward slicing and forward verification on the key decision points using the causal relationship graph.

[0045] In this embodiment, for the input conditions of each key decision point, the data source is analyzed in reverse, and the output result of each key decision point is analyzed. The above analysis results are modeled as directed edges, with the direction pointing from the data provider (cause) to the data consumer (result). The attributes of the edges may include data type, passed value, etc. Then, the explicit or implicit logical relationships between rules are analyzed. Explicit dependencies include priority dependencies, mutual exclusion dependencies, and order dependencies, while implicit dependencies include condition overlap analysis and action conflict analysis. Then, by integrating the analysis results of the first two steps into a directed graph, the nodes of which represent key decision points and are attached with metadata, the edges can be divided into data flow edges to represent information transmission and computational dependencies, and logical dependency edges to represent logical relationships such as triggering, overriding, and conflict between rules, resulting in a causal relationship graph. Then, backward slicing is performed on the key decision points. Starting from the abnormal key decision point, all rule nodes that may directly or indirectly cause the abnormality are found by tracing back along the incoming edges in the causal relationship graph. Furthermore, forward verification is performed on key decision points, and simulation verification is conducted on the suspected rule set obtained by backward slicing. Through controlled experiments, it is confirmed which rule(s) actually caused the observed anomaly, and the anomalous rule is found.

[0046] In some embodiments, updating the order processing result based on the anomaly rule to obtain the data processing result includes the following steps: The abnormal rules are subjected to conflict capture and correction processing to obtain corrected rules; The correction rule is processed by propagation path calculation to obtain the critical path; The critical path is recalculated, and the order processing result is updated based on the calculation result to obtain the data processing result.

[0047] In this embodiment, the abnormal rules undergo conflict capture and correction. This is achieved by checking whether the abnormal rule overlaps with higher-priority rules or mutually exclusive rule sets declared in the system, and by comparing syntax trees to identify whether other rules' conditions are strict subsets or supersets, leading to unexpected overwriting or repeated triggering of execution results. The causal relationship graph is checked for loops introduced by the abnormal rule modification. For the corrected condition boundaries of the abnormal rule, test cases near the boundaries are automatically generated and tested to obtain the corrected rule. Then, starting from the corrected rule node, a graph traversal is performed, recording the path to each node. For each path from the corrected rule node to a leaf node, its metric is calculated. Based on the metric ranking, the most important paths are selected as critical paths. The data processing results are then recalculated based on these critical paths and updated to obtain the final data processing result.

[0048] The solutions of this application embodiment will be described in detail and explained below with reference to specific application examples: The embodiments of this application can be applied to the intersection of e-commerce and computer software technology, and are suitable for handling online transaction systems in complex marketing scenarios. Through the replay verification mechanism, the correctness, consistency and security of the system's calculation of order amount can be guaranteed.

[0049] Specifically, in one feasible embodiment, a customer uses an order transaction system to conduct a product transaction. The customer selects product A, whose original price is 300 yuan. Product A is currently participating in a flash sale with a designated flash sale price of 250 yuan. The customer's current membership level meets the 10% discount requirement and a 10 yuan discount coupon for purchases over 100 yuan has been used. The current member has 50 points, with one point redeemable for 1 yuan. Based on the above, this embodiment can abstract the following rules and generate the final order total price according to the rule order. Then, the abstracted rule set, the original unit price (mallPrice), the purchase quantity (amount), and other original data are used to generate a code structure in a JSON structured data format and stored in a persistent device associated with the order number. An asynchronous replay calculation task is initiated. This task reads the rule data corresponding to the current order number from the persistent device, strictly following the order defined by the rules. The calculation process uses chained expressions to avoid storing intermediate floating-point results, preventing the accumulation of precision errors and ensuring the determinism of the calculation process. The result obtained from the replay calculation is compared with the order amount. If they do not match, an exception handling process is immediately triggered to update the data, or an alarm is sent to the monitoring platform, log system, or developers. Optionally, the order is placed in a "pending review" state to block subsequent processes. If the replay engine has boundary checks, it will directly throw an "illegal product price" exception and log it, thus directly capturing the source of the dirty data. If the replay engine has no checks, it will continue to calculate, but will produce a result that is the same as the original erroneous amount, but is obviously unreasonable. Although the amount comparison is consistent at this time, no alarm will be triggered, but it is clearly recorded in the persistent rule JSON. When this abnormal order is subsequently discovered through financial reconciliation or manual sampling, the JSON file directly points out that the root cause of the problem is an error in the basic product data, which greatly shortens the investigation time. Once the system triggers an alarm due to the inconsistency of the order amount, the operation and maintenance or development personnel can immediately start the following standardized fault investigation process. This process is entirely based on the persistent rule data of this application embodiment, realizing fault location within minutes.

[0050] Engineers don't need to log into the production database or understand complex order placement code. They simply load the acquired rule JSON file into their local development environment or a dedicated "replay debugging tool." Based on the information provided in the JSON, engineers can directly examine the calculation logic for "points deduction" in the original order placement code or check the product price snapshot in the database at that time. The scope of the investigation is drastically narrowed from "the entire order placement system" to "the application logic of a specific rule" or "a specific basic data field." By comparing the code, a bug was indeed found in the original order placement service: when both coupons and points were used, the points deduction amount was incorrectly calculated twice. After fixing the code, it can not only be verified through regular testing, but the previously alerted order rule JSON can also be included as a specific test case in the regression test suite to ensure that the same problem does not occur again.

[0051] Please see Figure 3 This application also provides a data processing apparatus that can implement the above-described data processing method. The apparatus includes: The order parsing module 301 is used to obtain an order processing request, parse the order processing request in combination with the business context, and identify a set of order processing rules. The rule abstraction module 302 is used to perform structured processing on the order processing rule set to obtain a code structure; The replay calculation module 303 is used to perform replay calculation processing on the code structure through the calculation engine to obtain the calculation result; The comparison and verification module 304 is used to perform comparison and verification processing on the order processing request based on the calculation results, and obtain the data processing results.

[0052] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0053] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0054] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0055] Please see Figure 4 , Figure 4 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401. Input / output interface 403 is used to implement information input and output; The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404); The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.

[0056] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0057] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0058] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0059] This application provides a data processing method, apparatus, device, and program product. This solution acquires an order processing request, parses the request in conjunction with the business context, and identifies a set of order processing rules. It can identify various processing rules within the business context, improving the accuracy of rule processing. Furthermore, this solution performs structured processing on the order processing rule set to obtain a code structure, and then uses a calculation engine to re-perform calculations on the code structure to obtain calculation results. Finally, it compares and verifies the order processing request based on the calculation results to obtain the data processing result. This effectively captures calculation errors during code execution, improving system security.

[0060] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0061] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0062] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; 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.

[0063] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0064] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0065] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0066] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0067] The units described above 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0068] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or 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 multiple 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 of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0070] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A data processing method, characterized in that, The method includes the following steps: Obtain the order processing request, parse the order processing request in conjunction with the business context, and identify the set of order processing rules; The order processing rule set is structured to obtain a code structure; The calculation engine performs re-calculation on the code structure to obtain the calculation result. The order processing request is compared and verified based on the calculation results to obtain the data processing results.

2. The method according to claim 1, characterized in that, The process of parsing the order processing request in conjunction with the business context to identify the order processing rule set includes the following steps: The business context is processed into a feature vector to obtain a context vector; The order processing request is extracted and vectorized to obtain an order vector; The context vector and the order vector are subjected to similarity matching processing. Based on the matching results, the order processing rules in the business context are identified, and the order processing rule set is obtained.

3. The method according to claim 1, characterized in that, The process of structuring the order processing rule set to obtain a code structure includes the following steps: Each order processing rule in the set of order processing rules is segmented into words to obtain a segmented sequence; The word segmentation sequence is identified based on a preset domain dictionary to obtain the operation type and operation value; Based on the order processing request, the operation type and the operation value are associated with a code mapping process to obtain the code structure.

4. The method according to claim 1, characterized in that, The process of replaying the calculation of the code structure using a calculation engine to obtain the calculation result includes the following steps: The code structure is pre-compiled to obtain compiled code; The computation engine executes the compiled code according to a predetermined execution order and replays the rule matching process, and records the computation decision trajectory to obtain the computation result.

5. The method according to claim 1, characterized in that, The step of comparing and verifying the order processing request based on the calculation result to obtain the data processing result includes the following steps: Key decision points are determined based on the calculation results; When a difference is detected between the order processing result of the order processing request and the calculation result, the root cause of the difference is located based on the key decision point to obtain the anomaly rule; The order processing result is updated based on the aforementioned exception rules to obtain the data processing result.

6. The method according to claim 5, characterized in that, The process of identifying the root causes of discrepancies based on the key decision points to obtain anomaly rules includes the following steps: Based on the key decision points, data flow analysis and rule dependency analysis are performed to construct a causal relationship graph. The anomaly rules are obtained by performing backward slicing and forward verification on the key decision points using the causal relationship graph.

7. The method according to claim 5, characterized in that, The process of updating the order processing result based on the anomaly rules to obtain the data processing result includes the following steps: The abnormal rules are subjected to conflict capture and correction processing to obtain corrected rules; The correction rule is processed by propagation path calculation to obtain the critical path; The critical path is recalculated, and the order processing result is updated based on the calculation result to obtain the data processing result.

8. A data processing apparatus, characterized in that, The device includes: The order parsing module is used to obtain order processing requests, parse the order processing requests in combination with business context, and identify a set of order processing rules. The rule abstraction module is used to perform structured processing on the order processing rule set to obtain a code structure; The replay calculation module is used to perform replay calculations on the code structure through the calculation engine to obtain the calculation results. The comparison and verification module is used to compare and verify the order processing request based on the calculation results to obtain the data processing results.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

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