Order communication data query methods, systems, and media based on order status changes

By monitoring order status changes and optimizing cache usage, the performance bottleneck of order communication data query was resolved, enabling fast and complete compliance queries and meeting the real-time requirements of compliance auditing.

CN122086984APending Publication Date: 2026-05-26ZHEJIANG BEICAI ZHISHEN NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG BEICAI ZHISHEN NETWORK TECH CO LTD
Filing Date
2026-04-24
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the financial and similar heavily regulated sectors, traditional order communication and data query methods face problems such as high query latency, low caching efficiency, and high resource consumption during order processing, which cannot meet the real-time and resource utilization requirements of compliance checks.

Method used

By monitoring order status changes, especially order creation status, historical communication data is obtained and stored in the cache area. Historical and real-time data are merged, compliant queries are performed, data preloading and cleanup mechanisms are triggered, and cache usage is optimized.

Benefits of technology

It significantly improved the performance of order communication data query, reduced cross-database query time, ensured the real-time and completeness of query results, and improved the system resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086984A_ABST
    Figure CN122086984A_ABST
Patent Text Reader

Abstract

This application relates to a method, system, and medium for querying order communication data based on order status changes. The method includes: monitoring the status of a target order, where the target order status includes an order creation status used to trigger data preloading; when an order creation status is detected, acquiring historical communication data associated with the target order and storing the historical communication data in a preloaded cache area; in response to receiving a compliant query request for the target order, merging the historical communication data with real-time acquired incremental data to obtain the target order communication data; and performing a compliant query on the target order communication data to obtain the query results. This addresses the problem of how to improve the performance of order communication data querying in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, system, device and medium for querying order communication data based on order status changes. Background Technology

[0002] In the financial and similar heavily regulated sectors, complete documentation of all communication between personnel and customers during order processing (chat logs, operation logs, etc.) is crucial for post-event compliance audits and risk assessments. As business scales up, the volume of this documentation grows explosively, and traditional sharding architectures face the following performance bottlenecks in querying: First, high query latency: cross-database and cross-table queries of massive historical data take a long time, which cannot meet the real-time requirements of compliance checks; Second, low caching efficiency: General caching strategies (such as full caching or random caching) are prone to resource waste and are difficult to accurately cover high-frequency data for compliant queries; Third, high resource consumption: Invalid cache occupies memory for a long time, reducing the overall resource utilization of the system.

[0003] Therefore, no effective solution has yet been proposed for improving the performance of order communication data query methods based on order status changes. Summary of the Invention

[0004] This application provides a method, system, and medium for querying order communication data based on order status changes, in order to at least address the problem of how to improve the performance of order communication data query in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for querying order communication data, the method comprising: Monitor the status of target orders, wherein the status of target orders includes the order creation status used to trigger data preloading; When the order establishment status is monitored, historical communication data associated with the target order is obtained and stored in a preloaded cache area; In response to receiving a compliance query request for the target order, the historical communication data is merged with the incremental data acquired in real time to obtain the target order communication data; Perform a compliance query on the target order communication data and obtain the query results.

[0006] In one embodiment, monitoring the target order status includes: The system uses a listening component deployed in the business system to monitor the status change events of the target order in real time. The listening component is configured to obtain event data, including the status identifier after the change, from status change messages in the message queue or from database triggers. The event data is matched with multiple pre-configured key states; wherein, the key states include order creation status, order pending review status, order approved status, and order completion status, which are used to trigger cache preloading; When the matching result indicates an order creation status, a data preloading mechanism is triggered; when the matching result indicates an order completion status, a cache clearing mechanism is triggered.

[0007] In one embodiment, the step of acquiring historical communication data associated with the target order when the order establishment status is monitored, and storing the historical communication data in a preloaded cache area, includes: When the order establishment status is monitored, multi-dimensional association conditions are constructed based on the order identifier of the target order, combined with the operator identifier and the related party identifier; based on the multi-dimensional association conditions, all related initial historical communication data are extracted from the sharded database and sharded tables. The initial historical communication data is aggregated to obtain a complete historical dataset corresponding to the target order; the end time of the previous natural day corresponding to the current preload execution time is taken as the time cutoff point, and all data with timestamps no later than the time cutoff point are filtered out from the complete historical dataset to obtain historical communication data; The historical communication data is stored in a distributed cache area.

[0008] In one embodiment, the step of using the end time of the previous natural day corresponding to the current preloading execution time as the time cutoff point, and filtering out all data with timestamps no later than the time cutoff point from the complete historical dataset to obtain historical communication data includes: Based on the current preload execution time, obtain the corresponding query date, and calculate the time cutoff point of the previous natural day corresponding to the query date based on the query date; Using the time cutoff point as a filtering condition, the timestamp field of each data record in the complete historical dataset is traversed to extract communication data that is no later than the time cutoff point, thus obtaining historical communication data.

[0009] In one embodiment, the step of responding to receiving a compliance query request for the target order and merging the historical communication data with the real-time acquired incremental data to obtain the target order communication data includes: Receive a compliance query request for the target order, the request including the order identifier and the query time; Based on the order identifier, historical communication data is retrieved from the cache area, wherein the historical communication data is stored in time series format; Based on the query time, obtain the incremental communication data generated from the start time of the query date to the query time; The historical communication data and the incremental communication data are sorted and merged according to timestamps to generate complete order communication data, which is then used as the target order communication data.

[0010] In one embodiment, after performing a compliance query on the target order communication data and obtaining the query results, the method further includes: When an order completion status is detected, the historical communication data in the cache area is cleared.

[0011] In one embodiment, triggering the clearing of the historical communication data in the cache when the order completion status is monitored includes: In response to the detection that the target order has entered the completed state, a cache clearing process is triggered, and the current clearing mode is determined according to the preset cache management strategy. The clearing mode includes automatic clearing mode and manual clearing mode. Based on the order identifier of the target order, locate and delete the historical communication data associated with the order identifier in the cache area; After the deletion operation is executed, obtain the operation feedback and update the resource status record based on the feedback.

[0012] In one embodiment, performing a compliance query on the target order communication data and obtaining the query results includes: Based on the data structure and compliance query conditions of the target order communication data, a query execution strategy including filtering rules and sorting instructions is generated; Based on the query execution strategy, a filtering operation is performed on the target order communication data. By matching at least one dimension of the communication content, participant identification, and time in the target order communication data with the filtering rules, a subset of data that meets the conditions is selected. The data subset is sorted according to the sorting instruction, and the sorted data is encapsulated into structured compliance query results based on a preset audit result template.

[0013] Secondly, embodiments of this application provide an order communication data query system, which is used to execute the methods described above. The system includes a monitoring module, a caching module, a merging module, and a query module; wherein: The monitoring module is used to monitor the status of the target order, wherein the status of the target order includes the order creation status for triggering data preloading; The caching module is used to obtain historical communication data associated with the target order when the order establishment status is monitored, and store the historical communication data in a preloaded cache area; The merging module is used to respond to the compliance query request received from the target order by merging the historical communication data with the real-time incremental data to obtain the target order communication data. The query module is used to perform compliance queries on the target order communication data and obtain query results.

[0014] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements an order communication data query method based on order status changes as described in the first aspect above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an order communication data query method based on order status changes as described in the first aspect above.

[0016] The order communication data query method, system, and medium based on order status changes provided in this application have at least the following technical effects.

[0017] By monitoring the target order status, including the order creation status that triggers data preloading, it is ensured that cache preloading only starts when truly necessary during the order lifecycle. This avoids consuming cache resources for a large number of irrelevant or invalid orders, effectively improving the performance of order communication data queries. When an order creation status is monitored, historical communication data associated with the target order is retrieved and stored in the preloaded cache area. This allows subsequent compliance queries to directly read most data from memory, significantly reducing the most time-consuming cross-database historical data query operation and fundamentally improving query response speed. In response to compliance query requests for the target order, historical communication data is merged with real-time incremental data to obtain the target order communication data, ensuring the completeness and real-time nature of the query results and meeting the compliance audit requirements for the latest and most complete data. Compliance queries are performed on the target order communication data to obtain query results. This addresses the issue of how to improve the performance of order communication data queries in related technologies.

[0018] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a method for querying order communication data based on order status changes; Figure 2 This is a flowchart illustrating step S102 according to an exemplary embodiment; Figure 3 This is a flowchart illustrating step S103 according to an exemplary embodiment; Figure 4 This is a system architecture block diagram of an order communication data query system based on order status changes, according to an exemplary embodiment. Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0021] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0022] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0023] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0024] Firstly, embodiments of this application provide a method for querying order communication data based on order status changes. Figure 1 This is a flowchart of a method for querying order communication data based on order status changes, such as... Figure 1 As shown, the method includes: Step S101: Monitor the status of the target order, wherein the status of the target order includes the order creation status used to trigger data preloading.

[0025] Step S102: When the order creation status is monitored, obtain the historical communication data associated with the target order and store the historical communication data in the preloaded cache area.

[0026] Step S103: In response to the compliance query request received for the target order, merge the historical communication data with the incremental data acquired in real time to obtain the target order communication data.

[0027] Step S104: Perform a compliance query on the target order communication data and obtain the query results.

[0028] In summary, this application provides a method for querying order communication data based on order status changes. By monitoring the target order status, including the order establishment status used to trigger data preloading, it ensures that cache preloading only starts when truly necessary during the order lifecycle. This avoids consuming cache resources for a large number of irrelevant or invalid orders, effectively improving the performance of order communication data queries. When the order establishment status is monitored, historical communication data associated with the target order is obtained and stored in the preloaded cache area. This allows subsequent compliant queries to directly read most of the data from memory, significantly reducing the time-consuming cross-database historical data query operation and fundamentally improving query response speed. By responding to compliant query requests for the target order, historical communication data is merged with real-time incremental data to obtain the target order communication data, ensuring the completeness and real-time nature of the query results and meeting the requirements of compliance audits for the latest and most complete data. Compliance queries are performed on the target order communication data to obtain query results. This addresses the problem of how to improve the performance of order communication data queries in related technologies.

[0029] In one embodiment, step S101 involves monitoring the target order status, where the target order status includes the order creation status used to trigger data preloading. Specifically, this includes the following steps: Step S1011: Listen for status change events of target orders in real time through a listening component deployed in the business system; the listening component is configured to obtain event data including the status identifier after the change from status change messages in the message queue or from database triggers; Step S1012: Match the event data with multiple pre-configured key states; wherein, the key states include the order creation state, the order pending review state, the order review approved state, and the order completion state, which are used to trigger cache preloading; Step S1013: When the matching result is an order creation status, a data preloading mechanism is triggered; when the matching result is an order completion status, a cache clearing mechanism is triggered.

[0030] Optionally, a monitoring component (such as a standalone microservice or an application-layer proxy) deployed in the order business system can be used to monitor the entire lifecycle of the order status in real time. This component simultaneously monitors two core data sources to ensure the integrity and reliability of the evidence chain: first, it monitors message queues used for communication between business services (such as Kafka and RocketMQ) to capture state change event messages published by the services; second, it monitors triggers or transaction logs in the business database (such as MySQL's Binlog) to directly capture the final state persistence events of the data layer. The monitoring component extracts event data such as "Order ID" and "Changed Status Identifier" from these events. Subsequently, the system performs real-time matching of the event data with a pre-configured state model reflecting key business and compliance nodes (including "Order Created," "Pending Review," "Review Approved," and "Order Completed"). Based on the matching results, the system automatically generates precise control commands: if a match is found in the "Order Created" state, a command is generated to trigger a data preloading mechanism; if a match is found in the "Review Approved" or "Order Completed" state, a command is generated to trigger the corresponding order cache cleanup mechanism.

[0031] Step S101 ensures the timeliness and reliability of state capture through real-time event listening, and ensures that cache preloading is only started when it is truly necessary in the order lifecycle, thus avoiding the occupation of cache resources for a large number of irrelevant or invalid orders from the source, and effectively improving the performance of order communication data query.

[0032] In one embodiment, Figure 2 This is a flowchart illustrating step S102 according to an exemplary embodiment, as follows: Figure 2 As shown, in step S102, when the order creation status is monitored, historical communication data associated with the target order is obtained and stored in a pre-loaded cache area. This specifically includes the following steps: Step S1021: When the order establishment status is monitored, construct multi-dimensional association conditions based on the order identifier of the target order, combined with the operator identifier and the related party identifier; based on the multi-dimensional association conditions, extract all related initial historical communication data from the sharded database and sharded table.

[0033] Step S1022: Aggregate the initial historical communication data to obtain a complete historical dataset corresponding to the target order; using the end time of the previous natural day corresponding to the current pre-loading execution time as the time cutoff point, filter out all data with timestamps no later than the time cutoff point from the complete historical dataset to obtain the historical communication data. Specifically, this includes: Based on the current preload execution time, obtain the corresponding query date, and calculate the time cutoff point of the previous natural day corresponding to the query date; By using the time cutoff point as a filtering condition, we iterate through the timestamp field of each data record in the complete historical dataset and extract communication data that is no later than the time cutoff point to obtain historical communication data.

[0034] Step S1023: Store historical communication data in a distributed cache area.

[0035] Optionally, when the system detects an order entering the creation state, it first constructs a correlation condition based on the order's identifier (order ID), combined with predefined operator identifiers (such as account manager ID) and related party identifiers (such as customer ID), consisting of these three business dimensions. Based on this condition, the system queries the underlying sharded database, utilizing the composite indexes built on these dimensions to efficiently and in parallel extract all related initial communication data fragments (such as chat logs and operation logs scattered across different database tables). Next, the system aggregates this fragmented initial data in memory, forming a complete historical dataset organized chronologically and corresponding to the target order. Then, using the current preloaded task trigger time (e.g., 00:00 daily) as a baseline, the system calculates the end time of the previous natural day (i.e., 23:59:59 yesterday) as the precise time cutoff point. It iterates through each record in the complete historical dataset, checks its timestamp, and filters out all data records whose timestamps are no earlier than the order creation time and no later than the calculated cutoff point, ultimately obtaining a complete historical communication dataset up to the end of the previous day. Finally, the system serializes this data and loads it into a distributed cache such as a Redis cluster. Specifically, a scheduled task is automatically executed every day at midnight (e.g., 00:00) to compress historical data up to the previous day (T-1 data) and load it into a distributed cache (e.g., Redis). The cache key is designed as "Order ID_Personnel ID_Customer ID_T-1".

[0036] Step S102 extracts data through multi-dimensional correlations of orders, personnel, and customers, ensuring the completeness and accuracy of data retrieved from the complex sharded database structure and avoiding data omissions. Secondly, a filtering strategy using a fixed time point (the end of the previous calendar day) creatively generates stable "historical data." This allows subsequent compliance queries to be deterministically divided into two steps: quickly reading this data and querying only new data added after this snapshot time point in real time. This fundamentally avoids the performance bottleneck of needing to fully scan historical data for every query. Finally, historical communication data is stored in a distributed cache cluster, providing high-throughput, low-latency access capabilities.

[0037] In one embodiment, Figure 3 This is a flowchart illustrating step S103 according to an exemplary embodiment, as follows: Figure 3As shown, step S103 involves responding to a compliance query request received for a target order by merging historical communication data with real-time incremental data to obtain the target order communication data. This specifically includes the following steps: Step S1031: Receive a compliance query request for the target order, including the order identifier and query time; Step S1032: Based on the order identifier, retrieve historical communication data from the cache area, wherein the historical communication data is stored in time series format; Step S1033: Based on the query time, obtain the incremental communication data generated from the start time of the query date to the query time; Step S1034: Sort and merge the historical communication data and incremental communication data according to timestamps to generate complete order communication data, and use the complete order communication data as the target order communication data.

[0038] Optionally, when a staff member initiates a query, the system receives a request including the target "order identifier" and the "query time". The system then executes the query process: First, based on the order identifier, the system uses the corresponding structured data (e.g., incorporating the order ID and T-1 date identifier) ​​to accurately locate and retrieve historical communication data from the cache area. This data is pre-organized into a time series format according to the generation timestamp in the cache for fast sequential access. Next, based on the query time, the system parses the query date and immediately accesses the business database directly through the real-time query interface to retrieve all incremental communication data generated from the start time of that date (e.g., 00:00) to the query time. Finally, the system merges the two parts of data: it creates a merge buffer, loading the historical communication data from the cache area and the incremental communication data retrieved in real-time, then globally sorts each record according to its timestamp field, inserting the incremental data at the end of the historical time series, thereby generating a complete, sequentially continuous communication data stream from order creation to the query time, which is then used as the final "target order communication data".

[0039] Furthermore, the merging logic is as follows: When compliance personnel make a query, the system first retrieves T-1 historical data from the cache, then retrieves the newly added data for the day through the real-time query interface (such as filtering by order ID + the date of the day), and generates a complete trace record by concatenating the data (such as merging by timestamp sorting); Real-time guarantee: The data for the day is directly queried from the business database to ensure that newly added communication records are obtained without delay.

[0040] Step S103 firstly, by transforming the most time-consuming historical data queries into instantaneous reads of pre-loaded cache areas, and performing real-time database queries on incremental data within a very short time window (from midnight of the day to the query time), massive data scanning across databases and tables throughout the entire time period is fundamentally avoided, reducing performance overhead. Secondly, using the query time as the cutoff point for incremental data acquisition ensures that any communication records generated just before the query are captured and merged, meeting the stringent requirements of zero-latency data for compliance audits. Global sorting and merging based on timestamps guarantees data from both the cache (yesterday and earlier) and the database (today), greatly improving the accuracy and reliability of audit results.

[0041] In one embodiment, step S104 involves performing a compliance query on the target order communication data and obtaining the query results. Specifically, this includes: Step S1041 generates a query execution strategy, including filtering rules and sorting instructions, based on the data structure and compliance query conditions of the target order communication data; Step S1042, based on the query execution strategy, performs a filtering operation on the target order communication data. By matching at least one dimension of the communication content, participant identification, and time in the target order communication data with the filtering rules, a subset of data that meets the conditions is selected. Step S1043 sorts the data subset according to the sorting instruction, and encapsulates the sorted data into a structured compliant query result based on the preset audit result template.

[0042] Optionally, after obtaining complete target order communication data, the system first parses the conditions carried in the compliance query request (e.g., querying all communications of a customer service representative within a specific time period). Based on the inherent data structure of the complete dataset (e.g., each record contains fields such as communication content, sender ID, receiver ID, and timestamp) and the parsed query conditions, a query execution strategy is generated, containing specific filtering rules (e.g., sender ID equals X and timestamp is between A and B) and sorting instructions (e.g., in ascending order by timestamp). Next, based on this strategy, the system performs filtering operations on the target order communication data: it scans the data records in parallel, quickly matching multiple dimensions such as communication content (keyword matching), participant identifiers (precise comparison), and timestamps (range determination) in each record against the filtering rules in the strategy, filtering out a subset of records that fully meet the conditions. Then, according to the sorting instructions in the strategy (e.g., in chronological order), this data subset is sorted. Finally, the system calls a preset audit result template (which defines the report title, field order, display format, etc.), automatically fills the sorted data into the corresponding positions in the template, and encapsulates it into a well-structured, standardized compliance query result document that can be directly submitted or reviewed.

[0043] In one embodiment, after performing a compliance query on the target order communication data and obtaining the query results in step S104, the method further includes: When an order completion status is detected, historical communication data in the cache area is cleared. Specifically, this includes: In response to the detection that a target order has entered the completed state, the cache clearing process is triggered, and the current clearing mode is determined according to the preset cache management strategy. The clearing modes include automatic clearing mode and manual clearing mode. Based on the order identifier of the target order, locate and delete historical communication data associated with the order identifier in the cache area; After the deletion operation is executed, obtain the operation feedback and update the resource status record based on the feedback.

[0044] Optionally, the system continuously monitors target orders. Once a target order is detected as completed, or a compliance check pass instruction is received via a callback interface, the cache cleanup process is immediately triggered. Upon triggering, the execution mode for this cleanup is determined based on a preset cache management strategy (based on business load, cache capacity, or priority rules): in automatic cleanup mode, subsequent steps are executed directly without manual confirmation; if determined by the strategy or through administrator intervention in the background, manual cleanup mode is entered, awaiting final confirmation from the administrator. Once the mode is determined, the system locates and deletes historical communication data associated with the target order's order identifier in the cache area. To enhance system robustness and handle anomalies (such as network interruptions causing automatic cleanup failure), the system also has scheduled background cleanup tasks (e.g., weekly) to scan and clean up redundant cache data that remains or expires due to anomalies. After each deletion operation, the system synchronously obtains operation feedback from the cache system (e.g., successful deletion) and strictly updates its internal resource status records based on this feedback to ensure that the system's understanding of cache resource usage is consistent with the actual situation.

[0045] By using an automatic triggering mechanism driven by business status (order completed / approved), it ensures that cached data is cleaned up in a timely manner after it loses its business value, fundamentally solving the technical problem of invalid cache occupying valuable memory for a long time, and significantly improving the overall resource utilization of the system.

[0046] In summary, this application provides a method for querying order communication data based on order status changes. By monitoring the target order status, including the order establishment status used to trigger data preloading, it ensures that cache preloading only starts when truly necessary during the order lifecycle. This avoids consuming cache resources for a large number of irrelevant or invalid orders, effectively improving the performance of order communication data queries. When the order establishment status is monitored, historical communication data associated with the target order is obtained and stored in the preloaded cache area. This allows subsequent compliant queries to directly read most of the data from memory, significantly reducing the time-consuming cross-database historical data query operation and fundamentally improving query response speed. By responding to compliant query requests for the target order, historical communication data is merged with real-time incremental data to obtain the target order communication data, ensuring the completeness and real-time nature of the query results and meeting the requirements of compliance audits for the latest and most complete data. Compliance queries are performed on the target order communication data to obtain query results. This addresses the problem of how to improve the performance of order communication data queries in related technologies.

[0047] Secondly, embodiments of this application provide an order communication data query system based on order status changes. Figure 4 This is a system architecture block diagram illustrating an order communication data query system based on order status changes, according to an exemplary embodiment. For example... Figure 4 As shown, the system includes a monitoring module 410, a caching module 420, a merging module 430, and a query module 440.

[0048] The monitoring module 410 is used to monitor the status of the target order, wherein the status of the target order includes the order creation status used to trigger data preloading; The cache module 420 is used to obtain historical communication data associated with the target order when the order establishment status is monitored, and store the historical communication data in the preloaded cache area; The merging module 430 is used to respond to the compliance query request received for the target order, merge historical communication data with real-time incremental data, and obtain the target order communication data. The query module 440 is used to perform compliance queries on target order communication data and obtain query results.

[0049] In summary, the order communication data query system based on order status changes provided in this application solves the problem of how to improve the performance of order communication data query in related technologies through the synergistic effect of the monitoring module 410, the caching module 420, the merging module 430 and the query module 440.

[0050] Specifically, by monitoring the target order status, including the order creation status used to trigger data preloading, it is ensured that cache preloading only starts when truly necessary during the order lifecycle. This avoids consuming cache resources for a large number of irrelevant or invalid orders, effectively improving the performance of order communication data queries. When the order creation status is monitored, historical communication data associated with the target order is retrieved and stored in the preloaded cache area. This allows subsequent compliance queries to directly read most of the data from memory, significantly reducing the most time-consuming cross-database historical data query operation and fundamentally improving query response speed. In response to compliance query requests for the target order, historical communication data is merged with real-time incremental data to obtain the target order communication data, ensuring the completeness and real-time nature of the query results and meeting the compliance audit requirements for the latest and most complete data. Compliance queries are then performed on the target order communication data to obtain the query results. This addresses the issue of how to improve the performance of order communication data queries in related technologies.

[0051] It should be noted that the order communication data query system based on order status changes provided in this embodiment is used to implement the above-described implementation methods, and details already described will not be repeated. As used above, the terms "module," "unit," and "subunit" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the above embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0052] Thirdly, embodiments of this application provide an electronic device, Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. (e.g.) Figure 5 As shown, the electronic device may include a processor 51 and a memory 52 storing computer program instructions.

[0053] Specifically, the processor 51 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0054] The memory 52 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 52 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 52 may include removable or non-removable (or fixed) media. Where appropriate, the memory 52 may be internal or external to a data processing device. In a particular embodiment, the memory 52 is non-volatile memory. In a particular embodiment, the memory 52 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0055] The memory 52 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 51.

[0056] The processor 51 reads and executes computer program instructions stored in the memory 52 to implement any of the order communication data query methods based on order status changes in the above embodiments.

[0057] In one embodiment, an order communication data query device based on order status changes may further include a communication interface 53 and a bus 50. Wherein, as Figure 5 As shown, the processor 51, memory 52, and communication interface 53 are connected through bus 50 and complete communication with each other.

[0058] The communication interface 53 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of this application. The communication interface 53 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0059] Bus 50 includes hardware, software, or both, that couples together components of an order communication data query device based on order status changes. Bus 50 includes, but is not limited to, at least one of the following: Data Bus, Address Bus, Control Bus, Expansion Bus, and Local Bus. For example, and not as a limitation, bus 50 may include Accelerated GraphicsPort (AGP) or other graphics buses, Extended Industry Standard Architecture (EISA) buses, Front Side Bus (FSB), HyperTransport (HT) interconnects, Industry Standard Architecture (ISA) buses, InfiniBand interconnects, Low Pin Count (LPC) buses, memory buses, Micro Channel Architecture (MCA) buses, Peripheral Component Interconnect (PCI) buses, PCI-Express (PCI-X) buses, Serial Advanced Technology Attachment (SATA) buses, Video Electronics Standards Association Local Bus (VLB) buses, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 50 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0060] Fourthly, embodiments of this application provide a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, it implements the order communication data query method based on order status changes provided in the first aspect.

[0061] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0062] In a possible implementation, the present invention can also be implemented as a program product comprising program code, which, when the program product is run on a terminal device, causes the terminal device to perform steps implementing the order communication data query method based on order status changes provided in the first aspect.

[0063] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0064] 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.

[0065] The embodiments described above are merely illustrative 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. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for querying order communication data based on order status changes, characterized in that, The method includes: Monitor the status of target orders, wherein the status of target orders includes the order creation status used to trigger data preloading; When the order establishment status is monitored, historical communication data associated with the target order is obtained and stored in a preloaded cache area; In response to receiving a compliance query request for the target order, the historical communication data is merged with the incremental data acquired in real time to obtain the target order communication data; Perform a compliance query on the target order communication data and obtain the query results.

2. The method for querying order communication data based on order status changes according to claim 1, characterized in that, When the order establishment status is monitored, the step of obtaining historical communication data associated with the target order and storing the historical communication data in a pre-loaded cache area includes: When the order establishment status is monitored, multi-dimensional association conditions are constructed based on the order identifier of the target order, combined with the operator identifier and the related party identifier; based on the multi-dimensional association conditions, all related initial historical communication data are extracted from the sharded database and sharded tables. The initial historical communication data is aggregated to obtain a complete historical dataset corresponding to the target order; the end time of the previous natural day corresponding to the current preload execution time is taken as the time cutoff point, and all data with timestamps no later than the time cutoff point are filtered out from the complete historical dataset to obtain historical communication data; The historical communication data is stored in a distributed cache area.

3. The method for querying order communication data based on order status changes according to claim 2, characterized in that, The process involves using the end time of the previous natural day corresponding to the current preloading execution time as the time cutoff point, and filtering out all data with timestamps no later than the time cutoff point from the complete historical dataset to obtain historical communication data, including: Based on the current preload execution time, obtain the corresponding query date, and calculate the time cutoff point of the previous natural day corresponding to the query date based on the query date; Using the time cutoff point as a filtering condition, the timestamp field of each data record in the complete historical dataset is traversed to extract communication data that is no later than the time cutoff point, thus obtaining historical communication data.

4. The method for querying order communication data based on order status changes according to claim 1, characterized in that, In response to receiving the compliance query request for the target order, the historical communication data is merged with the incremental data acquired in real time to obtain the target order communication data, including: Receive a compliance query request for the target order, the request including the order identifier and the query time; Based on the order identifier, historical communication data is retrieved from the cache area, wherein the historical communication data is stored in time series format; Based on the query time, obtain the incremental communication data generated from the start time of the query date to the query time; The historical communication data and the incremental communication data are sorted and merged according to timestamps to generate complete order communication data, which is then used as the target order communication data.

5. The method for querying order communication data based on order status changes according to claim 1, characterized in that, After performing a compliance query on the target order communication data and obtaining the query results, the method further includes: When an order completion status is detected, the historical communication data in the cache area is cleared.

6. The method for querying order communication data based on order status changes according to claim 5, characterized in that, When an order completion status is detected, the process of triggering the clearing of historical communication data in the cache includes: In response to the detection that the target order has entered the completed state, a cache clearing process is triggered, and the current clearing mode is determined according to the preset cache management strategy. The clearing mode includes automatic clearing mode and manual clearing mode. Based on the order identifier of the target order, locate and delete the historical communication data associated with the order identifier in the cache area; After the deletion operation is executed, obtain operation feedback and update the resource status record based on the feedback.

7. The method for querying order communication data based on order status changes according to claim 1, characterized in that, The monitored target order status includes: The system uses a listening component deployed in the business system to monitor the status change events of the target order in real time. The listening component is configured to obtain event data, including the status identifier after the change, from status change messages in the message queue or from database triggers. The event data is matched with multiple pre-configured key states; wherein, the key states include order creation status, order pending review status, order approved status, and order completion status, which are used to trigger cache preloading; When the matching result indicates an order creation status, a data preloading mechanism is triggered; when the matching result indicates an order completion status, a cache clearing mechanism is triggered.

8. The method for querying order communication data based on order status changes according to claim 1, characterized in that, The compliance query of the target order communication data and the acquisition of query results include: Based on the data structure and compliance query conditions of the target order communication data, a query execution strategy including filtering rules and sorting instructions is generated; Based on the query execution strategy, a filtering operation is performed on the target order communication data. By matching at least one dimension of the communication content, participant identification, and time in the target order communication data with the filtering rules, a subset of data that meets the conditions is selected. The data subset is sorted according to the sorting instruction, and the sorted data is encapsulated into structured compliance query results based on a preset audit result template.

9. An order communication data query system based on order status changes, characterized in that, The system is used to execute the method according to any one of claims 1 to 8, and the system includes a monitoring module, a caching module, a merging module, and a query module; wherein: The monitoring module is used to monitor the status of the target order, wherein the status of the target order includes the order creation status for triggering data preloading; The caching module is used to obtain historical communication data associated with the target order when the order establishment status is monitored, and store the historical communication data in a preloaded cache area; The merging module is used to respond to the compliance query request received from the target order by merging the historical communication data with the real-time incremental data to obtain the target order communication data. The query module is used to perform compliance queries on the target order communication data and obtain query results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements an order communication data query method based on order status changes as described in any one of claims 1 to 8.