Intelligent data list sorting method and device, electronic equipment and computer readable storage medium
By analyzing user operation sequences and constructing data item association graphs, a dynamic strategy engine is used to optimize decision parameters, solving the problems of insufficient prediction of sorting pressure and rigid reordering strategies in data list sorting, and achieving more efficient and stable data list sorting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN UNIV OF URBAN CONSTR
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-15
AI Technical Summary
Under conditions of large data volumes and concurrent operations by multiple users, existing technologies struggle to guarantee the efficiency, stability, and consistency of data list sorting operations. Furthermore, the reordering strategies are passive and rigid, unable to proactively predict sorting pressure, and ignore the semantic or logical relationships between data items, leading to unnecessary chain adjustments.
By analyzing user action sequences to predict future stress, constructing a data item association graph, and using a dynamic strategy engine to optimize decision parameters, an intelligent closed loop of perception-prediction-decision-learning is formed, enabling intelligent sorting of the data list.
It enables proactive prediction of future sorting pressure, dynamically adjusts resource allocation, improves the system's adaptability and accuracy, reduces unnecessary reordering, and enhances user experience and system efficiency.
Smart Images

Figure CN122045243A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management technology, and in particular to an intelligent data list sorting method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] In modern software systems, intuitive drag-and-drop sorting of data lists is a key feature for enhancing user experience. However, when dealing with massive amounts of data and concurrent operations from multiple users, ensuring the efficiency, stability, and consistency of sorting operations becomes a significant technical challenge. Traditional solutions, such as the LexoRank algorithm, which assign string sorting values to list items and compare them using lexicographical order, avoid the large-scale update problems associated with directly using integer sequences. However, they still have inherent drawbacks: their sorting value space may be exhausted in hotspot areas, triggering expensive global or large-scale reorderings that lead to a sharp drop in service performance; furthermore, their reordering strategy is passive and rigid, unable to predict and optimize based on operational patterns.
[0003] Some existing improvement schemes introduce the concept of "heat" to guide the allocation of sorting resources. For example, hot spots are identified by accumulating the heat values of historical operations, and local reordering is performed before these spots are exhausted. However, these schemes still mainly rely on the statistics of historical data and are a reactive optimization. They lack the analysis of user operation behavior sequence patterns and cannot proactively predict upcoming sorting pressure. At the same time, their decision parameters (such as the heat gradient threshold for defining the reordering region and the mapping relationship between heat and sorting accuracy) are usually statically preset and cannot be dynamically and adaptively adjusted according to the real-time status of the system and long-term effects. In addition, the delineation of the reordering region is based solely on the abrupt change in the heat of adjacent items, ignoring the semantic or logical relationships between data items. This may lead to logically closely related data items being separated in different reordering cycles, triggering unnecessary chain adjustments in the future. Summary of the Invention
[0004] This invention aims to overcome the aforementioned shortcomings of existing technologies and provide a more forward-looking, adaptive, and accurate intelligent data list sorting scheme. The core of this invention lies in predicting future stress by analyzing user operation sequences, understanding data structure by quantifying the correlations between data items, and achieving real-time optimization of decision parameters through a learnable dynamic strategy engine, thereby constructing a complete intelligent closed loop of "perception-prediction-decision-learning".
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, embodiments of the present invention provide an intelligent data list sorting method, applicable to sorting a target data list. The method includes the following steps: S101: Operation sequence acquisition and feature extraction: extracting spatiotemporal features of operations based on historical user operation sequences of the target data list; S102: Future potential pressure prediction: inputting the spatiotemporal features of operations into a time series prediction model, and outputting a potential pressure distribution map of each region of the target data list within a future preset time period; S103: Data item association graph construction and maintenance: constructing a data item association graph of the target data list using data items as nodes and connecting data items with association edges; S104: Triggering sorting and information acquisition: responding to the current sorting operation command, determining the target position to be inserted or moved, and acquiring the cumulative heat value of adjacent data items at the target position, the potential pressure value from the potential pressure distribution map, and the association strength from the corresponding edges of the association graph. S105: Dynamic Strategy Engine Decision: The accumulated heat value, potential pressure value, correlation strength, and real-time system load are input into the dynamic strategy engine, which dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. S106: Intelligent Region Definition and Cluster Integration: Based on the gradient sensitivity threshold, forward and backward searches are performed on adjacent data items centered on the target location to determine preliminary boundaries. Combined with the correlation graph, cluster integration is performed on data items outside the boundary whose correlation strength with data items within the boundary exceeds a preset correlation threshold, to determine the final local rearrangement region. S107: Sorting Execution and Identifier Update: According to the heat-precision dynamic mapping function, the corresponding precision level is calculated for each data item within the local rearrangement region. Based on the precision level, a new sorting identifier is generated for all data items within the region. This sorting identifier is used to sort the data list during querying.
[0006] According to some embodiments of the present invention, in step S101, the spatiotemporal characteristics of the operation include: operation type, timestamp of operation occurrence, data item ID sequence involved in the operation, time interval between consecutive operations, and position span of the operation in the list.
[0007] According to some embodiments of the present invention, in step S103, the calculation of the logical association strength adopts a multi-source information fusion method, and its value is composed of the weighted sum of co-occurrence association degree, semantic similarity, and business rule association degree; co-occurrence association degree: the normalized value of the frequency of two data items being operated continuously or adjacently by the same user session within a preset time window; semantic similarity: the value calculated by cosine similarity or Jaccard similarity based on the text content, tag, or classification attribute of the data items; business rule association degree: the fixed weight assigned to the dependency relationship between data items determined according to predefined business logic rules.
[0008] According to some embodiments of the present invention, in step S105, the dynamic strategy engine dynamically adjusts the strategy based on the input multi-dimensional information, specifically: the gradient sensitivity threshold is negatively correlated with the real-time system load and positively correlated with the potential pressure value; the heat-precision dynamic mapping function is a non-linear function, whose output value is positively correlated with both the cumulative heat value and the potential pressure value of the data item, and allocates a larger sorting space to high potential pressure areas compared to those relying solely on heat.
[0009] According to some embodiments of the present invention, in step S106, the specific process of cluster integration is as follows: when the search encounters a preliminary boundary data item X, the average association strength between X and all items in the existing data item set R in the current rearrangement region is calculated; if the average association strength is greater than the preset association threshold, the data item X is merged into region R, and the search continues outward with X as the new starting point until there are no more data items that meet the conditions.
[0010] According to some embodiments of the present invention, the method further includes the following steps: Step S108: Feedback learning and optimization: monitoring the actual conflict rate of the local rearrangement region in a subsequent time window, and using the actual conflict rate as a feedback signal to adjust the internal parameters of the dynamic strategy engine.
[0011] According to some embodiments of the present invention, in step S108, a reinforcement learning algorithm is used to adjust the internal parameters of the dynamic policy engine, and the actual conflict rate is used as a negatively correlated input to the reward function to drive the policy engine to generate parameters that can reduce the future conflict rate.
[0012] Secondly, embodiments of the present invention provide an intelligent data list sorting device, comprising: an operation sequence acquisition and feature extraction module, used to acquire historical user operation sequences for the target data list and extract spatiotemporal features of the operations; a future potential pressure prediction module, used to input the spatiotemporal features of the operations into a time series prediction model and output a potential pressure distribution map of each region of the target data list within a future preset time period; an association graph construction and maintenance module, used to construct a data item association graph of the target data list with data items as nodes and data items connected by association edges; a trigger sorting and information acquisition module, used to respond to the current sorting operation command, determine the target position to be inserted or moved, and acquire the cumulative heat value of adjacent data items of the target position, the potential pressure value from the potential pressure distribution map, and the association strength from the corresponding edges of the association graph; and a dynamic strategy engine decision module. The system inputs the accumulated heat value, potential pressure value, correlation strength, and real-time system load into the dynamic strategy engine, which dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. The intelligent region delineation and cluster integration module performs forward and backward searches on adjacent data items centered at the target location based on the gradient sensitivity threshold to determine preliminary boundaries. It then combines the correlation graph to cluster data items outside the boundary whose correlation strength with data items within the boundary exceeds a preset correlation threshold, thereby determining the final local rearrangement region. The sorting execution and identifier update module calculates the corresponding precision level for each data item within the local rearrangement region based on the heat-precision dynamic mapping function, and regenerates a sorting identifier for all data items within the region based on the precision level. This sorting identifier is used to sort the data list during querying.
[0013] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a memory, and a computer program stored in the memory. When the processor executes the program, it implements the method as described in any embodiment of the first aspect.
[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, it implements the method described in any embodiment of the first aspect.
[0015] The embodiments of this invention have at least the following beneficial effects: 1. From passive to proactive: By analyzing the operation sequence through a time-series model, potential hotspots can be predicted, and resource allocation can be pre-adjusted before the actual sorting pressure arrives, thereby avoiding performance fluctuations or operation failures caused by sudden space exhaustion, resulting in a smoother user experience. 2. From static to dynamic: Core decision parameters (such as gradient thresholds and mapping functions) are generated in real-time by a dynamic strategy engine based on real-time system load, predicted pressure, and historical effect feedback, enabling the system to flexibly adapt to different business peaks and load scenarios, always maintaining a near-optimal decision-making state. 3. From isolated to interconnected: The introduction of a data item association graph ensures that the division of reordering regions is not only based on numerical gradients but also considers the inherent logical connections between data items. This helps to adjust data items that logically belong to the same workgroup or task cluster in one go, reducing the number of subsequent chain reorderings caused by associated operations and improving long-term efficiency. 4. Forming a learning loop: A complete "decision-execution-feedback-optimization" loop is established. The system can learn from the actual effect of each reordering, continuously fine-tuning its decision-making strategy, thereby enabling the entire sorting system to have continuous self-evolution capabilities and significantly improving its intelligence level. Attached Figure Description
[0016] Figure 1 The above is a flowchart of an intelligent data list sorting method provided in one embodiment of the present invention.
[0017] Figure 2 This is a framework diagram of an intelligent data list sorting device provided in one embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention.
[0019] Example 1: Intelligent Data List Sorting Method refer to Figure 1 This embodiment details each step of the intelligent data list sorting method of the present invention.
[0020] Step S101: Operation Sequence Collection and Feature Extraction: Collect historical user operation sequences for the target data list and extract spatiotemporal features of the operations. These features are used to characterize the multi-dimensional contextual information of an operation. The system intercepts all API requests for sorting operations on the target data list `list_items` and records structured logs. Each log entry contains the following fields: user session ID (`session_id`), unique operation ID (`operation_id`), previous operation ID (`parent_op_id`, used for concatenating sequences), operation type (`op_type`, e.g., `INSERT_BETWEEN` for insertion, `MOVE` for dragging), timestamp of the operation, list of item IDs involved (`item_ids`, JSON format), and start and end positions of the operation (`from_position`, `to_position`, i.e., position span). The combination of these features can effectively describe the patterns and intentions of user behavior. The feature extractor slides once every fixed time window (e.g., 30 seconds) to process the logs within the window. For a drag operation, the extracted feature vector Ft is: Ft=[op_type_encoded,timestamp_normalized,delta_t,spatial_span,item_id_sequence] Here, `op_type_encoded` is the operation type encoding, mapping the operation type to a numerical value; `timestamp_normalized` is the normalized timestamp, converting absolute time to relative time; `delta_t` is the time difference (in seconds) between the current operation and the previous operation in the log; `spatial_span = abs(to_position - from_position)` calculates the start and end positions (i.e., position span) of the drag operation in the list; `spatial_span` represents the position span; `to_position` is the index of the target position to which the data item is dragged; `from_position` is the index of the starting position of the data item before it was dragged; and `abs()` is the absolute value function, ensuring that the movement distance is non-negative. `item_id_sequence` is the ID sequence of the operated item and its preceding and following items. After these features are normalized, they are organized into a feature sequence in chronological order and sent to the next stage. The normalization process uses the min-max normalization method, mapping the original values of each feature to the interval [0,1].
[0021] Step S102: Future Potential Pressure Prediction: Input the spatiotemporal features of the operation into the time series prediction model, and output the potential pressure distribution of each region of the target data list within a preset future time period. This step realizes the proactive prediction of future sorting pressure. This invention deploys a lightweight GRU (Gated Recurrent Unit) network as the time series prediction model. The model takes the feature sequence of the past N time windows (e.g., N=10, representing the past 5 minutes) as input. The output layer of the model is a Softmax layer, whose number of neurons is equal to the number of regions in which the list is virtually divided (e.g., the list is divided into 20 regions on average). The training objective of the model is: given a historical operation sequence, predict which region the sorting operation is most likely to occur in within the next time window. The training data comes from the system's historical logs. During online service, the model runs once every 30 seconds and outputs a probability distribution vector P=[p1,p2,…,p20], where pi represents the probability that the i-th region will become a hotspot within the next 30 seconds. This probability value is the potential pressure base value of all data items in that region, and the specific potential pressure value of a data item can be obtained by mapping it to its location.
[0022] Step S103: Data Item Association Graph Construction and Maintenance: Using data items as nodes, connect data items with association edges to construct the data item association graph of the target data list. Assign weights to the association edges to represent the logical association strength between the two data items connected by the association edge. The logical association strength (association edge weight W) ij The calculation of the correlation coefficient (W) employs a multi-source information fusion approach. Specifically, its value is a weighted sum of co-occurrence correlation, semantic similarity, and business rule correlation. Co-occurrence correlation is obtained based on operation log statistics; semantic similarity is calculated using natural language processing techniques; and business rule correlation is determined by predefined business logic within the system. This calculation method integrates the correlation across three dimensions: behavior, content, and rules. ij Calculate and update using the following formula: W ij =α*Co-occurrence(i,j)+β*Semantic_Sim(i,j)+γ*Rule_Link(i,j) in: Co-occurrence(i,j) represents the co-occurrence correlation, which is the normalized value of the frequency of two data items being operated on consecutively or adjacently by the same user session within a preset time window. For example, Cij is denoted as the number of times that items i and j are operated on within the same user session in the past 24 hours, with the time interval being less than 2 minutes. Co-occurrence(i,j) is normalized using the Jaccard coefficient: Co-occurrence(i,j) = C_ij / (N_i + N_j - C_ij), where N_i and N_j are the total number of times items i and j are operated on within that time period, respectively.
[0023] Semantic_Sim(i,j) represents semantic similarity, which is the value calculated using cosine similarity or Jaccard similarity based on the text content, label, or classification attributes of data items. For example, using a pre-trained sentence vector model (such as Sentence-BERT), the title and key label text of a data item are transformed into vectors Vi and Vj, and the cosine similarity is calculated as: Semantic_Sim(i,j)=(Vi·Vj) / (||Vi||·||Vj||), whose value falls in the interval [0,1]. Here, Vi·Vj is the vector dot product, and ||Vi|| and ||Vj|| are the moduli of vectors Vi and Vj, respectively.
[0024] Rule_Link(i,j) represents the business rule correlation degree, which refers to the fixed weight assigned to the dependency relationship between data items determined according to predefined business logic rules. For example, when querying the business database, if i and j belong to the same project (same project_id), the value is assigned to 0.5; if i is the parent task or child task of j (parent_id relationship exists), the value is assigned to 1.0; otherwise, it is 0.
[0025] The coefficients α, β, and γ are preset based on business importance, for example, α=0.5, β=0.3, and γ=0.2. These coefficients are preset mixed weights used to adjust the relative importance of co-occurrence behavior, semantic content, and business rules on the final logical association strength. Their specific values can be adjusted according to the characteristics of the target application scenario; for example, in a collaborative office scenario, a higher weight α can be assigned to co-occurrence association. This association graph is stored in an in-memory database (such as Redis) as an adjacency list, and the weights are recalculated and updated every hour based on the latest operation logs.
[0026] Step S104: Trigger Sorting and Information Acquisition: In response to the current sorting operation command, determine the target position to be inserted or moved, and acquire the cumulative heat value of adjacent data items at the target position, the potential pressure value from the potential pressure distribution, and the association strength from the corresponding edge of the association graph. Assume the user drags task item_X between item_A and item_B. The system determines the target position as pos. Subsequently, it reads the cumulative heat values of item_A and item_B from the main database. The cumulative heat value characterizes the frequency of a data item's recent access and operation, and its calculation incorporates a time decay effect: whenever a data item is operated on, its cumulative heat value H is updated using the following formula: H_new = λ * H_old + Δh. Wherein, H_old is the current heat value, λ is a time decay coefficient between 0 and 1 (e.g., 0.95), used to simulate the natural cooling of heat; Δh is the heat increment contributed by this operation (usually 1 or a weight set according to the operation type). In addition, each data item can maintain a 'last update time' stamp, which is used to provide additional attenuation compensation for the popularity of items that have not been operated on for a long time during periodic or triggered calculations. From the pressure distribution generated in step S102, the potential pressure values pressure_A and pressure_B of item_A and item_B are interpolated according to their list position indices. The weight W_AB of the associated edge (item_A, item_B) is queried from the association graph cache in step S103. At the same time, the current CPU utilization cpu_load (a value between 0 and 1) is obtained from the system monitoring module.
[0027] Step S105: Dynamic Policy Engine Decision: The accumulated heat value, potential pressure value, correlation strength, and real-time system load are input into the dynamic policy engine. The dynamic policy engine dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. The dynamic policy engine is a stateless function computation service. It receives an input vector I=[heat_A,heat_B,pressure_A,pressure_B,W_AB,cpu_load]. The engine internally maintains a set of trainable parameters θ, whose initial values can be randomly set and optimized through subsequent feedback learning processes. After receiving the input vector I, the dynamic policy engine outputs two functions based on the decision: an adaptive gradient sensitivity threshold and a heat-precision dynamic mapping function. 1. Adaptive gradient sensitivity threshold T: T=T_base*(1+k_p*((pressure_A+pressure_B) / 2)) / (1+k_l*cpu_load) Where T_base,k_p,k_l are parts of the parameter θ, representing the base value of the gradient sensitivity threshold, the sensitivity coefficient of the predicted pressure, and the sensitivity coefficient of the system load, respectively. In this embodiment, the gradient sensitivity threshold is negatively correlated with the real-time system load and positively correlated with the potential pressure value of the target area. As can be seen from the formula, the greater the predicted pressure, the larger T tends to be, indicating that the system is less sensitive and can tolerate greater heat differences; the higher the system load (cpu_load), the smaller T tends to be, indicating that the system is more sensitive and can trigger more timely small-scale adjustments. The technical effect of this calculation method is: the higher the load, the smaller the threshold, to trigger more timely small-scale adjustments and prevent the backlog of reordering tasks; the greater the predicted pressure, the larger the threshold, to tolerate greater heat differences and avoid overly frequent fine-tuning in hotspot areas.
[0028] 2. Dynamic mapping function f between heat and precision: precision_level=floor(P_base*log(1+heat+lambda*pressure)) Where `precision_level` represents the precision level, `P_base` and `lambda` are another set of parameters, representing the precision level base and pressure amplification factor, respectively. `heat` is the cumulative heat value of the data item, and `pressure` is the predicted potential pressure value of the data item. The `log` function ensures that the impact of heat and pressure growth on the precision level is marginally decreasing, guaranteeing the efficiency of resource allocation. `floor()` is a floor function that converts the calculation result into an integer precision level. This formula calculates an integer precision level based on the historical heat and future pressure of the data item. The higher the level, the more generous the sorting identifier interval will be allocated between the data item and its adjacent items in the sorting sequence, reserving more space for future insertion operations. `lambda` ensures that items with high predicted pressure can obtain higher levels. `lambda` controls the amplification effect of predicted pressure on the precision level. The `log` function ensures that the allocated sorting space grows with the input, but at a slower rate, which is a resource-saving nonlinear allocation. The heat-precision dynamic mapping function is designed as a nonlinear function, which ensures that data items with high cumulative heat or high potential pressure are allocated a superlinearly growing sorting space, thereby accurately allocating resources to the most needed areas.
[0029] Step S106: Intelligent region definition and cluster integration: Based on the gradient sensitivity threshold, forward and backward searches are performed on adjacent data items centered on the target location to determine the preliminary boundary. Then, in conjunction with the association graph, cluster integration is performed on data items outside the boundary whose association strength with data items within the boundary exceeds a preset association threshold to determine the final local rearrangement region.
[0030] Taking forward search (from the beginning of the list to the end of the list) as an example: Step 1. Set the current check position as pos, and the corresponding current data item curr_item = item_B.
[0031] Step 2. Obtain the cumulative heat values H_curr and H_next of the currently inspected data item curr_item and its adjacent next data item next_item.
[0032] Step 3. Calculate the heat difference ΔH = |H_next - H_curr|, which is the absolute difference in cumulative heat value between the current item and its next adjacent item.
[0033] Step 4. If ΔH≥T (T is calculated in step S105), then mark the current data item curr_item as the initial boundary data item X.
[0034] Step 5. Cluster Integration Process: Calculate the average association strength (avg_link) between the initial boundary data item X and all items in the currently determined rearrangement region_R (which includes item_A, item_X, and item_B). If the average association strength (avg_link) is greater than or equal to the preset association threshold W_threshold (preset to 0.6), then the initial boundary data item X is determined to logically belong to this region, added to the rearrangement region_R, and the current data item curr_item is updated to the next data item next_item. The search then returns to Step 2 to continue. If the average association strength (avg_link) is less than the preset association threshold W_threshold, then the initial boundary data item X is determined to be the final forward boundary, and the search stops. This mechanism ensures that logically closely related data clusters can be rearranged as a whole.
[0035] The backward search (from the end of the list to the beginning of the list) process is symmetrical to the forward search, specifically: 1. Let the current inspection position be pos, and the corresponding data item curr_item = item_A.
[0036] 2. Obtain the cumulative popularity values H_curr and H_prev of the current data item curr_item and the previous data item prev_item.
[0037] 3. Calculate the heat difference ΔH = |H_curr - H_prev|, which is the absolute difference in cumulative heat value between the current item and the previous item.
[0038] 4. If ΔH≥T, then mark the previous data item prev_item as the initial boundary item X.
[0039] 5. Perform cluster integration judgment: Calculate the average association strength avg_link between the initial boundary data item X and all items in the currently determined rearranged region region_R (which at this time includes item_A, item_X, and item_B). If the average association strength avg_link ≥ the preset association threshold W_threshold (preset to 0.6), then the initial boundary data item X is determined to logically belong to this region, it is added to the rearranged region region_R, and the current data item curr_item is updated to the previous data item prev_item, and the search is returned to step 2; otherwise, if the average association strength avg_link < the preset association threshold W_threshold, then the initial boundary data item X is determined to be the final forward boundary, and the search is stopped.
[0040] Ultimately, all data items between the forward and backward boundaries constitute the final local rearrangement region.
[0041] Step S107: Sorting Execution and Identifier Update: Based on the heat-precision dynamic mapping function, calculate the corresponding precision level for each data item within the local rearrangement region, and regenerate sorting identifiers for all data items within the region based on the precision level. The sorting identifiers are used to sort the data list during querying. After a sorting identifier is assigned or updated for a data item, an ordered data list can be presented according to the order of the sorting identifiers through the database sorting query or the application's sorting logic. For each data item within the region, substitute its cumulative heat value (heat) and potential pressure value (pressure) into the dynamic mapping function f obtained in step S105 to calculate a new precision level (precision_level). Assume that the data items within the region are arranged in the new order as [I1, I2, ..., In]. Assign a base sorting identifier (e.g., a) to I1. For the k-th item (k>1), its sorting identifier is calculated as: sort_id_k=sort_id_{k-1}+(base_gap*precision_level_k). Here, `base_gap` is a base interval constant (like the minimum interval within a bucket in LexoRank), and `precision_level_k` is the precision level of the k-th data item. The formula means that the sort identifier of the k-th data item is equal to the identifier of the previous data item, plus the product of `base_gap` and the precision level of the k-th data item. This implies that the higher the precision level of an item, the larger the gap between it and its predecessor; this gap represents the space of allocable sort values for future insertion of new items. Finally, in a target data list, the `sort_id` field of these data items is updated in batches.
[0042] Step S108: Feedback Learning and Optimization: Monitor the actual conflict rate of the local rearrangement region within the subsequent time window, and use the actual conflict rate as a feedback signal to adjust the internal parameters of the dynamic strategy engine. The system establishes an observation thread that listens for all sorting operation requests for data items within the current rearrangement region within M minutes (e.g., M=15) after step S107. The number of times a secondary rearrangement is triggered due to insufficient sorting identifier space is counted and denoted as conflict_count. The actual conflict rate R_c = conflict_count / total_operations_in_region (total number of operations in the region) is calculated. A quadruple (I, Action, Reward, I') is constructed from the input I of this decision, the parameters of the outputs T and f, and the reward Reward = -R_c (the lower the conflict rate, the higher the reward), and stored in the experience replay buffer. Here, Action is the vectorized representation of all parameters of the functions T and f, and I' represents the new state information observed at the next decision time after the rearrangement is completed. An asynchronous reinforcement learning agent (e.g., using the Actor-Critic algorithm) periodically samples a batch of data from a buffer, updating the internal parameters θ of a dynamic policy engine with the goal of maximizing the expected cumulative reward of future decisions. This allows the engine to gradually learn which parameter decisions, under what system states, will yield the best (i.e., the lowest conflict) long-term results. A reinforcement learning framework is employed to achieve self-optimization of the policy engine. Each local reordering operation is treated as an event, and the actual conflict rate of the reordered region is transformed into a reward or penalty signal. The policy engine's internal parameter adjustment objective is to maximize the long-term cumulative reward, i.e., minimize the overall ordering conflict rate of the system. This enables the system to automatically adapt to constantly changing operating patterns.
[0043] Example 2: Intelligent Data List Sorting Device refer to Figure 2 A smart data list sorting device 200, which can be integrated into an application server via software modules, includes the following modules that are interconnected via a bus or network: Operation sequence acquisition and feature extraction module 201: It consists of an interceptor embedded in the application framework and a high-performance message queue (such as Kafka), and is used to acquire historical user operation sequences for the target data list, extract spatiotemporal features of the operations, and realize the function of step S101.
[0044] The stress prediction module 202 includes a TensorFlowServing instance loaded with a trained GRU model, which periodically executes prediction tasks to input the spatiotemporal features of the operation into the time series prediction model and outputs a potential stress distribution map of each region of the target data list within a future preset time period, thus implementing step S102.
[0045] The association graph construction and maintenance module 203 consists of a scheduled task (such as CeleryBeat) and a calculation script, which periodically extracts data from logs and business databases, calculates and updates the association graph stored in Redis according to the formula in step S103.
[0046] Triggering sorting and information acquisition module 204: Implemented in the sorting API processing logic, it is responsible for aggregating the required information from the database, the cache of the pressure prediction module 202 and the association graph cache when sorting is triggered. In response to the current sorting operation instruction, it determines the target position to be inserted or moved, and obtains the cumulative heat value of the data items adjacent to the target position, the potential pressure value from the potential pressure distribution map and the association strength from the corresponding edge of the association graph, thus implementing step S104.
[0047] Dynamic strategy engine decision module 205: It is used to input the cumulative heat value, potential pressure value, correlation strength and real-time system load into the dynamic strategy engine. The dynamic strategy engine dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. It is an independent microservice, which internally encapsulates the parameter θ and the calculation formula of step S105, provides an RPC interface, receives multi-dimensional information and returns decision parameters.
[0048] Intelligent region delineation and cluster integration module 206: Based on the gradient sensitivity threshold, it performs forward and backward searches on adjacent data items centered on the target location to determine the preliminary boundary, and combines the association graph to perform cluster integration on data items outside the boundary whose association strength with data items within the boundary exceeds a preset association threshold, so as to determine the final local rearrangement region. As part of the sorting API logic, it calls the result of the strategy engine decision module 205 and executes the search and cluster integration algorithm in step S106.
[0049] The sorting execution and identifier update module 207 is used to calculate the corresponding precision level for each data item in the local rearrangement area according to the heat-precision dynamic mapping function, and regenerate the sorting identifier for all data items in the area based on the precision level. The sorting identifier is used to sort the data list during querying, is responsible for the calculation of step S107, and generates batch update SQL, which is executed through the database connection pool.
[0050] Feedback learning and optimization module 208: Implemented by an independent service process, it includes an experience buffer, a reinforcement learning agent, and a parameter updater. It continuously collects data and asynchronously updates the internal parameters θ of the dynamic policy engine decision module 205. It is used to monitor the actual conflict rate of the local rearrangement region in the subsequent time window and use the actual conflict rate as a feedback signal to adjust the internal parameters of the dynamic policy engine, thus implementing step S108.
[0051] These modules exchange data and collaborate through predefined interfaces (RPC calls, message queues, shared caches) to jointly complete the entire intelligent sorting process.
[0052] Example 3: Electronic Equipment This embodiment provides an electronic device, which may be a cloud server or an enterprise-level server deployed with the above-described method. The device includes: at least one central processing unit (CPU); memory (RAM); persistent storage (such as SSD); and a network interface card (NIC). The memory stores an operating system, a database system, and an application program. This application program contains all the computer program instructions for implementing the method described in Embodiment 1. When the CPU loads and executes these instructions, the electronic device can operate as an intelligent sorting service node, responding to client requests and performing a complete set of functions, including operation sequence analysis, stress prediction, association graph maintenance, dynamic strategy decision-making, local reordering, and feedback learning. The specific implementation details of this electronic device are completely consistent with the description in Embodiment 1.
[0053] Example 4: Computer-readable storage medium This invention also relates to a computer-readable storage medium, such as a solid-state drive, optical disk, or storage node in a distributed storage system, on which an executable program installation package or a series of source code files is stored. When the installation package is installed on the electronic device as described in Embodiment 3, or when the source code is compiled and deployed, a software environment capable of implementing the method described in Embodiment 1 is formed on the electronic device. Therefore, this storage medium embodies a technical solution that transforms a general-purpose computing device into a dedicated intelligent sorting device.
[0054] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A smart data list sorting method, suitable for sorting a target data list, characterized in that, Includes the following steps: S101: Operation sequence acquisition and feature extraction: Acquire historical user operation sequences for the target data list and extract spatiotemporal features of the operations; S102: Future potential pressure prediction: Input the spatiotemporal features of the operation into the time series prediction model, and output the potential pressure distribution map of each region of the target data list within a future preset time period; S103: Data Item Association Graph Construction and Maintenance: Using data items as nodes, and connecting data items with association edges, construct the data item association graph of the target data list; S104: Trigger sorting and information acquisition: In response to the current sorting operation instruction, determine the target position to be inserted or moved, and acquire the cumulative heat value of the data items adjacent to the target position, the potential pressure value from the potential pressure distribution map, and the association strength from the corresponding edge of the association graph; S105: Dynamic strategy engine decision: The accumulated heat value, potential pressure value, correlation strength and real-time system load are input into the dynamic strategy engine, which dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. S106: Intelligent region definition and cluster integration: Based on the gradient sensitivity threshold, forward and backward searches are performed on adjacent data items centered on the target location to determine the preliminary boundary. Then, in conjunction with the association graph, cluster integration is performed on data items outside the boundary whose association strength with data items within the boundary exceeds a preset association threshold to determine the final local rearrangement region. S107: Sorting Execution and Identifier Update: Based on the heat-precision dynamic mapping function, calculate the corresponding precision level for each data item in the local rearrangement region, and regenerate the sorting identifier for all data items in the region based on the precision level. The sorting identifier is used to sort the data list during querying.
2. The method according to claim 1, characterized in that, In step S101, the spatiotemporal characteristics of the operation include: operation type, timestamp of the operation, sequence of data item IDs involved in the operation, time interval between consecutive operations, and position span of the operation in the list.
3. The method according to claim 1, characterized in that, In step S103, the logical association strength is calculated using a multi-source information fusion method, and its value is composed of the weighted sum of co-occurrence association degree, semantic similarity, and business rule association degree: Co-occurrence correlation: The normalized value of the frequency of two data items being operated on consecutively or adjacently by the same user session within a preset time window; Semantic similarity: The value calculated using cosine similarity or Jaccard similarity based on the text content, label, or classification attributes of a data item. Business rule relevance: A fixed weight assigned to the dependencies between data items based on predefined business logic rules.
4. The method according to claim 1, characterized in that, In step S105, the dynamic strategy engine dynamically adjusts the strategy based on the input multi-dimensional information. Specifically, the gradient sensitivity threshold is negatively correlated with the real-time system load and positively correlated with the potential pressure value. The heat-precision dynamic mapping function is a non-linear function, and its output value is positively correlated with both the cumulative heat value and the potential pressure value of the data item. It also allocates a larger sorting space to high potential pressure areas compared to areas that only rely on heat.
5. The method according to claim 1, characterized in that, In step S106, the specific process of cluster integration is as follows: when the search encounters a preliminary boundary data item X, the average association strength between X and all items in the existing data item set R in the current rearrangement region is calculated; if the average association strength is greater than the preset association threshold, the data item X is merged into region R, and the search continues outward from X as a new starting point until there are no more data items that meet the conditions.
6. The method according to claim 1, characterized in that, It also includes the following steps: S108: Feedback Learning and Optimization: Monitor the actual conflict rate of the local rearrangement region in the subsequent time window, and use the actual conflict rate as a feedback signal to adjust the internal parameters of the dynamic strategy engine.
7. The method according to claim 6, characterized in that, In step S108, a reinforcement learning algorithm is used to adjust the internal parameters of the dynamic policy engine. The actual conflict rate is used as a negatively correlated input to the reward function to drive the policy engine to generate parameters that can reduce the future conflict rate.
8. An intelligent data list sorting device, characterized in that, include: The operation sequence acquisition and feature extraction module is used to acquire historical user operation sequences for the target data list and extract spatiotemporal features of the operations. The potential pressure prediction module is used to input the spatiotemporal characteristics of the operation into the time series prediction model and output the potential pressure distribution map of each region of the target data list within a future preset time period. The association graph construction and maintenance module is used to construct the data item association graph of the target data list, with data items as nodes and data items connected by association edges. The sorting and information acquisition module is used to respond to the current sorting operation command, determine the target position to be inserted or moved, and acquire the cumulative heat value of the data items adjacent to the target position, the potential pressure value from the potential pressure distribution map, and the association strength from the corresponding edge of the association graph. The dynamic strategy engine decision module is used to input the accumulated heat value, potential pressure value, correlation strength and real-time system load into the dynamic strategy engine, which dynamically generates the currently applicable gradient sensitivity threshold and heat-precision dynamic mapping function. The intelligent region definition and cluster integration module is used to perform forward and backward searches on adjacent data items centered on the target location based on the gradient sensitivity threshold to determine the preliminary boundary, and to perform cluster integration on data items outside the boundary whose association strength with data items within the boundary exceeds a preset association threshold in combination with the association graph to determine the final local rearrangement region. The sorting execution and identifier update module is used to calculate the corresponding precision level for each data item in the local rearrangement region according to the heat-precision dynamic mapping function, and regenerate the sorting identifier for all data items in the region based on the precision level. The sorting identifier is used to sort the data list during querying.
9. An electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
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 the method as described in any one of claims 1 to 7.