Order processing method and device, computer equipment and storage medium
By employing dynamic degradation strategies, multi-channel standardized mapping, and a sharded database architecture, the problems of order failure and inconsistent formats in the multi-channel order processing system were resolved, improving the order success rate and processing efficiency, preventing system lag, and achieving dynamic adaptation and automated processing.
Patent Information
- Application Number
- CN202511517430.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-02-06
AI Technical Summary
Existing order processing systems face challenges such as low order success rates, low operational efficiency, high development and maintenance costs, and system performance bottlenecks caused by high-concurrency orders when accepting orders from multiple channels. In particular, they lack effective mechanisms to deal with data degradation on third-party platforms.
By adopting a dynamic degradation strategy and multi-channel standardized mapping, and through legality and signature verification, key data extraction and standardized processing, combined with a database sharding and table partitioning architecture based on store hashes, dynamic adaptation and repair processes for order data are achieved.
It improved the success rate of automated order acceptance in scenarios with incomplete data, avoided system lag under high concurrency, and improved processing efficiency and automation level.
Smart Images

Figure CN121481663A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to an order processing method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the rapid development of Internet technology, the business model of the catering, retail and other industries is becoming increasingly diversified. Merchants often receive orders through multiple channels such as Meituan, Ele.me and mini programs. This multi-channel operation mode brings order growth, but also poses a serious challenge to the order processing system in the background.
[0003] Currently, the order receiving system in the industry relies on the interface provided by each third-party platform to pull or receive orders. However, this dependent architecture has obvious drawbacks. First, when the third-party platform experiences data degradation (such as missing key information such as product details and delivery address) due to system load, network fluctuations and other reasons, the related technology lacks an effective automatic response mechanism. It can only passively refuse to receive the order or rely on manual intervention to complete the data, resulting in a low order receiving success rate and low operational efficiency. Second, the order data formats and field definitions of different channels differ greatly. Related technologies often need to develop custom adaptation logic for each channel, resulting in high development and maintenance costs, and making it difficult to quickly support the access of new channels. Finally, in the face of high-concurrency order flow generated during promotions or peak periods, the existing monolithic database architecture is prone to performance bottlenecks, resulting in slow order storage and query response, and even causing system lag or downtime, affecting normal business processes. SUMMARY
[0004] Therefore, it is necessary to provide an order processing method, device, computer equipment and storage medium that can improve order receiving efficiency and success rate to solve the above technical problems.
[0005] In a first aspect, an order processing method is provided, the method comprising: obtaining first order data; verifying the first order data to obtain a first verification result, the first verification result including a legality verification result and a signature verification result; in response to the first verification result meeting a first preset standard, parsing the first order data to obtain key data, and performing standardization processing on the key data to obtain second order data; verifying the second order data to obtain a second verification result, and determining a state label of the second order data according to the second verification result, the second verification result including a data integrity verification result; In response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0006] Optionally, the first order data is verified to obtain a first verification result, including: The first order data is parsed to obtain verification information, which includes at least one of the following: channel identifier, digital signature, and timestamp. The first order data is determined based on the order push request. The legitimacy of the channel identity is verified based on the channel identifier. If the legitimacy verification fails, the order push request is blocked. Based on the key corresponding to the channel identifier and the preset signature algorithm, the target digital signature of the first order data is determined; The target digital signature is compared with the digital signature; in response to the comparison failure, the order push request is intercepted. The first verification result is defined as the legality verification result and the digital signature comparison result. In response to the legality verification being passed and the target digital signature being successfully compared with the digital signature, it is determined that the first verification result meets the first preset standard.
[0007] Optionally, in response to the first verification result conforming to a first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain second order data, including: In response to the first verification result meeting the first preset standard, key data is extracted from the first order data, and the key data includes at least one of the following: channel product identifier, channel store identifier, and receiving information; Based on the channel store identifier and the first mapping relationship table, the target store code is determined. The first mapping relationship table is used to store the mapping relationship between the channel store identifier and the store code. Based on the channel product identifier, the target store code, and the second mapping relationship table, the target product code is determined. The second mapping relationship table is used to store the mapping relationship between the channel product identifier and the product code. The second order data is generated based on the target store code, the target product code, and the delivery information.
[0008] Optionally, the second order data is verified to obtain a second verification result, and based on the second verification result, the status label of the second order data is determined to include: Based on the importance of the fields, the second order data is divided into core fields and non-core fields; Perform data integrity verification on the core fields and the non-core fields respectively; Since the data integrity verification of both the core field and the non-core field is passed, the status label corresponding to the second order data is defined as normal. In response to the failure of data integrity verification for the core field, and / or the failure of data integrity verification for the non-core field, the status label of the second order data is defined as abnormal.
[0009] Optionally, in response to the status tag conforming to the second preset standard, the dynamic degradation processing of the second order data includes: In response to the status tag of the second order data being abnormal, it is determined that the status tag meets the second preset standard; In response to the status label meeting the second preset standard and the data integrity verification of the core field failing, a reverse query is performed on the core field; In response to a successful reverse query, the core fields are updated based on the reverse query result, and the order corresponding to the second order data is defined as a normal order. In response to a failed reverse query, the order corresponding to the second order data is defined as an abnormal order and an alarm is triggered. In response to the status tag meeting the second preset standard and the data integrity verification of the core field passing and the data integrity verification of the non-core field failing, the order corresponding to the second order data is defined as an order with incomplete non-core fields, and the second order data is sent to the order information completion queue to complete the order information for the non-core fields.
[0010] Optionally, after obtaining the first verification result, the method includes: In response to the first verification result conforming to the first preset standard, the first order data and the metadata of the first order data are encapsulated into a standard message format of the message queue. The encapsulated first order data is sent to a message queue for storage.
[0011] Optionally, the method further includes: Obtain the target store code from the second order data; Select the target data of the target store code and perform hash calculation on the target data to determine the table partitioning index; Based on the table partitioning index, the target database and target data table are determined; The second order data after dynamic downgrade processing or the second order data that does not meet the second preset standard, as well as the status information of the second order data, are stored in the target data table of the target database and synchronized to the distributed cache, and an expiration time is set. Based on the expiration time, expired stored data is determined and stored in the historical database.
[0012] Secondly, an order processing apparatus is provided, the apparatus comprising: The data acquisition module is used to acquire the data for the first order. The first verification module is used to verify the first order data and obtain a first verification result, which includes a legality verification result and a signature verification result. The first data processing module is used to, in response to the first verification result conforming to the first preset standard, parse the first order data to obtain key data, and perform standardization processing on the key data to obtain the second order data; The second verification module is used to verify the second order data, obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. The second data processing module is used to dynamically downgrade the second order data in response to the status tag meeting the second preset standard, and save the processing result. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0013] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Obtain the first order data; The first order data is verified to obtain a first verification result, which includes a legality verification result and a signature verification result. In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; The second order data is verified to obtain a second verification result, and the status label of the second order data is determined based on the second verification result. The second verification result includes a data integrity verification result. In response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0014] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps: Obtain the first order data; The first order data is verified to obtain a first verification result, which includes a legality verification result and a signature verification result. In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; The second order data is verified to obtain a second verification result, and the status label of the second order data is determined based on the second verification result. The second verification result includes a data integrity verification result. In response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0015] Fifthly, a computer program product is provided, the computer program product comprising a computer program, which, when executed by a processor, performs the following steps: Obtain the first order data; The first order data is verified to obtain a first verification result, which includes a legality verification result and a signature verification result. In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; The second order data is verified to obtain a second verification result, and the status label of the second order data is determined based on the second verification result. The second verification result includes a data integrity verification result. In response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0016] The aforementioned order processing method, apparatus, computer equipment, and storage medium, the method comprising: acquiring first order data; verifying the first order data to obtain a first verification result, the first verification result including a legality verification result and a signature verification result; in response to the first verification result conforming to a first preset standard, parsing the first order data to obtain key data, and standardizing the key data to obtain second order data; verifying the second order data to obtain a second verification result, and determining a status label for the second order data based on the second verification result, the second verification result including data integrity. Verification results; in response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing results are saved. The dynamic downgrade processing describes the repair process triggered by the importance of fields for orders with incomplete data. This application solves the problems of order acceptance failure and inconsistent formats among multiple channels when third-party data is downgraded based on dynamic downgrade strategy and multi-channel standardized mapping, improves the success rate of automated order acceptance in scenarios with incomplete data, and effectively avoids system lag under high concurrency by combining a database sharding and table partitioning architecture based on store hash, and transforms order processing from static dependency to dynamic adaptation, thereby improving processing efficiency and automation level. Attached Figure Description
[0017] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a diagram illustrating the application environment of an order processing method in one embodiment; Figure 2 This is a schematic diagram of the overall flow of an order processing method in one embodiment; Figure 3 This is another overall flowchart of the order processing method in one embodiment; Figure 4 This is a schematic diagram of the standardized parsing and mapping process of an order processing method in one embodiment; Figure 5 This is a structural block diagram of an order processing device in one embodiment; Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] It should be understood that, in the description of this application, unless the context explicitly requires it, words such as "including" or "comprising" throughout the specification should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0021] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0022] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0023] The order processing method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.
[0024] In one embodiment, such as Figure 2 As shown, an order processing method is provided, which is applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps: S1: Get the first order data.
[0025] It should be noted that the first order data is determined based on the order push request, which comes from orders from multiple channels such as Meituan, Ele.me, and mini-programs. The first order data may include product identification, quantity, and delivery address.
[0026] S2: Verify the first order data to obtain a first verification result, which includes a legality verification result and a signature verification result.
[0027] It should be noted that verification includes both legitimacy verification and digital signature verification.
[0028] S3: In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data.
[0029] It should be noted that the first preset standard refers to the successful verification of legality and digital signature. The key data refers to the product ID (identifier), store identifier, and receipt information, etc. The standardization process refers to mapping the key data into standardized codes. For example, if the product name "name" is "signature milk tea", then "signature milk tea" is matched with the product database and mapped to the product code PRODUCT_2024. If the store field "shop_id" is "MT_008877", then MT_008877 is looked up in the mapping table and mapped to the store code STORE_1001. Based on the store code, product code, and receipt information, the second order data is constructed.
[0030] S4: Verify the second order data to obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result.
[0031] It should be noted that status labels refer to normal and abnormal labels, and integrity verification includes core field integrity verification and non-core field integrity verification.
[0032] S5: In response to the status label meeting the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0033] It should be noted that the second preset standard refers to the status label being in an abnormal state, and dynamic degradation processing refers to performing a reverse lookup on the core fields and completing the non-core fields.
[0034] In the above implementation, the dynamic degradation strategy and multi-channel standardized mapping solve the problems of order failure and inconsistent formats among multiple channels when third-party data is downgraded, and improve the success rate of automated order acceptance in scenarios with incomplete data. At the same time, combined with the database sharding architecture based on store hash, it effectively avoids system lag under high concurrency and transforms order processing from static dependency to dynamic adaptation, thereby improving processing efficiency and automation level.
[0035] In some specific implementations, such as Figure 3 As shown, the first verification result obtained by verifying the first order data includes: The first order data is parsed to obtain verification information, which includes at least one of the following: channel identifier, digital signature, and timestamp. The first order data is determined based on the order push request. The legitimacy of the channel identity is verified based on the channel identifier. In response to the failure of the legitimacy verification, the order push request is intercepted. That is, the legitimacy of the signature is verified by "appid + signature algorithm". Specifically, the extracted appid is searched in the pre-configured whitelist to verify whether the channel identity has been authorized to access. If the appid is invalid or unauthorized, it is determined to be an illegal request, which is directly intercepted and logged. Based on the key corresponding to the channel identifier and the preset signature algorithm, the target digital signature of the first order data is determined; The target digital signature is compared with the digital signature. In response to the comparison failure, the order push request is intercepted. That is, using the key bound to the current appid, a signature value is recalculated for the received order message according to the signature algorithm (such as HMAC-SHA256) pre-agreed with the channel. This calculated signature value is compared with the digital signature carried in the request. If the comparison fails, it is determined to be an illegal request and is intercepted. The first verification result is defined as the legality verification result and the digital signature comparison result. In response to the legality verification being passed and the target digital signature being successfully compared with the digital signature, it is determined that the first verification result meets the first preset standard.
[0036] In some specific embodiments, after obtaining the first verification result, the method includes: In response to the first verification result conforming to the first preset standard, the first order data and the metadata of the first order data are encapsulated into a standard message format of a message queue, wherein the message queue refers to the RocketMQ message queue; The first order data, after being encapsulated and processed, is sent to a message queue for storage. This means that valid orders are stored in the RocketMQ message queue buffer to avoid peak pressure.
[0037] In some specific implementations, in response to the first verification result conforming to a first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain second order data, including: In response to the first verification result meeting the first preset standard, key data is extracted from the first order data. The key data includes at least one of the following: channel product identifier, channel store identifier, and receiving information, namely, product ID, store ID, and receiving information. Based on the channel store identifier and the first mapping relationship table, the target store code is determined. The first mapping relationship table is used to store the mapping relationship between the channel store identifier and the store code. That is, the channel store identifier is compared with the mapping relationship in the first mapping table to match the target store code corresponding to the channel store identifier. Specifically, the POS terminal information is matched based on the brand code and the store code to ensure accurate order distribution. The POS terminal is used for order reception and status feedback. Based on the channel product identifier, the target store code, and the second mapping table, the target product code is determined. The second mapping table stores the mapping relationship between the channel product identifier and the product code; that is, it associates the store product database through code matching and name matching. If the matching fails, an alarm is triggered. Specifically, as shown... Figure 4 As shown, the system receives product information, determines whether a code exists, and if it exists, it automatically matches the code. If the match is successful, it calls the function; if the match fails, it uses name matching. If the match is successful, it calls the function; if the match fails, it issues an alarm. If the code does not exist, it matches the name. If the match is successful, it calls the function; if the match fails, it issues an alarm. The second order data is generated based on the target store code, the target product code, and the delivery information.
[0038] In some specific implementations, the second order data is verified to obtain a second verification result, and based on the second verification result, the status label of the second order data is determined to include: Based on the importance of the fields, the second order data is divided into core fields and non-core fields. The importance of the fields is determined by a preset mapping table, which stores the mapping relationship between importance and fields. For example, product details and shipping address are fields with high importance and are defined as core fields, while discount details and commission are fields with lower importance and are defined as non-core fields. Data integrity verification is performed on the core fields and non-core fields respectively, such as the Meituan incmp_modules field and the Eleme downgraded field. Data integrity verification refers to the system checking whether the core fields and non-core fields in the order data are complete, exist and are valid to determine whether the order is qualified to be processed normally. In response to the successful data integrity verification of both the core fields and the non-core fields, the status label corresponding to the second order data is defined as normal. That is, if the core fields (product details, shipping address, etc.) are complete, the data will directly enter the storage process. In response to the failure of data integrity verification for the core field, and / or the failure of data integrity verification for the non-core field, the status label of the second order data is defined as abnormal.
[0039] In some specific implementations, dynamically downgrading the second order data in response to the status tag conforming to a second preset standard includes: In response to the status tag of the second order data being abnormal, it is determined that the status tag meets the second preset standard; In response to the status label meeting the second preset standard and the data integrity verification of the core field failing, a reverse query is performed on the core field. A reverse query refers to actively calling back to the interface of the third-party platform (such as Meituan / Eleme / Mini Program API) when the order data pushed by the third-party platform is detected to be incomplete, and retrieving a complete set of order data to fill in the missing information. In response to a successful reverse query, the core fields are updated based on the reverse query result, and the order corresponding to the second order data is defined as a normal order. In response to a failed reverse query, the order corresponding to the second order data is defined as an abnormal order and an alarm is triggered. Specifically, if the core fields are missing, a third-party interface reverse query is triggered (the number of queries is configurable, such as a maximum of 2 queries for Meituan and configurable reverse queries for Eleme). If the reverse query is successful, the data is completed; if it fails, it is marked as an "abnormal order" and an alarm is triggered, and orders cannot be accepted at the same time. In response to the status label meeting the second preset standard and the data integrity verification of the core field passing, and the data integrity verification of the non-core field failing, the order corresponding to the second order data is defined as an order with incomplete non-core fields. The second order data is sent to the order information completion queue to complete the order information for the non-core fields. At this time, only non-core fields (such as discount details and commissions) are missing, and they are marked as orders with incomplete non-core fields. For example, if they are marked as "accounting abnormality", the order continues to be accepted and the second order data corresponding to the non-core field is included in the completion queue to complete the order information for the non-core fields. For example, "accounting abnormality orders" are scanned periodically through XX-Job (scheduled task), and third-party interfaces such as Meituan / Eleme are called to complete discount details, actual amount received, etc. After completion, the database is updated, and the status is pushed to the store POS terminal and channel platform. Alarms are triggered for abnormal orders. For example, if more than 5 orders are counted within 1 hour according to the time window, an alarm is triggered. At the same time, the order status (accepted / abnormal) is pushed to the corresponding channel platform and store POS terminal in real time.
[0040] In some specific embodiments, the method further includes: Obtain the target store code from the second order data; Select the target data of the target store code, such as the last three digits of the target store code, and perform hash calculation on the target data to determine the table partitioning index. That is, use hash algorithms such as MD5 to generate a fixed-length digital fingerprint, then convert a part of the fingerprint into an integer, and finally use modulo operation to evenly map it to the preset number of partitions to obtain a unique table partitioning index, such as converting the first 16 bits of the hash value into an integer %16. Based on the sharded index, the target database and target data table are determined. The target database and target data table are the databases and data tables in the sharded database architecture, such as 8 databases and 16 tables. If the sharded index of the order is 12, its target location is the order_table_12 table in the 6th database. The second order data, after dynamic degradation processing or if it does not meet the second preset standard, along with the status information of the second order data, will be stored in the target data table of the target database and synchronized to the distributed cache. An expiration time will be set, where the distributed cache is Redis (key is the order number, value is the order status). The expiration time can be set according to actual needs, such as 2 months. Based on the expiration time, expired stored data is determined and stored in the historical database. That is, real-time data is retained for 2 months and historical data is archived in ClickHouse (historical database).
[0041] The above order processing method includes: acquiring first order data; verifying the first order data to obtain a first verification result, the first verification result including a legality verification result and a signature verification result; in response to the first verification result conforming to a first preset standard, parsing the first order data to obtain key data, and standardizing the key data to obtain second order data; verifying the second order data to obtain a second verification result, and determining a status label for the second order data based on the second verification result, the second verification result including a data integrity verification result; in response to the status label conforming to a second preset standard, performing dynamic degradation processing on the second order data, and saving the processing result. The dynamic degradation processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data. This application, based on dynamic degradation strategy and multi-channel standardized mapping, solves the problems of order acceptance failure and inconsistent multi-channel formats when third-party data is downgraded, improves the success rate of automated order acceptance in scenarios with incomplete data, and, combined with a sharded database architecture based on store hash, effectively avoids system lag under high concurrency, and transforms order processing from static dependency to dynamic adaptation, improving processing efficiency and automation level.
[0042] It should be understood that, although Figures 2-4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2-4 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0043] In one embodiment, such as Figure 5 As shown, an order processing device is provided, comprising: a data acquisition module, a first verification module, a first data processing module, a second verification module, and a second data processing module, wherein: The data acquisition module is used to acquire the data for the first order. The first verification module is used to verify the first order data and obtain a first verification result, which includes a legality verification result and a signature verification result. The first data processing module is used to, in response to the first verification result conforming to the first preset standard, parse the first order data to obtain key data, and perform standardization processing on the key data to obtain the second order data; The second verification module is used to verify the second order data, obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. The second data processing module is used to dynamically downgrade the second order data in response to the status tag meeting the second preset standard, and save the processing result. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0044] In a preferred embodiment of the present invention, the first verification module is specifically used for: The first order data is parsed to obtain verification information, which includes at least one of the following: channel identifier, digital signature, and timestamp. The first order data is determined based on the order push request. The legitimacy of the channel identity is verified based on the channel identifier. If the legitimacy verification fails, the order push request is blocked. Based on the key corresponding to the channel identifier and the preset signature algorithm, the target digital signature of the first order data is determined; The target digital signature is compared with the digital signature; in response to the comparison failure, the order push request is intercepted. The first verification result is defined as the legality verification result and the digital signature comparison result. In response to the legality verification being passed and the target digital signature being successfully compared with the digital signature, it is determined that the first verification result meets the first preset standard.
[0045] In a preferred embodiment of the present invention, the first data processing module is specifically used for: In response to the first verification result meeting the first preset standard, key data is extracted from the first order data, and the key data includes at least one of the following: channel product identifier, channel store identifier, and receiving information; Based on the channel store identifier and the first mapping relationship table, the target store code is determined. The first mapping relationship table is used to store the mapping relationship between the channel store identifier and the store code. Based on the channel product identifier, the target store code, and the second mapping relationship table, the target product code is determined. The second mapping relationship table is used to store the mapping relationship between the channel product identifier and the product code. The second order data is generated based on the target store code, the target product code, and the delivery information.
[0046] In a preferred embodiment of the present invention, the second verification module is specifically used for: Based on the importance of the fields, the second order data is divided into core fields and non-core fields; Perform data integrity verification on the core fields and the non-core fields respectively; Since the data integrity verification of both the core field and the non-core field is passed, the status label corresponding to the second order data is defined as normal. In response to the failure of data integrity verification for the core field, and / or the failure of data integrity verification for the non-core field, the status label of the second order data is defined as abnormal.
[0047] In a preferred embodiment of the present invention, the second data processing module is specifically used for: In response to the status tag of the second order data being abnormal, it is determined that the status tag meets the second preset standard; In response to the status label meeting the second preset standard and the data integrity verification of the core field failing, a reverse query is performed on the core field; In response to a successful reverse query, the core fields are updated based on the reverse query result, and the order corresponding to the second order data is defined as a normal order. In response to a failed reverse query, the order corresponding to the second order data is defined as an abnormal order and an alarm is triggered. In response to the status tag meeting the second preset standard and the data integrity verification of the core field passing and the data integrity verification of the non-core field failing, the order corresponding to the second order data is defined as an order with incomplete non-core fields, and the second order data is sent to the order information completion queue to complete the order information for the non-core fields.
[0048] In a preferred embodiment of the present invention, the device further includes a data storage module, which is specifically used for: In response to the first verification result conforming to the first preset standard, the first order data and the metadata of the first order data are encapsulated into a standard message format of the message queue. The encapsulated first order data is sent to a message queue for storage.
[0049] In a preferred embodiment of the present invention, the data storage module is further configured to: Obtain the target store code from the second order data; Select the target data of the target store code and perform hash calculation on the target data to determine the table partitioning index; Based on the table partitioning index, the target database and target data table are determined; The second order data after dynamic downgrade processing or the second order data that does not meet the second preset standard, as well as the status information of the second order data, are stored in the target data table of the target database and synchronized to the distributed cache, and an expiration time is set. Based on the expiration time, expired stored data is determined and stored in the historical database.
[0050] Specific limitations regarding the order processing device can be found in the limitations of the order processing method described above, and will not be repeated here. Each module in the aforementioned order processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0051] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an order processing method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0052] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0053] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: S1: Retrieve the first order data; S2: Verify the first order data to obtain a first verification result, which includes a legality verification result and a signature verification result; S3: In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; S4: Verify the second order data to obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. S5: In response to the status label meeting the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0054] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: S1: Retrieve the first order data; S2: Verify the first order data to obtain a first verification result, which includes a legality verification result and a signature verification result; S3: In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; S4: Verify the second order data to obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. S5: In response to the status label meeting the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0055] In one embodiment, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, performs the following steps: S1: Retrieve the first order data; S2: Verify the first order data to obtain a first verification result, which includes a legality verification result and a signature verification result; S3: In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; S4: Verify the second order data to obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. S5: In response to the status label meeting the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
[0056] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0057] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0058] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. An order processing method, characterized in that, The method includes: Obtain the first order data; The first order data is verified to obtain a first verification result, which includes a legality verification result and a signature verification result. In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data; The second order data is verified to obtain a second verification result, and the status label of the second order data is determined based on the second verification result. The second verification result includes a data integrity verification result. In response to the status label conforming to the second preset standard, the second order data is dynamically downgraded and the processing result is saved. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
2. The order processing method according to claim 1, characterized in that, The first verification result obtained by verifying the first order data includes: The first order data is parsed to obtain verification information, which includes at least one of the following: channel identifier, digital signature, and timestamp. The first order data is determined based on the order push request. The legitimacy of the channel identity is verified based on the channel identifier. If the legitimacy verification fails, the order push request is blocked. Based on the key corresponding to the channel identifier and the preset signature algorithm, the target digital signature of the first order data is determined; The target digital signature is compared with the digital signature; in response to the comparison failure, the order push request is intercepted. The first verification result is defined as the legality verification result and the digital signature comparison result. In response to the legality verification being passed and the target digital signature being successfully compared with the digital signature, it is determined that the first verification result meets the first preset standard.
3. The order processing method according to claim 1, characterized in that, In response to the first verification result conforming to the first preset standard, the first order data is parsed to obtain key data, and the key data is standardized to obtain the second order data, including: In response to the first verification result meeting the first preset standard, key data is extracted from the first order data, and the key data includes at least one of the following: channel product identifier, channel store identifier, and receiving information; Based on the channel store identifier and the first mapping relationship table, the target store code is determined. The first mapping relationship table is used to store the mapping relationship between the channel store identifier and the store code. Based on the channel product identifier, the target store code, and the second mapping relationship table, the target product code is determined. The second mapping relationship table is used to store the mapping relationship between the channel product identifier and the product code. The second order data is generated based on the target store code, the target product code, and the delivery information.
4. The order processing method according to claim 1, characterized in that, The second order data is verified to obtain a second verification result. Based on the second verification result, the status labels of the second order data are determined to include: Based on the importance of the fields, the second order data is divided into core fields and non-core fields; Perform data integrity verification on the core fields and the non-core fields respectively; Since the data integrity verification of both the core field and the non-core field is passed, the status label corresponding to the second order data is defined as normal. In response to the failure of data integrity verification for the core field, and / or the failure of data integrity verification for the non-core field, the status label of the second order data is defined as abnormal.
5. The order processing method according to claim 4, characterized in that, In response to the status label conforming to the second preset standard, the dynamic degradation processing of the second order data includes: In response to the status tag of the second order data being abnormal, it is determined that the status tag meets the second preset standard; In response to the status label meeting the second preset standard and the data integrity verification of the core field failing, a reverse query is performed on the core field; In response to a successful reverse query, the core fields are updated based on the reverse query result, and the order corresponding to the second order data is defined as a normal order. In response to a failed reverse query, the order corresponding to the second order data is defined as an abnormal order and an alarm is triggered. In response to the status tag meeting the second preset standard and the data integrity verification of the core field passing and the data integrity verification of the non-core field failing, the order corresponding to the second order data is defined as an order with incomplete non-core fields, and the second order data is sent to the order information completion queue to complete the order information for the non-core fields.
6. The order processing method according to claim 2, characterized in that, After obtaining the first verification result, the method includes: In response to the first verification result conforming to the first preset standard, the first order data and the metadata of the first order data are encapsulated into a standard message format of the message queue. The encapsulated first order data is sent to a message queue for storage.
7. The order processing method according to claim 5, characterized in that, The method further includes: Obtain the target store code from the second order data; Select the target data of the target store code and perform hash calculation on the target data to determine the table partitioning index; Based on the table partitioning index, the target database and target data table are determined; The second order data after dynamic downgrade processing or the second order data that does not meet the second preset standard, as well as the status information of the second order data, are stored in the target data table of the target database and synchronized to the distributed cache, and an expiration time is set. Based on the expiration time, expired stored data is determined and stored in the historical database.
8. An order processing device, characterized in that, The device includes: The data acquisition module is used to acquire the data for the first order. The first verification module is used to verify the first order data and obtain a first verification result, which includes a legality verification result and a signature verification result. The first data processing module is used to, in response to the first verification result conforming to the first preset standard, parse the first order data to obtain key data, and perform standardization processing on the key data to obtain the second order data; The second verification module is used to verify the second order data, obtain a second verification result, and determine the status label of the second order data based on the second verification result. The second verification result includes a data integrity verification result. The second data processing module is used to dynamically downgrade the second order data in response to the status tag meeting the second preset standard, and save the processing result. The dynamic downgrade processing is used to describe the repair process triggered by the importance of fields for orders with incomplete data.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.