Commodity inventory multi-dimensional query management method and system for multi-terminal equipment

By constructing query dimension correlation diagrams and allocating tasks, the product inventory query is optimized, and the problem of unsatisfactory query response speed of terminal equipment is solved, and efficient multi-dimensional query management is achieved.

CN120470067APending Publication Date: 2025-08-12ZHEJIANG LEMENG INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510607645.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

Traditional commodity inventory management methods are difficult to meet the diverse query needs of different terminal devices, resulting in unsatisfactory query response speed and reducing the efficiency of inventory query management.

Method used

Build a query dimension association diagram, generate a dimension priority sequence, divided into strong correlation dimension groups and weak correlation dimension groups, combine the hardware performance of multi-end devices to allocate tasks, and optimize data processing and transmission through a ring data cache queue and an adaptive transmission window mechanism.

Benefits of technology

It improves query efficiency, reduces system resource consumption, enhances the reliability and real-timeness of data transmission, and adapts to the needs of different terminal equipment and network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470067A_ABST
    Figure CN120470067A_ABST
Patent Text Reader

Abstract

The invention discloses a commodity inventory multi-dimensional query management method and system oriented to multi-terminal equipment, and relates to the technical field of information and communication specially suitable for the management purpose, in the method, a query dimension association graph is constructed, and a dimension priority sequence is generated; dividing the query dimensions into a strong association dimension group and a weak association dimension group; distributing query tasks in the weak association dimension group for each processing pipeline; constructing an annular data cache queue, and storing a query result of the strong association dimension group into a continuous storage unit of the annular cache queue; reading strong association dimension data from the annular cache queue, asynchronously obtaining weak association dimension data, and recombining query results according to a dimension priority sequence; performing hierarchical compression on the recombined query result based on a data compression algorithm; and according to the network state of the multi-terminal device, the compressed query result is sent to the multi-terminal device in batches through a self-adaptive transmission window mechanism. The method and the device are used for improving the efficiency of commodity inventory query management in a complex multi-dimensional query scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of information and communication technology specifically suitable for management purposes, and in particular relates to a multi-dimensional query management method and system for commodity inventory for multiple terminal devices. Background Art

[0002] With the rapid development of e-commerce, inventory management has become a critical business process for major enterprises. Traditional inventory management methods often rely on a single-dimensional query method, which is difficult to meet the diverse inventory information query needs of users on different terminal devices. They also lack data real-time and accuracy, reducing enterprise operational efficiency and user experience.

[0003] In related technologies, microservice decoupling can be used to divide inventory management functions into multiple independent service modules and achieve real-time data synchronization through high-performance message queues. Intelligent forecasting algorithms are also integrated to automatically adjust inventory levels based on historical data. Support for multi-terminal device access enables real-time query and intelligent analysis of inventory data.

[0004] However, in complex multi-dimensional query scenarios, since relevant technologies use a unified data processing and display solution for different terminal devices, they do not fully consider the differences in hardware performance, network conditions and usage scenarios of various terminal devices. As a result, the query response speed on some terminal devices is not ideal, which reduces the efficiency of product inventory query management. Summary of the Invention

[0005] The present application provides a multi-dimensional query management method and system for commodity inventory on multiple devices, which is used to improve the efficiency of commodity inventory query management in complex multi-dimensional query scenarios.

[0006] In a first aspect, the present application provides a multi-dimensional query management method for commodity inventory on multiple devices, which receives a commodity inventory query request sent by multiple devices, the commodity inventory query request including query dimension information and device identification information; Construct a query dimension association graph based on the query dimension information, and calculate the shortest dependency path between nodes in the query dimension association graph based on graph theory algorithms to generate a dimension priority sequence; Perform a separability analysis on the dimension priority sequence and divide the query dimensions into a strongly correlated dimension group and a weakly correlated dimension group; Obtaining hardware performance parameters of multiple devices based on device identification information, and determining the number of data processing pipelines based on the hardware performance parameters; Assign query tasks in weakly associated dimension groups to each processing pipeline; Build a circular data cache queue and store the query results of the strongly associated dimension group into the continuous storage units of the circular cache queue; Read strongly associated dimension data from the ring buffer queue through polling, obtain weakly associated dimension data asynchronously, and reorganize the query results according to the dimension priority sequence; Perform hierarchical compression on the reorganized query results based on the data compression algorithm; The compressed query results are sent to multiple devices in batches through an adaptive transmission window mechanism according to the network status of the multiple devices.

[0007] By adopting the above technical solution, by constructing a query dimension association graph and using graph theory algorithms to calculate the shortest dependency path, the relationship between query dimensions is quantified and optimized, thereby generating a reasonable dimension priority sequence. By dividing query dimensions into strong and weak association groups and combining the hardware performance of multiple devices to perform task allocation, the computing resources of the device can be fully utilized. The design of the circular data cache queue enables the continuous storage and rapid reading of strongly associated dimension data, while asynchronously obtaining weakly associated dimension data improves parallel processing efficiency. Hierarchical compression based on the data compression algorithm reduces the amount of data transmitted, and the adaptive transmission window mechanism dynamically adjusts the transmission strategy according to the network status, improving query efficiency, reducing system resource consumption, and improving the reliability and real-time performance of data transmission. This enables the system to better adapt to the needs of different terminal devices and network environments, and improves the efficiency of product inventory query management in complex multi-dimensional query scenarios.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, a separability analysis is performed on the dimension priority sequence to divide the query dimensions into a strongly associated dimension group and a weakly associated dimension group, specifically including: Extract the query frequency of each node in the dimension priority sequence and obtain the data reference relationship between each node; Calculate the coupling degree between adjacent nodes in the dimension priority sequence based on query frequency and data reference relationship; Organizing the coupling degree into a dimensional coupling matrix, and dividing the dimensional coupling matrix into a plurality of sub-matrix blocks based on a preset coupling degree threshold; The average coupling degree of the internal nodes of each sub-matrix block is calculated, and the nodes in the sub-matrix blocks with an average coupling degree greater than a preset coupling degree threshold are divided into a strong correlation dimension group, and the nodes in the sub-matrix blocks with an average coupling degree not greater than the preset coupling degree threshold are divided into a weak correlation dimension group.

[0009] By employing this technical solution, we calculate the degree of inter-dimensional coupling by analyzing query frequency and data reference relationships, and visualize it using a dimension coupling matrix, making the dimension splitting process more scientific and precise. By partitioning the dimension coupling matrix based on preset coupling thresholds, we can accurately identify closely related dimension combinations. This data-feature-based dimension grouping method enables more efficient parallel processing of query tasks, reduces data exchange overhead between dimensions, improves query performance, and makes the entire query process more efficient.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, allocating query tasks in a weakly associated dimension group to each processing pipeline specifically includes: Calculate the maximum task processing capacity of each processing pipeline based on the historical processing data of each processing pipeline; Count the number of data records and query condition complexity of each node in the weakly associated dimension group, and calculate the resource consumption value of each query task; According to the maximum task processing capacity of each processing pipeline, query tasks are allocated one by one according to resource consumption values from high to low.

[0011] By employing the above technical solution, we accurately assess the processing capacity of the processing pipeline by analyzing its historical processing data. Task allocation is then combined with the resource consumption characteristics of query tasks, ensuring full and rational utilization of system resources. This strategy of allocating tasks from high to low resource consumption avoids uneven processing pipeline load and reduces task processing wait times. This task allocation method considers the complexity of query conditions and the number of data records, making task allocation more precise, better balancing processing efficiency and resource utilization, and improving overall query performance.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after sending the compressed query results to the multiple devices in batches through an adaptive transmission window mechanism according to the network status of the multiple devices, the method further includes: Detect network bandwidth fluctuations of multiple devices and generate network quality assessment reports; Calculate the optimal transmission window size and transmission time interval based on the network quality assessment report; The compressed query results are stored hierarchically according to data priority, which is determined by the dimension priority sequence; When it is detected that the network bandwidth is greater than the preset bandwidth, data with a data priority greater than the average data priority is transmitted first; When it is detected that the network bandwidth is not greater than the preset bandwidth, the transmission of data whose data priority is not greater than the average data priority is suspended.

[0013] By adopting the above technical solution, we achieve real-time awareness of network status by continuously monitoring network bandwidth fluctuations and generating network quality assessment reports. We dynamically adjust the transmission window size and transmission interval based on the assessment report, allowing the data transmission strategy to adapt to changes in the network environment. Query results are stored hierarchically according to data priority and selectively transmitted based on network bandwidth status, ensuring the timely delivery of important data. This strategy prioritizes the transmission of high-priority data when the network is healthy and suspends the transmission of low-priority data when the network is poor. This avoids network congestion and data loss, improves data transmission reliability and efficiency, and ensures the timely delivery of query results.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, calculating the optimal transmission window size and transmission time interval according to the network quality assessment report specifically includes: Extract network bandwidth fluctuation frequency and fluctuation amplitude data from the network quality assessment report; Determine the benchmark transmission time interval based on the frequency of network bandwidth fluctuations, and determine the benchmark transmission window size based on the amplitude of network bandwidth fluctuations; When the network bandwidth is greater than the preset bandwidth, the transmission window size is set to a first preset multiple of the reference transmission window size, and the transmission time interval is set to a second preset multiple of the reference transmission time interval; When the network bandwidth is not greater than the preset bandwidth, the transmission window size is set to the second preset times of the reference transmission window size, and the transmission time interval is set to the first preset times of the reference transmission time interval.

[0015] By adopting the above technical solution, network bandwidth fluctuation frequency and amplitude data are extracted from the network quality assessment report and used to determine the baseline transmission time interval and baseline transmission window size, respectively, thus establishing a mapping relationship between network status and transmission parameters. Based on this, the system dynamically adjusts the transmission window size and the transmission time interval multiple based on the comparison results of the real-time network bandwidth and the preset bandwidth. When the network bandwidth is good, data transmission efficiency is improved by increasing the transmission window and shortening the transmission interval; when the network bandwidth is limited, the network load is reduced by reducing the transmission window and extending the transmission interval. This enables the system to maintain stable data transmission performance in different network environments, reducing both network bandwidth waste and transmission failures caused by network congestion, while also improving the system's network resource utilization efficiency and data transmission reliability.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after sending the compressed query results to the multiple devices in batches through an adaptive transmission window mechanism according to the network status of the multiple devices, the method further includes: Count the access frequency of each storage unit in the ring cache queue, and mark the storage unit with an access frequency greater than a preset frequency as hot data; Calculate the data differences of hot data at different time points and establish an incremental update index table; Predict the data range that the next query may access based on the incrementally updated index table; Load the latest data in the data range into the free storage cells of the ring buffer queue.

[0017] By adopting the above technical solution, the system identifies hot data by counting the access frequency of the storage units in the circular cache queue, and establishes an incremental update index table by calculating the data differences of the hot data at different time points. The system has established a dynamic tracking mechanism for data access patterns. Based on the incremental update index table, the data range that may be accessed by the next query is predicted, and the relevant data is loaded into the free storage units of the circular cache queue in advance, so that the system has the ability to preload data. This predictive caching mechanism based on access frequency and data differences reduces the number of times the system directly accesses the underlying storage and reduces the response time of data queries. At the same time, since the preloaded data range is calculated by the prediction algorithm, it reduces the waste of memory resources, improves the cache hit rate and memory resource utilization efficiency, and optimizes the system query performance.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, predicting the data range that may be accessed by the next query based on the incrementally updated index table specifically includes: Extract the change time interval and change amplitude of hotspot data from the incremental update index table; Count the access time patterns of hot data and generate access time series; The next access time point is calculated according to the access time series, and the data generated within the change time interval before the next access time point is determined as the data range.

[0019] By adopting the above technical solution, the system constructs a time series analysis model for data access behavior by extracting the change time interval and change amplitude of hot data from the incremental update index table, and generating an access time series based on the access time pattern of hot data. The next access time point is calculated based on the access time series, and the data generated within the change time interval before this time point is determined as the preloading range, so that the system can accurately grasp the time window for data updates. This data range prediction mechanism based on time series analysis improves the timeliness and accuracy of preloaded data and reduces the storage space occupied by invalid data cache. By limiting the prediction range to the valid time interval, it not only ensures the integrity of the cached data, but also avoids the waste of resources caused by too much historical data, and optimizes the system's storage resource allocation efficiency.

[0020] In the second aspect, an embodiment of the present application provides a multi-dimensional query and management system for commodity inventory for multi-terminal devices, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a system, enables the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a system, enables the system to execute the method described in any possible implementation manner in the first aspect.

[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. The present application provides a multi-dimensional query management method for commodity inventory on multi-terminal devices. By constructing a query dimension association graph and using a graph theory algorithm to calculate the shortest dependency path, the relationship between query dimensions is quantified and optimized, thereby generating a reasonable dimension priority sequence. Dividing query dimensions into strong and weak association groups and assigning tasks in combination with the hardware performance of multi-terminal devices can fully utilize the computing resources of the device. The design of the circular data cache queue enables continuous storage and rapid reading of strongly associated dimension data, while asynchronous acquisition of weakly associated dimension data improves parallel processing efficiency. Hierarchical compression based on data compression algorithms reduces the amount of data transmission, and the adaptive transmission window mechanism dynamically adjusts the transmission strategy according to the network status, thereby improving query efficiency, reducing system resource consumption, and improving the reliability and real-time performance of data transmission, so that the system can better adapt to the needs of different terminal devices and network environments, and improve the efficiency of commodity inventory query management in complex multi-dimensional query scenarios.

[0024] 2. The present application provides a multi-dimensional query and management method for commodity inventory for multi-terminal devices, which realizes real-time perception of network status by continuously monitoring network bandwidth fluctuations and generating network quality assessment reports. The transmission window size and transmission time interval are dynamically adjusted according to the assessment report, so that the data transmission strategy can adapt to changes in the network environment. The query results are stored hierarchically according to data priority and selectively transmitted in combination with the network bandwidth status to ensure the timely delivery of important data. The strategy of giving priority to transmitting high-priority data when the network status is good and suspending low-priority data transmission when the network status is poor avoids network congestion and data loss, improves the reliability and efficiency of data transmission, and ensures the timely delivery of query results.

[0025] 3. The present application provides a multi-dimensional query management method for commodity inventory for multi-terminal devices. It identifies hot data by counting the access frequency of storage units in the circular cache queue, and establishes an incremental update index table by calculating the data differences of hot data at different time points. The system establishes a dynamic tracking mechanism for data access patterns. Based on the incremental update index table, the data range that may be accessed by the next query is predicted, and the relevant data is loaded into the free storage units of the circular cache queue in advance, so that the system has the ability to preload data. This predictive caching mechanism based on access frequency and data differences reduces the number of times the system directly accesses the underlying storage and reduces the response time of data queries. At the same time, since the preloaded data range is calculated by the prediction algorithm, the waste of memory resources is reduced, the cache hit rate and memory resource utilization efficiency are improved, and the system query performance is optimized. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of a multi-dimensional query management method for commodity inventory on multiple devices in an embodiment of the present application.

[0027] Figure 2 This is a flow chart of an adaptive data transmission method based on network status in an embodiment of the present application.

[0028] Figure 3 This is a schematic diagram of the physical device structure of a multi-dimensional query and management system for commodity inventory on multiple devices provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The terms used in the following examples of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to any or all possible combinations comprising one or more of the listed items.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0031] The system architecture of the multi-dimensional inventory query management system for multi-terminal devices provided by this application is as follows: Data source layer: Multi-store inventory database (MySQL cluster): stores basic product information, real-time inventory, historical inbound and outbound records, etc. External data integration: connects to ERP system (purchase orders), WMS, and Mercury (online inventory synchronization).

[0032] Service Layer: Search Module: Builds a multi-dimensional index of product inventory (code, barcode, category, brand, expiration date, inventory status, etc.). Reporting Service: Pre-configured analysis templates (such as turnover analysis and expiration date reports). Permission Control Module: Dynamically limits query scope based on RBAC (role-based access control) (e.g., store staff can only view data for their specific store).

[0033] Application layer: Multi-terminal adaptation: APP side: For store members, it provides portable inventory query and supports quick retrieval by scanning codes.

[0034] POS terminal: embedded query interface, supports quick retrieval by scanning QR code.

[0035] Web side: complex reports and visual analysis in the management background (statistics of changes in purchases, sales and inventory, details of inventory in and out).

[0036] All terminals offer the same filtering logic. Supports quick fuzzy input queries (e.g., searching for a product by entering partial information will directly pull relevant data by querying the corresponding name, code, barcode, and other conditional information). Scan code for quick queries (scan the product barcode on the app / POS to jump directly to the details page). Intelligent recommendations based on historical query records (based on user role and operating habits).

[0037] The following uses an embodiment and combines Figure 1 , a multi-dimensional query management method for commodity inventory on multiple devices in an embodiment of the present application is described: See also Figure 1 , which is a flow chart of a multi-dimensional query management method for commodity inventory on multiple devices in an embodiment of the present application.

[0038] S101, receiving a commodity inventory query request sent by multiple devices; The system receives product inventory query requests from multiple devices, which include query dimension information and device identification information. In this step, the system receives product inventory query requests from multiple devices. These devices may include, but are not limited to, various types of terminal devices such as mobile phones, tablets, and desktop computers. The product inventory query requests include query dimension information and device identification information. The query dimension information indicates the specific dimensions of the product inventory to be queried, such as product category, product brand, warehouse location, etc. The device identification information identifies the multiple devices that sent the query request, allowing query results to be subsequently returned to the corresponding devices.

[0039] Specifically, the system can receive product inventory query requests sent by multiple devices in the following ways: the system can provide a network interface, through which multiple devices send HTTP requests or other types of network requests to submit product inventory query requests to the system; the system can also provide a mobile application (App), and multiple devices can send product inventory query requests to the system by filling in relevant information in the App and submitting it; the system can also provide a text message interface, and multiple devices can submit product inventory query requests to the system by sending text messages in a specific format to a designated number.

[0040] S102: Construct a query dimension association graph based on the query dimension information, and calculate the shortest dependency path between nodes in the query dimension association graph based on a graph theory algorithm to generate a dimension priority sequence; In this step, the system constructs a query dimension association graph based on the query dimension information. Using graph theory algorithms, it calculates the shortest dependency paths between nodes in the association graph, generating a dimension priority sequence. The query dimension information includes multiple query dimensions, and different query dimensions may have certain associations, such as the association between the "brand" dimension and the "category" dimension—a brand typically only produces a specific category of products. The system maps each query dimension to a node in the association graph and the associations between dimensions to directed edges between nodes, thereby constructing the query dimension association graph.

[0041] After constructing the query dimension association graph, the system can use the following algorithms to calculate the shortest dependency paths between nodes in the association graph: Floyd algorithm, Dijkstra algorithm, SPFA algorithm, etc. By calculating the shortest dependency paths between nodes, the system can derive a dimension priority sequence, which represents the optimal processing order between query dimensions when performing product inventory queries. For example, if the shortest dependency path between the "Brand" dimension and the "Category" dimension is "Brand → Category", the query should process the "Brand" dimension conditions first, followed by the "Category" dimension conditions.

[0042] S103. Perform a separability analysis on the dimension priority sequence, and divide the query dimensions into a strongly associated dimension group and a weakly associated dimension group; The system performs a separability analysis on the dimension priority sequence and divides the query dimensions into a strongly correlated dimension group and a weakly correlated dimension group, specifically including: extracting the query frequency of each node in the dimension priority sequence and obtaining the data reference relationship between each node; calculating the coupling degree between adjacent nodes in the dimension priority sequence based on the query frequency and the data reference relationship; organizing the coupling degree into a dimension coupling matrix, and dividing the dimension coupling matrix into multiple sub-matrix blocks based on a preset coupling degree threshold; calculating the average coupling degree of the nodes within each sub-matrix block, dividing the nodes in the sub-matrix blocks with an average coupling degree greater than the preset coupling degree threshold into a strongly correlated dimension group, and dividing the nodes in the sub-matrix blocks with an average coupling degree not greater than the preset coupling degree threshold into a weakly correlated dimension group.

[0043] In this step, the system performs a separability analysis on the dimension priority sequence, dividing the query dimensions into strongly correlated and weakly correlated groups. The strength of correlation between different query dimensions varies. Combining dimensions with strong correlations improves query efficiency, while combining dimensions with weak correlations may actually reduce query efficiency. Therefore, the system divides query dimensions into strongly correlated and weakly correlated groups based on the strength of the correlation between them.

[0044] Specifically, the system can use the following method to perform a divisibility analysis of the dimension priority sequence: first, the system extracts the query frequency of each node in the dimension priority sequence and obtains the data reference relationship between each node; then, the system calculates the coupling degree between adjacent nodes in the dimension priority sequence based on the query frequency and the data reference relationship. The higher the coupling degree, the closer the association between the nodes; then, the system organizes the coupling degree into a dimension coupling matrix, and divides the dimension coupling matrix into multiple sub-matrix blocks based on a preset coupling degree threshold; finally, the system calculates the average coupling degree of the nodes within each sub-matrix block, and divides the nodes in the sub-matrix blocks with an average coupling degree greater than the preset coupling degree threshold into a strongly correlated dimension group, and divides the nodes in the sub-matrix blocks with an average coupling degree not greater than the preset coupling degree threshold into a weakly correlated dimension group.

[0045] S104: Acquire hardware performance parameters of the multiple devices based on the device identification information, and determine the number of data processing pipelines according to the hardware performance parameters; In this step, the system obtains the hardware performance parameters of the multi-terminal device based on the device identification information and determines the number of data processing pipelines based on these parameters. Different multi-terminal devices may have significantly different hardware performance parameters. For example, high-end smartphones and standard feature phones have significant performance differences in CPU and memory. To ensure that multi-terminal devices with different performance levels can smoothly complete product inventory queries, the system needs to determine the number of data processing pipelines based on the hardware performance parameters of the multi-terminal devices.

[0046] Specifically, the system can obtain the hardware performance parameters of multi-terminal devices in the following ways: the system can require multi-terminal devices to report their own hardware performance parameters at the same time when sending product inventory query requests, including but not limited to CPU model, number of CPU cores, memory capacity, storage capacity, etc.; the system can also guide the multi-terminal device to download a hardware test program when it accesses the multi-terminal device for the first time. After the test program is run, the hardware performance parameters of the multi-terminal device can be collected and reported to the system; the system can also use the device information query interface provided by a third party to obtain its hardware performance parameters by submitting the unique identification of the multi-terminal device (such as IMEI code, MAC address, etc.).

[0047] After obtaining the hardware performance parameters of multiple devices, the system can determine the number of data processing pipelines based on the following factors: the number of CPU cores. More cores allow for more tasks to be processed in parallel, so more data processing pipelines can be allocated. Memory capacity. Larger memory allows for more simultaneous intermediate results, so more data processing pipelines can be allocated. Network bandwidth. Higher network bandwidth increases data transfer rates, so more data processing pipelines can be allocated. The system can comprehensively consider these factors and determine an appropriate number of data processing pipelines through a weighted calculation.

[0048] If the system finds that a hardware performance parameter of a multi-terminal device is far below the average level when determining the number of data processing pipelines, such as serious insufficient memory capacity, the system can appropriately reduce the number of data processing pipelines, or take more data sharding and release measures during the data processing process to reduce the memory usage of the device and avoid query failures due to insufficient hardware performance.

[0049] S105. Allocate query tasks in the weakly associated dimension group to each processing pipeline; The system assigns query tasks in the weakly associated dimension group to each processing pipeline, specifically including: calculating the maximum task processing capacity of each processing pipeline based on the historical processing data of each processing pipeline; counting the number of data records and the complexity of the query conditions of each node in the weakly associated dimension group, and calculating the resource consumption value of each query task; and allocating query tasks one by one according to the resource consumption value from high to low based on the maximum task processing capacity of each processing pipeline.

[0050] In this step, the system assigns query tasks from weakly correlated dimension groups to each processing pipeline. Query dimensions in weakly correlated dimension groups have low correlation, so they can be split into different processing pipelines for parallel querying, improving query efficiency.

[0051] Specifically, the system can allocate query tasks to processing pipelines in the following manner: first, the system calculates the maximum task processing capacity of each processing pipeline based on the historical processing data of each processing pipeline, which serves as the upper limit of the query tasks that the pipeline can carry; then, the system counts the number of data records and the complexity of the query conditions of each node in the weakly associated dimension group, and calculates the resource consumption value of each query task based on this. The larger the resource consumption value, the more computing resources the task requires; finally, the system allocates query tasks one by one in the order of resource consumption value from high to low based on the maximum task processing capacity of each processing pipeline, so as to make the task processing capacity of each pipeline as close to its upper limit as possible to achieve the purpose of load balancing.

[0052] S106: Build a circular data cache queue, and store the query results of the strongly associated dimension group into continuous storage units of the circular cache queue; In this step, the system constructs a circular data cache queue and stores query results for strongly correlated dimension groups in its contiguous storage units. Because query dimensions within a strongly correlated dimension group are highly correlated, their query results typically need to be combined and used together, making them unsuitable for separate storage. Using a circular cache queue to store query results for strongly correlated dimension groups enables efficient data access and management.

[0053] Specifically, the system can construct a circular data cache queue in the following way: first, the system estimates the required cache space size based on the amount of query result data of the strongly associated dimension group, and allocates a continuous storage area in the memory as the storage space of the cache queue; then, the system divides the storage space into several fixed-size storage units, each storage unit is used to store a query result data; finally, the system links all storage units into a ring structure, the successor pointer of each storage unit points to the next storage unit, and the successor pointer of the tail storage unit points to the head storage unit, forming a circular linked list.

[0054] During the query process, the system can write query results for strongly associated dimension groups one by one into consecutive storage cells in the circular buffer queue. When the circular buffer queue is full, further writes will overwrite the oldest data in the queue. To prevent data from being overwritten and lost, the system can set a write pointer and a read pointer in the circular buffer queue. The write pointer points to the next storage cell that can be written, and the read pointer points to the next storage cell that needs to be read. Together, these two pointers maintain the data access order in the circular buffer queue.

[0055] S107: Read strongly associated dimension data from the ring cache queue in a polling manner, and asynchronously obtain weakly associated dimension data, and reorganize the query results according to the dimension priority sequence; In this step, the system reads strongly correlated dimension data from the circular buffer queue using polling. Polling is a common data access method. The system sequentially accesses each storage unit in the circular buffer queue according to preset time intervals or conditions to obtain query results for strongly correlated dimensions. The system can also use other data access methods, such as event triggering and interrupts, depending on actual needs.

[0056] While reading data from strongly correlated dimensions, the system also needs to asynchronously retrieve data from weakly correlated dimensions. Asynchronous retrieval allows the system to execute multiple data retrieval tasks in parallel without blocking the main thread. Specifically, the system creates independent data retrieval threads for each weakly correlated dimension. These threads execute in parallel with the main thread without interfering with each other. Once all data retrieval tasks are completed, the system merges the data from the strongly correlated dimensions with the data from the weakly correlated dimensions to form a complete query result.

[0057] During the asynchronous retrieval of weakly correlated dimension data, some weakly correlated dimension data may be retrieved slowly, impacting overall query efficiency. To address this issue, the system can set a timeout mechanism. If weakly correlated dimension data remains unretrieved after a preset time threshold, the system will first return the partially retrieved data and continue to retrieve the remaining data in the background. Once the data is retrieved, it will be merged with the previous data and the client will be notified to update the query results. This approach prevents slow retrieval of individual dimension data from impacting the completion of the entire query task.

[0058] After obtaining data for strongly and weakly correlated dimensions, the system reorganizes the query results according to a dimension priority sequence. This dimension priority sequence, derived in the previous step by analyzing the dependencies between query dimensions, reflects the importance of each query dimension. Based on this priority sequence, the system arranges the query result data from high to low priority, prioritizing the presentation of important data to the user.

[0059] S108, hierarchically compressing the reorganized query results based on a data compression algorithm; In this step, the system performs hierarchical compression on the reorganized query results. Data compression is a common data processing technique that reduces data storage space and transmission overhead through compression algorithms. The system can classify query results into multiple levels based on data importance and query frequency, applying different compression algorithms and ratios to data at different levels to achieve hierarchical compression.

[0060] Specifically, the system can classify data with high query frequency and high user importance as high-level data and compress it using a lossless compression algorithm to ensure data integrity and availability. For data with low query frequency and less importance, the system can classify it as medium-level data and use a lossy compression algorithm to minimize data size while ensuring data availability. Finally, for data with very low query frequency and low user importance, the system can classify it as low-level data and use a lossy compression algorithm with a high compression ratio to minimize data size. Through this hierarchical compression approach, the system can effectively reduce data storage and transmission costs while ensuring the integrity of critical data.

[0061] S109: Send the compressed query results to the multiple devices in batches through an adaptive transmission window mechanism according to the network status of the multiple devices.

[0062] In this step, the system needs to send the compressed query results to multiple devices. Because different devices may have different network conditions, such as bandwidth and latency, using a unified data transmission method may result in slow query result transmission on some devices, impacting the user experience. To address this issue, the system can dynamically adjust the data transmission window size and transmission rate based on the network status of each device, using an adaptive transmission window mechanism.

[0063] Specifically, the system monitors each device's network status parameters, such as round-trip delay and packet loss rate, in real time during data transmission. When a device's network status is good, such as low latency and packet loss rate, the system can appropriately increase the transmission window size to increase data throughput per unit time. Conversely, when a device's network status is poor, the system can reduce the transmission window size and transmission rate to avoid packet loss caused by network congestion. Furthermore, the system can dynamically adjust the transmission window size based on factors such as the device's network bandwidth and data processing capabilities. This adaptive transmission window mechanism fully utilizes each device's network resources and improves data transmission efficiency.

[0064] In the above embodiment, by constructing a query dimension association graph and using a graph theory algorithm to calculate the shortest dependency path, the relationship between the query dimensions is quantified and optimized, thereby generating a reasonable dimension priority sequence. Dividing the query dimensions into strong and weak association groups and assigning tasks in combination with the hardware performance of multiple terminal devices can fully utilize the computing resources of the device. The design of the circular data cache queue enables the continuous storage and rapid reading of strongly associated dimension data, while asynchronously acquiring weakly associated dimension data improves the efficiency of parallel processing. The hierarchical compression based on the data compression algorithm reduces the amount of data transmission, and the adaptive transmission window mechanism dynamically adjusts the transmission strategy according to the network status, thereby improving query efficiency, reducing system resource consumption, and improving the reliability and real-time performance of data transmission, so that the system can better adapt to the needs of different terminal devices and network environments, and improve the efficiency of commodity inventory query management in complex multi-dimensional query scenarios.

[0065] After completing the compression and transmission of the product inventory query results, in order to further optimize the efficiency and reliability of data transmission, the embodiment of the present application also provides an adaptive data transmission method based on network status. This method realizes the refined management of data transmission by monitoring the network status in real time and making dynamic adjustments. The data priority mechanism established based on the dimension priority sequence is combined with the network bandwidth status for transmission scheduling, so that the system can ensure the timely transmission of important data when network resources are limited. Figure 2 , describes an adaptive data transmission method based on network status in an embodiment of the present application: See also Figure 2 , which is a flow chart of an adaptive data transmission method based on network status in an embodiment of the present application.

[0066] S201, detecting network bandwidth fluctuations of multiple devices and generating a network quality assessment report; In this step, the system detects fluctuations in network bandwidth across multiple devices. Network bandwidth is a key indicator of network transmission capacity, reflecting the amount of data that can be transmitted per unit time. However, in real-world network environments, network bandwidth often fluctuates dynamically and is affected by factors such as network congestion and signal interference. To obtain accurate network bandwidth information, the system can employ various detection methods, such as active probing and passive monitoring.

[0067] Specifically, the system can periodically send probe packets to multiple devices, measuring the round-trip time and packet loss rate to calculate real-time network bandwidth. Simultaneously, the system can passively monitor data transmission between multiple devices and the server, measuring the amount of data transmitted and the transmission rate over a specific period of time, thereby determining network bandwidth trends. The system can flexibly select the appropriate detection method based on actual needs to obtain accurate network bandwidth data.

[0068] S202, calculating the optimal transmission window size and transmission time interval according to the network quality assessment report; The system calculates the optimal transmission window size and transmission time interval based on the network quality assessment report, specifically including: extracting network bandwidth fluctuation frequency and fluctuation amplitude data from the network quality assessment report; determining a benchmark transmission time interval based on the network bandwidth fluctuation frequency, and determining a benchmark transmission window size based on the network bandwidth fluctuation amplitude; when the network bandwidth is greater than the preset bandwidth, setting the transmission window size to a first preset multiple of the benchmark transmission window size, and setting the transmission time interval to a second preset multiple of the benchmark transmission time interval; when the network bandwidth is not greater than the preset bandwidth, setting the transmission window size to the second preset multiple of the benchmark transmission window size, and setting the transmission time interval to the first preset multiple of the benchmark transmission time interval.

[0069] In this step, the system calculates the optimal transmission window size and transmission interval based on the network quality assessment report. The transmission window refers to the maximum number of data packets that the sender can continuously send within a transmission cycle. The transmission interval refers to the time interval between two transmission cycles. These two parameters directly affect the efficiency and reliability of data transmission and therefore need to be dynamically adjusted based on current network conditions.

[0070] When calculating the optimal transmission window size and transmission interval, the system can employ various optimization algorithms, such as dynamic programming and reinforcement learning. These algorithms can automatically find the optimal parameter combination based on historical network quality data and current network status. For example, when network bandwidth is high and packet loss rate is low, the system can appropriately increase the transmission window size and decrease the transmission interval to fully utilize network resources and improve transmission efficiency. Conversely, when network bandwidth decreases and packet loss rate increases, the system can decrease the transmission window size and increase the transmission interval to reduce network congestion and improve transmission reliability.

[0071] After determining the optimal transmission window size and transmission interval, the system also needs to consider the device's receiving and data processing capabilities. If a device's receive buffer is small or its data processing speed is slow, even with sufficient network bandwidth, it may not be able to receive and process a large number of data packets in a timely manner, resulting in reduced data transmission efficiency. Therefore, the system can further adjust the transmission window size and transmission interval based on device performance parameters such as memory size and CPU frequency to match the device's actual processing capabilities.

[0072] S203: The compressed query results are stored hierarchically according to data priority, where the data priority is determined by the dimension priority sequence; In this step, the system stores the compressed query results in a hierarchical manner based on data priority. Data priority refers to the importance of data to user queries and decision-making, reflecting its timeliness and business value. By prioritizing data, the system can prioritize the transmission and processing of high-priority data when network resources are limited, improving the overall system service quality.

[0073] The determination of data priority can be based on a variety of factors, such as the query frequency, update frequency, business importance, etc. of the data. In an embodiment of the present application, the data priority is determined by the dimension priority sequence. The dimension priority sequence is obtained in the previous step by analyzing the dependencies and business importance between the query dimensions. It reflects the degree of influence of different dimensional data on the user query. Therefore, the system can prioritize and grade the data in the query results according to the dimension priority sequence.

[0074] Specifically, the system can classify query results into multiple priority levels, such as high, medium, and low. Data corresponding to dimensions that rank high in the dimension priority sequence can be labeled as high priority; data corresponding to dimensions that rank in the middle can be labeled as medium priority; and data corresponding to dimensions that rank low can be labeled as low priority. When storing data, the system can store data of different priorities in different storage areas or storage devices for subsequent data reading and transmission.

[0075] S204. When it is detected that the network bandwidth is greater than the preset bandwidth, data having a data priority greater than the average data priority is preferentially transmitted; This step describes an adaptive transmission strategy based on network bandwidth and data priority. When the system detects that the network bandwidth exceeds the preset bandwidth threshold, it indicates that the current network resources are relatively sufficient and can support a larger amount of data transmission. In this case, the system can prioritize the transmission of data with higher-than-average priority, maximizing network resource utilization and improving user query response speed.

[0076] In practice, the system first calculates the average priority of all data to be transmitted. This is achieved by taking a weighted average of the data priorities, with the weights determined based on factors such as data size and query frequency. The system then compares the data priority with the average priority, filtering out data with higher-than-average priority and adding it to the transmission queue. The system then sorts the data in the transmission queue based on priority, ensuring that the highest-priority data is transmitted first.

[0077] During actual data transmission, the system also needs to monitor changes in network bandwidth in real time. If the network bandwidth drops below a preset threshold, the system needs to promptly adjust the transmission strategy, suspending or reducing the transmission of low-priority data to ensure the transmission quality of high-priority data. Furthermore, the system can dynamically adjust the preset bandwidth threshold based on real-time changes in network bandwidth to adapt to different network environments.

[0078] S205: When it is detected that the network bandwidth is not greater than the preset bandwidth, suspend the transmission of data whose data priority is not greater than the average data priority.

[0079] This step describes the data transmission strategy for limited network bandwidth. When the system detects that the network bandwidth is not greater than the preset threshold, it indicates that the current network resources are relatively tight and cannot support large amounts of data transmission. In this case, the system needs to adopt a more conservative transmission strategy, suspending the transmission of data with a lower priority than the average level to ensure the transmission quality of high-priority data.

[0080] In practice, the system can periodically monitor the current network bandwidth and compare it with a preset threshold. Once it detects that the network bandwidth has dropped below the threshold, the system triggers a transmission policy adjustment. The system first calculates the average priority of all data to be transmitted, then filters the data in the transmission queue and suspends the transmission of data with a priority no higher than the average. This suspended data is temporarily stored in a local cache and will be transmitted again when network bandwidth is restored.

[0081] While suspending low-priority data transmission, the system also needs to ensure the transmission quality of high-priority data. The system can dynamically adjust the transmission window size and transmission interval for high-priority data to adapt to the current network bandwidth. For example, if network bandwidth further decreases, the system can reduce the transmission window size and increase the transmission interval to reduce network congestion and improve transmission success rate. When network bandwidth recovers to a certain level, the system can appropriately increase the transmission window size and reduce the transmission interval to improve transmission efficiency.

[0082] In real-world applications, network bandwidth can fluctuate frequently, requiring the system to quickly respond to network status changes and adjust transmission policies promptly. To achieve this, the system can employ an event-triggered transmission policy adjustment mechanism. Upon detecting a significant change in network bandwidth, the system immediately triggers a corresponding event, notifying the transmission module to adjust its policy. This event-triggered mechanism significantly improves system response speed and reduces the impact of network bandwidth fluctuations on data transmission.

[0083] At the same time, when pausing low-priority data transmission, the system also needs to consider the timeliness of the data. While some low-priority data may not significantly impact user queries, it may have high timeliness requirements. If it remains unupdated for an extended period, this may affect the accuracy and availability of the data. To address this issue, the system can set a maximum pause time threshold for each priority level. When the pause time for a certain priority level exceeds the threshold, the system automatically raises its priority and resumes transmission. This dynamic priority adjustment mechanism balances data priority and timeliness, ensuring the overall system quality of service.

[0084] In the above embodiment, real-time perception of the network status is achieved by continuously monitoring fluctuations in network bandwidth and generating a network quality assessment report. The transmission window size and transmission time interval are dynamically adjusted according to the assessment report, so that the data transmission strategy can adapt to changes in the network environment. The query results are stored hierarchically according to data priority and selectively transmitted in combination with the network bandwidth status, ensuring the timely delivery of important data. The strategy of prioritizing the transmission of high-priority data when the network status is good and suspending the transmission of low-priority data when the network status is poor avoids network congestion and data loss, improves the reliability and efficiency of data transmission, and ensures the timely delivery of query results.

[0085] Furthermore, in another embodiment, after sending the compressed query results to the multiple devices in batches through an adaptive transmission window mechanism according to the network status of the multiple devices, the method further includes: Count the access frequency of each storage unit in the ring cache queue, and mark the storage unit with an access frequency greater than a preset frequency as hot data; Calculate the data differences of hot data at different time points and establish an incremental update index table; Based on the incremental update index table, the data range that may be accessed by the next query is predicted, including: Extract the change time interval and change amplitude of hotspot data from the incremental update index table; Count the access time patterns of hot data and generate access time series; Calculate the next access time point according to the access time series, and determine the data generated within the change time interval before the next access time point as the data range; Load the latest data in the data range into the free storage cells of the ring buffer queue.

[0086] The system needs to count the access frequency of each storage unit in the ring buffer queue. Access frequency refers to the number of times a storage unit is read or written within a certain period of time. The system can implement access frequency statistics by setting an access counter. Whenever a data access request arrives, the system increments the access counter of the corresponding storage unit by 1.

[0087] After obtaining the access frequency of each storage unit, the system needs to identify hot data. Hot data refers to data whose access frequency exceeds a preset threshold. This data typically represents the user's primary query interest and has a significant impact on query performance. The system can set the preset threshold to a fixed value, such as 100 accesses per hour, or dynamically adjust the threshold based on the size of the cache queue and the frequency of data updates.

[0088] After identifying hotspot data, the system needs to mark it for subsequent analysis and processing. Specifically, the system can add a hotspot flag to the metadata of each storage unit. When the access frequency of a storage unit exceeds a preset threshold, the system sets its hotspot flag to 1, indicating that the storage unit contains hotspot data.

[0089] Calculate the data differences of hot data at different time points and establish an incremental update index table.

[0090] After identifying hotspot data, the system needs to analyze its changing patterns to predict future data access patterns. Because hotspot data is often updated frequently, directly comparing complete data at different points in time incurs significant computational overhead. To address this issue, the system can employ an incremental update approach, calculating only the differences in data between hotspot data points.

[0091] In practice, the system can periodically take snapshots of hotspot data, recording the data status at each point in time. The system then compares snapshots taken at two adjacent points in time, calculates the data differences, and stores these differences in an incremental update index table. This index table records the changes in each hotspot data point at different times, including the time of change, the data range of the change, and the magnitude of the change.

[0092] When constructing an incremental update index table, the system needs to select an appropriate time granularity. Too large a granularity will result in delayed incremental updates, impacting prediction accuracy; too small a granularity will result in an overly large index table, occupying excessive storage space. Therefore, the system needs to select the optimal time granularity based on the update frequency of hot data and business needs, balancing prediction accuracy and storage overhead.

[0093] Predict the data range that the next query may access based on the incrementally updated index table.

[0094] With incrementally updated index tables, the system can predict the data range likely to be accessed by the next query based on historical data change patterns. This prediction helps the system load relevant data into the cache in advance, reducing query wait times.

[0095] Predicting the data range that the next query may access involves three steps: Extract the change time interval and change amplitude of hotspot data from the incremental update index table.

[0096] The system first needs to extract the change interval and change magnitude of each hotspot data from the incremental update index table. The change interval refers to the time difference between two data changes, reflecting the frequency of data updates. The change magnitude refers to the size of each data change, reflecting the severity of the data update.

[0097] By analyzing the time intervals and magnitudes of changes, the system can understand the changing patterns of hotspot data. For example, if the time intervals between changes for a particular hotspot data are short but the magnitude of change is small, this indicates that the data is updated frequently, but the amount of data updated each time is small. Conversely, if the time intervals between changes are long but the magnitude of change is large, this indicates that the data is updated infrequently, but the amount of data updated each time is large.

[0098] Count the access time patterns of hot data and generate access time series.

[0099] In addition to data change patterns, the system also needs to analyze the access time patterns of hot data. Access time patterns reflect the user's query patterns for hot data and can help the system predict the time of the next query.

[0100] To identify access patterns, the system counts the access frequency of each hotspot data item at different time points, generating an access time series. This time series records the number of times a hotspot data item is accessed at each point in time. By analyzing access time series, the system can identify user query habits, such as when a particular data item is frequently queried each day or each week.

[0101] The next access time point is calculated according to the access time series, and the data generated within the change time interval before the next access time point is determined as the data range.

[0102] Based on access time series, the system can predict the next time a user is likely to query hot data. There are many prediction methods, such as moving average, exponential smoothing, and time series decomposition. The system can select the optimal prediction method based on the actual situation.

[0103] After predicting the next access time, the system can determine the data generated within a change interval before that time as the data range that may be queried. This is because, according to the changing patterns of hot data, the incremental data generated within this time range is exactly the latest data that users may query.

[0104] For example, if the system predicts that a user may access certain hot data at 2 p.m., and the data changes every hour, the system can determine the incremental data generated between 13:00 and 14:00 as the data range that may be queried.

[0105] Load the latest data in the data range into the free storage cells of the ring buffer queue.

[0106] After determining the possible data range to be queried, the system needs to pre-load this data into a cache queue in preparation for user queries. In this way, when a user initiates a query request, the system can directly return the data from the cache without recalculating it, greatly improving the query response speed.

[0107] In implementation, the system first needs to find free storage units in the circular cache queue. Because the cache queue size is fixed, the system requires a cache replacement strategy to determine which old data should be replaced when the cache is full. Common cache replacement strategies include LRU, LFU, and FIFO. The system can select the optimal strategy based on actual conditions.

[0108] After finding free storage cells, the system loads the latest data within the data range into these cells. When loading data, the system must pay attention to data consistency. Because the data range is based on predictions, there may be some deviation from the actual latest data. To ensure data accuracy, the system must synchronize with the data source when loading data to ensure that only the latest incremental data is loaded.

[0109] In the above embodiment, hot data is identified by counting the access frequencies of the storage units in the circular cache queue, and an incremental update index table is established by calculating the data differences of the hot data at different time points, and the system establishes a dynamic tracking mechanism for data access patterns. Based on the incremental update index table, the data range that may be accessed by the next query is predicted, and the relevant data is loaded into the free storage units of the circular cache queue in advance, so that the system has the ability to preload data. This predictive caching mechanism based on access frequency and data differences reduces the number of times the system directly accesses the underlying storage and reduces the response time of data queries. At the same time, since the preloaded data range is calculated by a prediction algorithm, it reduces the waste of memory resources, improves the cache hit rate and memory resource utilization efficiency, and optimizes the system query performance.

[0110] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , which is a schematic diagram of the physical device structure of a multi-dimensional query and management system for commodity inventory on multiple devices provided in an embodiment of the present application.

[0111] It should be noted that Figure 3 The structure of the system shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0112] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes, such as the methods described in the above embodiments, based on programs stored in a read-only memory (ROM) 302 or programs loaded from a storage unit 308 into a random access memory (RAM) 303. RAM 303 also stores various programs and data required for system operation. CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.

[0113] The following components are connected to the I / O interface 305: an input section 306 including a camera, infrared sensor, and the like; an output section 307 including a liquid crystal display (LCD) and speakers; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. Removable media 311, such as a magnetic disk, optical disk, magneto-optical disk, or semiconductor memory, is installed in the drive 310 as needed, so that computer programs read from the media can be installed in the storage section 308 as needed.

[0114] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for executing the methods illustrated in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 309 and / or installed from removable media 311. When executed by the central processing unit (CPU) 301, the computer program performs the various functions defined in the present invention.

[0115] It should be noted that the computer-readable medium described in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take any of a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0117] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiments, or may exist independently and not incorporated into the system. The storage medium carries one or more computer programs, and when executed by a processor of a system, the system implements the methods provided in the above embodiments.

[0118] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0119] As used in the above embodiments, the term “when…” may be interpreted as “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted as “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0120] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0121] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A multi-dimensional query management method for commodity inventory on multiple devices, characterized in that: include: Receiving a product inventory query request sent by multiple devices, wherein the product inventory query request includes query dimension information and device identification information; Constructing a query dimension association graph according to the query dimension information, and calculating the shortest dependency path between nodes in the query dimension association graph based on a graph theory algorithm to generate a dimension priority sequence; Performing a separability analysis on the dimension priority sequence to divide the query dimensions into a strongly associated dimension group and a weakly associated dimension group; Acquiring hardware performance parameters of the multi-terminal device based on the device identification information, and determining the number of data processing pipelines according to the hardware performance parameters; Allocating query tasks in the weakly associated dimension group to each processing pipeline; Constructing a circular data cache queue, and storing the query results of the strongly associated dimension group into continuous storage units of the circular cache queue; Reading strongly associated dimension data from the ring cache queue in a polling manner, asynchronously acquiring weakly associated dimension data, and reorganizing the query results according to the dimension priority sequence; Perform hierarchical compression on the reorganized query results based on the data compression algorithm; The compressed query results are sent to the multi-terminal devices in batches through an adaptive transmission window mechanism according to the network status of the multi-terminal devices.

2. The method according to claim 1, characterized in that The splittability analysis of the dimension priority sequence is performed to divide the query dimensions into a strongly associated dimension group and a weakly associated dimension group, specifically including: Extracting the query frequency of each node in the dimension priority sequence, and obtaining the data reference relationship between the nodes; Calculating the coupling degree between adjacent nodes in the dimension priority sequence according to the query frequency and the data reference relationship; Organizing the coupling degrees into a dimensional coupling matrix, and dividing the dimensional coupling matrix into a plurality of sub-matrix blocks based on a preset coupling degree threshold; The average coupling degree of the internal nodes of each sub-matrix block is calculated, and the nodes in the sub-matrix blocks whose average coupling degree is greater than the preset coupling degree threshold are divided into a strongly associated dimension group, and the nodes in the sub-matrix blocks whose average coupling degree is not greater than the preset coupling degree threshold are divided into a weakly associated dimension group.

3. The method according to claim 1, characterized in that Allocating the query task in the weakly associated dimension group to each processing pipeline specifically includes: Calculating the maximum task processing capacity of each processing pipeline according to the historical processing data of each processing pipeline; Counting the number of data records and the complexity of query conditions for each node in the weakly associated dimension group, and calculating the resource consumption value of each query task; According to the maximum task processing capacity of each processing pipeline, the query tasks are allocated one by one according to the resource consumption value from high to low.

4. The method according to claim 1, wherein After sending the compressed query results to the multi-terminal devices in batches through an adaptive transmission window mechanism according to the network status of the multi-terminal devices, the method further includes: Detecting fluctuations in the network bandwidth of the multiple devices and generating a network quality assessment report; Calculating an optimal transmission window size and transmission time interval according to the network quality assessment report; storing the compressed query results hierarchically according to data priority, where the data priority is determined by the dimension priority sequence; When it is detected that the network bandwidth is greater than the preset bandwidth, the data having a priority greater than the average data priority is preferentially transmitted; When it is detected that the network bandwidth is not greater than the preset bandwidth, the transmission of the data whose data priority is not greater than the average data priority is suspended.

5. The method according to claim 4, characterized in that The calculating the optimal transmission window size and transmission time interval according to the network quality assessment report specifically includes: Extracting network bandwidth fluctuation frequency and fluctuation amplitude data from the network quality assessment report; Determine a reference transmission time interval according to the network bandwidth fluctuation frequency, and determine a reference transmission window size according to the network bandwidth fluctuation amplitude; When the network bandwidth is greater than the preset bandwidth, the transmission window size is set to a first preset multiple of the reference transmission window size, and the transmission time interval is set to a second preset multiple of the reference transmission time interval; When the network bandwidth is not greater than the preset bandwidth, the transmission window size is set to the second preset times of the reference transmission window size, and the transmission time interval is set to the first preset times of the reference transmission time interval.

6. The method according to claim 1, wherein After sending the compressed query results to the multi-terminal devices in batches through an adaptive transmission window mechanism according to the network status of the multi-terminal devices, the method further includes: Counting the access frequency of each storage unit in the ring cache queue, and marking the storage unit with an access frequency greater than a preset frequency as hot data; Calculate the data differences of the hot data at different time points and establish an incremental update index table; Predicting the data range that may be accessed by the next query based on the incrementally updated index table; The latest data within the data range is loaded into the free storage unit of the ring buffer queue.

7. The method according to claim 6, characterized in that The predicting of the data range that may be accessed by the next query based on the incrementally updated index table specifically includes: Extracting the change time interval and change amplitude of the hotspot data from the incremental update index table; Counting the access time patterns of the hotspot data to generate an access time series; The next access time point is calculated according to the access time sequence, and the data generated within the change time interval before the next access time point is determined as the data range.

8. A multi-dimensional inventory query and management system for multi-terminal devices, characterized by: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method according to any one of claims 1 to 7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to perform the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Structured level-to-level management method and device for cloud simulation data and server

    CN122087210A

  • Vehicle-mounted diagnostic data adaptive aggregation and transmission method, system, device, medium and product

    CN122420388A