Intelligent sales terminal real-time transaction data processing system based on in-memory computing framework

The real-time transaction data processing system for intelligent sales terminals, built using an in-memory computing framework, solves the problems of transaction processing latency and inventory synchronization inconsistency in traditional models. It achieves real-time performance and efficiency improvements in transaction processing and enhances the application of technology in intelligent sales terminals. It also improves the precision of retail operations and user experience.

CN121979623BActive Publication Date: 2026-06-12XIAMEN HUAMEI YUNHAI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN HUAMEI YUNHAI TECH CO LTD
Filing Date
2026-04-07
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In the traditional disk-based transaction processing model, smart sales terminals suffer from high data processing latency, making it impossible to dynamically adjust the points multiplier and inventory lock priority based on transaction frequency fluctuations. This leads to inconsistencies in online and offline inventory synchronization, resulting in overselling, unreasonable points management, and untimely promotion triggering, which negatively impacts retail operational efficiency and user experience.

Method used

Based on an in-memory computing framework, a data acquisition array consisting of scanning, payment, and membership sensing modules captures transaction data streams in real time, constructs an in-memory data association structure, employs parallel transaction processing and cubic Bézier curve fitting to match transaction frequency, dynamically adjusts the points multiplier and inventory lock priority, and constructs a distributed inventory consistency state mapping in memory mirror. The sales data stress tensor field is used to analyze compensation factors to correct inventory thresholds and promotion triggering conditions.

🎯Benefits of technology

It improves the real-time performance and efficiency of transaction processing, ensures the consistency of distributed inventory data, realizes refined dynamic optimization of points-based control and inventory management, and enhances the level of retail operation refinement and user consumption experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979623B_ABST
    Figure CN121979623B_ABST
Patent Text Reader

Abstract

The application provides a smart sales terminal real-time transaction data processing system based on a memory computing framework, relates to the technical field of Internet of Things smart terminals, and comprises: an acquisition module configured to capture original transaction data streams in real time through an acquisition array composed of a code scanning module, a payment module and a member sensing module deployed on each smart sales terminal; and a computing module configured to construct a memory data association structure corresponding to the physical position of the acquisition array in a memory area based on a memory computing framework, and perform parallel transaction processing on the original transaction data streams carried by the memory data association structure; in the parallel transaction processing process, transaction frequency time series data of each smart sales terminal is collected in real time, the transaction frequency in a current time window is fitted through a cubic Bezier curve, and the inflection point of the Bezier curve is calculated. The application improves the transaction processing efficiency of smart sales terminals and the fine level of retail operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) smart terminal technology, and in particular to a real-time transaction data processing system for smart sales terminals based on a memory computing framework. Background Technology

[0002] Against the backdrop of rapid development in retail informatization and IoT smart terminals, offline retail stores are widely deploying smart sales terminals. These terminals automate transaction processing by relying on modules such as barcode scanning, payment, and member sensing. Currently, most retail enterprises use traditional disk storage-based transaction processing models, which lack efficient in-memory computing support. Taking a chain fresh food supermarket as an example, it has deployed more than 20 smart sales terminals. The product barcode scanning data, payment information, and member points data collected by the terminals must first be written to disk storage before transaction parsing and processing. There is often a delay in synchronizing the online mini-program inventory and the store's back-end inventory. Furthermore, it can only calculate member points according to a fixed points multiplier and lock inventory according to a uniform priority, and cannot flexibly adjust according to the fluctuations in the store's real-time transaction frequency. The corresponding technical defects are that the traditional processing model has high data processing latency, making it difficult to dynamically adjust the points multiplier and inventory locking priority by fitting real-time transaction frequency time-series data and analyzing inflection points. The online and offline inventory synchronization lacks a consistency control mechanism based on memory mirroring, and the sales fluctuation analysis lacks scientific stress tensor field analysis and compensation factor support. This leads to problems such as overselling of inventory, unreasonable points adjustment, and untimely triggering of promotions, which affect retail operation efficiency and reduce user consumption experience. Summary of the Invention

[0003] This invention provides a real-time transaction data processing system for intelligent sales terminals based on a memory computing framework, which improves the transaction processing efficiency and the level of precision in retail operations of intelligent sales terminals.

[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0005] The first aspect is a real-time transaction data processing system for intelligent sales terminals based on a memory computing framework, including:

[0006] The acquisition module is used to capture raw transaction data streams in real time through a collection array consisting of scanning modules, payment modules, and member sensing modules deployed in various smart sales terminals.

[0007] The computing module is used to construct a memory data association structure in the memory area corresponding to the physical location of the acquisition array, based on the memory computing framework; to perform parallel transaction processing on the original transaction data stream carried by the memory data association structure; during the parallel transaction processing, to collect the transaction frequency time series data of each smart sales terminal in real time; to fit the transaction frequency within the current time window using a cubic Bézier curve; and to calculate the inflection point of the Bézier curve; to dynamically adjust the points multiplier and inventory lock priority according to the location and direction of the inflection point; and to obtain the processed transaction data of the locked inventory identifier, points variable, and settlement amount.

[0008] The push module is used to synchronize processed transaction data to the online mini-program inventory service and the store back-end inventory service in real time, build a distributed inventory consistency state mapping based on memory mirror, and push transaction logs to the store management service cluster in real time.

[0009] The processing module is used by the store management service cluster to dynamically construct a sales data stress tensor field in memory based on the received transaction logs, perform principal direction analysis and principal value calculation on the stress tensor field, and obtain compensation factors that characterize the main mode of sales fluctuation. The compensation factors are used to correct the inventory threshold and promotion triggering conditions for the next cycle.

[0010] Furthermore, a data acquisition array consisting of scanning modules, payment modules, and membership sensing modules deployed in various smart sales terminals is used to capture raw transaction data streams in real time, including:

[0011] The barcode scanning module scans the product barcode and generates product identification data and transaction trigger signal; the payment module collects payment method, payment account and transaction amount data; and the membership sensing module reads membership card information and generates membership identification data and points account status data.

[0012] The product identification data, payment method and payment account data, transaction amount data, member identification data, and points account status data are fused together according to the timestamp of the transaction to form original transaction data with a unique identifier.

[0013] Furthermore, based on the in-memory computing framework, a memory data association structure corresponding to the physical location of the acquisition array is constructed in the memory area. Parallel transaction processing is performed on the original transaction data stream carried by the memory data association structure. During the parallel transaction processing, the transaction frequency time-series data of each smart sales terminal is collected in real time. The transaction frequency within the current time window is fitted using a cubic Bézier curve, and the inflection point of the Bézier curve is calculated, including:

[0014] Based on the physical location identifier of each smart sales terminal, the first data object, the second data object, and the third data object are assigned to the scanning module, payment module, and membership sensing module of each terminal in the memory area. The three data objects generated in the same transaction are linked together through data lineage to form a memory data association structure corresponding to the physical location of the collection array.

[0015] The original transaction data stream is loaded into the memory data association structure, and a parallel computing framework is used to perform transaction processing on the data objects of multiple transactions simultaneously. During the transaction processing, the number of transactions of each smart sales terminal within a continuous sliding time window is recorded in real time to generate transaction frequency time series data.

[0016] For the time series data of transaction frequency within the current time window, four control points are selected to construct a cubic Bézier curve to fit the changing trend of transaction frequency. The inflection point of the curve is obtained by solving the point where the second derivative of the Bézier curve is zero.

[0017] Furthermore, based on the location and direction of the inflection point, the points multiplier and inventory lock priority are dynamically adjusted to obtain processed transaction data including locked inventory identifiers, points variables, and settlement amounts, including:

[0018] The algorithm analyzes the inflection point information of the cubic Bézier curve within the current time window, including the time period position of the inflection point and the direction of its concavity / convexity. According to the preset adjustment strategy, if the inflection point is located in the first half of the time window and the direction of the inflection point is downward convex, the integration multiplier of subsequent transactions is increased and the priority of inventory locking is improved. If the inflection point is located in the second half of the time window and the direction of the inflection point is upward convex, the integration multiplier of transactions is decreased and the priority of inventory locking is reduced. If the inflection point is located in the first half of the time window and the direction of the inflection point is upward convex, the inflection point is located in the second half of the time window and the direction of the inflection point is downward convex, and the inflection point is located in the middle of the time window, the current integration multiplier and the priority of inventory locking remain unchanged, and the adjusted integration multiplier is obtained.

[0019] The current transaction's point variable is calculated based on the adjusted point multiplier. The inventory lock operation is executed according to the adjusted inventory lock priority, and a locked inventory identifier is generated. At the same time, the settlement amount is generated by combining the transaction amount. Finally, the processed transaction data containing the locked inventory identifier, point variable, and settlement amount is output.

[0020] Furthermore, processed transaction data is synchronized in real time to the online mini-program inventory service and the store back-end inventory service, constructing a distributed inventory consistency state mapping based on memory mirroring. Simultaneously, transaction logs are pushed to the store management service cluster in real time, including:

[0021] The processed transaction data, which includes locked inventory identifiers, points variables, and settlement amounts, will be pushed to the memory areas of the online mini-program inventory service and the store back-end inventory service, respectively, through the data pipeline provided by the in-memory computing framework.

[0022] The online mini-program inventory service and the store back-end inventory service are based on the processed transaction data pushed to their respective memory areas. They perform atomic updates on the corresponding product inventory quantities according to the locked inventory identifiers, thereby forming a memory mirror inventory state in their respective memory areas that is decoupled from the physical inventory but logically consistent.

[0023] The system compares the in-memory mirror inventory status of the same product in the online mini-program inventory service and the store back-end inventory service in real time to obtain the comparison results. Based on the comparison results, a two-way verification mechanism is established. When the inconsistency between the two states is detected, a traceability correction operation based on the lineage of in-memory data is triggered to build a distributed inventory consistency state mapping.

[0024] Based on the processed transaction data pushed by the system, the complete execution process is encapsulated as a transaction log, and the transaction log is pushed in parallel to the store management service cluster through the real-time message bus of the in-memory computing framework.

[0025] Furthermore, the online mini-program inventory service and the store back-end inventory service, based on the processed transaction data pushed to their respective memory areas, perform atomic updates on the corresponding product inventory quantities according to the locked inventory identifiers. This creates a memory-reflected inventory state in their respective memory areas that is decoupled from but logically consistent with the physical inventory, including:

[0026] Parse the locked inventory identifiers in the processed transaction data, and locate the corresponding product inventory records in the memory areas of the online mini-program inventory service and the store back-end inventory service, respectively, based on the identifiers.

[0027] Based on the located product inventory records, an atomic memory operation is used to deduct the inventory quantity and update the version stamp of the inventory record to ensure data consistency under concurrent updates, thus obtaining the updated inventory quantity and version stamp.

[0028] Based on the updated inventory quantity and version stamp, obtain the memory image inventory status containing the current inventory snapshot, and use the memory image inventory status as the respective memory image inventory status of the online mini-program inventory service and the store back-end inventory service.

[0029] Furthermore, based on the received transaction logs, the store management service cluster dynamically constructs a sales data stress tensor field in memory. It then performs principal direction analysis and principal value calculation on the stress tensor field to obtain compensation factors characterizing the main modes of sales fluctuation. These compensation factors are used to correct the inventory threshold and promotion triggering conditions for the next cycle, including:

[0030] Based on the pushed and received transaction logs, the store management service cluster parses the product identifier, transaction timestamp, settlement amount and points variables contained in each transaction log, and constructs a sales data stress tensor field in memory with the product as the dimension and time as the order.

[0031] The main direction of the stress tensor field of sales data is analyzed. By calculating the gradient and divergence of the stress tensor field, the main directional characteristics of the fluctuation of sales data are extracted, and the main direction of the stress tensor field is obtained.

[0032] Based on the obtained principal direction, the principal value of the stress tensor field is calculated. By solving the eigenvalues ​​of the stress tensor field, the compensation factor characterizing the principal mode of sales fluctuation is obtained. The obtained compensation factor is then applied to the correction of the inventory threshold and promotion triggering conditions for the next cycle.

[0033] Furthermore, based on the obtained principal direction, principal value calculations are performed on the stress tensor field. By solving for the eigenvalues ​​of the stress tensor field, compensation factors characterizing the principal mode of sales fluctuations are obtained. These compensation factors are then applied to correct the inventory threshold and promotion triggering conditions for the next cycle, including:

[0034] Based on the obtained principal direction, the principal value of the stress tensor field is calculated. By solving the eigenvalues ​​of the stress tensor field, the initial compensation factor characterizing the principal mode of sales fluctuation is obtained.

[0035] The numerical value and positive / negative direction of the initial compensation factor are analyzed, and an inventory correction coefficient for adjusting the inventory threshold and a promotion correction coefficient for adjusting the promotion triggering conditions are generated based on the analysis results.

[0036] Apply the inventory adjustment factor to the inventory threshold of the current period to obtain the adjusted inventory threshold for the next period; apply the promotion adjustment factor to the promotion trigger condition of the current period to obtain the adjusted promotion trigger condition for the next period.

[0037] The revised inventory threshold and promotion trigger conditions for the next cycle are output to the inventory management service and promotion management service to guide the business operations in the next cycle.

[0038] In a second aspect, a computing device includes:

[0039] One or more processors;

[0040] A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to execute the system.

[0041] Thirdly, a computer-readable storage medium storing a program that, when executed by a processor, performs the system.

[0042] The above-described solution of the present invention has at least the following beneficial effects:

[0043] By using a data acquisition array comprised of a scanning module, a payment module, and a membership sensing module to capture raw transaction data streams in real time, and relying on an in-memory computing framework to construct a memory data association structure corresponding to the physical location of the acquisition array and execute parallel transaction processing, the system overcomes the technical problems of high data processing latency, inability to dynamically adjust points and inventory lock-up strategies based on transaction frequency fluctuations, inconsistent online and offline inventory synchronization, lack of scientific support for sales fluctuation analysis, and susceptibility to overselling, unreasonable points control, and untimely promotion triggering in traditional disk-based transaction processing models. This results in improved real-time performance and efficiency of intelligent sales terminal transaction processing, ensured consistency of distributed inventory data, and enabled refined dynamic optimization of points control, inventory management, and promotion strategies, thereby enhancing the level of retail operation refinement and user experience. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of a real-time transaction data processing system for an intelligent sales terminal based on a memory computing framework, provided by an embodiment of the present invention.

[0045] Figure 2 This is a schematic diagram illustrating the process of a real-time transaction data processing system for intelligent sales terminals based on a memory computing framework, provided by an embodiment of the present invention. The system synchronizes processed transaction data in real time to the online mini-program inventory service and the store back-end inventory service, constructs a distributed inventory consistency state mapping based on memory mirroring, and pushes transaction logs to the store management service cluster in real time. Detailed Implementation

[0046] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0047] like Figure 1As shown, an embodiment of the present invention proposes an intelligent diagnostic and processing system for abnormal states of urban electronic police monitoring support poles, comprising:

[0048] The acquisition module is used to capture raw transaction data streams in real time through a collection array consisting of scanning modules, payment modules, and member sensing modules deployed in various smart sales terminals.

[0049] The computing module is used to construct a memory data association structure in the memory area corresponding to the physical location of the acquisition array, based on the memory computing framework; to perform parallel transaction processing on the original transaction data stream carried by the memory data association structure; during the parallel transaction processing, to collect the transaction frequency time series data of each smart sales terminal in real time; to fit the transaction frequency within the current time window using a cubic Bézier curve; and to calculate the inflection point of the Bézier curve; to dynamically adjust the points multiplier and inventory lock priority according to the location and direction of the inflection point; and to obtain the processed transaction data of the locked inventory identifier, points variable, and settlement amount.

[0050] The push module is used to synchronize processed transaction data to the online mini-program inventory service and the store back-end inventory service in real time, build a distributed inventory consistency state mapping based on memory mirror, and push transaction logs to the store management service cluster in real time.

[0051] The processing module is used by the store management service cluster to dynamically construct a sales data stress tensor field in memory based on the received transaction logs, perform principal direction analysis and principal value calculation on the stress tensor field, and obtain compensation factors that characterize the main mode of sales fluctuation. The compensation factors are used to correct the inventory threshold and promotion triggering conditions for the next cycle.

[0052] In this embodiment of the invention, by employing a multi-module acquisition array to capture the original transaction data stream in real time, constructing a corresponding memory data association structure based on a memory computing framework and executing parallel transaction processing, fitting transaction frequency with cubic Bézier curves and calculating inflection points to dynamically adjust the points multiplier and inventory lock priority, utilizing memory mirroring to achieve distributed inventory consistency mapping, and obtaining compensation factors through sales data stress tensor field analysis to correct inventory thresholds and promotion triggering conditions, the technical problems of high transaction processing latency in traditional sales terminals, inability to dynamically control points and inventory strategies, inconsistent online and offline inventory synchronization, inaccurate sales fluctuation analysis, and easy occurrence of overselling and untimely promotion triggering are overcome. This achieves the technical effects of improving the real-time performance and concurrency efficiency of transaction processing, ensuring the consistency of distributed inventory data, realizing dynamic optimization of points and inventory management, and improving the level of retail operation refinement and user consumption experience.

[0053] In a preferred embodiment of the present invention, a data acquisition array consisting of a scanning module, a payment module, and a membership sensing module deployed in each smart sales terminal captures the original transaction data stream in real time, including:

[0054] The scanning module scans the product barcode and generates product identification data and a transaction trigger signal. The payment module collects payment method, payment account, and transaction amount data. The membership sensing module reads membership card information and generates membership identification data and points account status data. Specifically, during the normal operation of the smart vending terminal, the scanning module, payment module, and membership sensing module together form a data collection array to complete the step-by-step collection of raw transaction data. The scanning module optically scans and recognizes the barcode of the product selected by the user, extracts the corresponding product information through image analysis, generates standardized product identification data, and generates a transaction trigger signal at the moment the scan is completed to initiate the subsequent payment and membership data collection process. After receiving the transaction trigger signal, the payment module collects the user's selected payment method, the bound payment account information, and the transaction amount data in real time, completing the collection of all-dimensional information in the payment process. The membership sensing module reads the built-in information of the user's membership card through radio frequency identification, generates membership identification data corresponding to the member's identity, and reads the remaining points and validity period of the member's current points account, so as to achieve complete collection of member-related information and ensure that product, payment and membership data are accurately obtained.

[0055] The process involves fusing multi-source heterogeneous data, including product identification data, payment method and payment account data, transaction amount data, member identification data, and points account status data, according to the transaction timestamp, to form original transaction data with unique transaction identifiers. Specifically, after completing multi-source data collection, the collected product identification data, payment method and payment account data, transaction amount data, member identification data, and points account status data are uniformly processed and sorted. Using the actual timestamp of each transaction as the core sorting criterion, all collected data corresponding to the same transaction are aligned and sorted according to their timestamps to eliminate time discrepancies between data collected from different modules, thus completing the fusion of multi-source heterogeneous data. During the data fusion process, a unique transaction identifier is generated for each transaction by sequentially combining the physical location number of the smart sales terminal, the transaction timestamp, and the collection execution sequence number. This unique transaction identifier is then bound and associated with the fused product, payment, and member-related data, ultimately forming complete, clearly correlated, and uniquely identified original transaction data.

[0056] In this embodiment of the invention, a collection array consisting of a scanning module, a payment module, and a member sensing module is used to accurately collect product, payment, and member-related data. The multi-source heterogeneous data is then fused according to the transaction timestamp to form original transaction data with a unique transaction identifier. This overcomes the technical problems of scattered multi-source data collection, ineffective integration of heterogeneous data, difficulty in tracing transaction data due to the lack of a unique identifier, and weak data correlation in traditional sales terminals. As a result, comprehensive and accurate transaction data collection, efficient and unified multi-source data, and unique and correlated original transaction data are achieved.

[0057] In a preferred embodiment of the present invention, based on a memory computing framework, a memory data association structure corresponding to the physical location of the acquisition array is constructed in the memory area; parallel transaction processing is performed on the original transaction data stream carried by the memory data association structure; during the parallel transaction processing, the transaction frequency time-series data of each smart sales terminal is collected in real time; the transaction frequency within the current time window is fitted by a cubic Bézier curve, and the inflection point of the Bézier curve is calculated, including:

[0058] Based on the physical location identifiers of each smart sales terminal, corresponding first, second, and third data objects are allocated in the memory area for each terminal's scanning module, payment module, and membership sensing module. These three data objects generated in the same transaction are linked together through data lineage, forming a memory data association structure corresponding to the physical location of the data collection array. Specifically, this involves: leveraging the high-speed data processing characteristics of the memory computing framework to avoid the data read / write latency defects of traditional disk storage modes; firstly, the physical location identifiers of each smart sales terminal within the store are read, ensuring they correspond to the actual physical deployment location of the data collection array; then, in the memory area, independent and fixed memory spaces are allocated for each smart sales terminal's scanning module, payment module, and membership sensing module; and sequentially, first, second, and third data objects are created to store the data collected by the corresponding modules. The first data object specifically stores the product identification data and transaction trigger signals collected by the scanning module; the second data object specifically stores the payment method, payment account, and transaction amount data collected by the payment module; and the third data object specifically stores the member identification data and points account status data collected by the membership sensing module. In the processing flow of a single transaction, the first, second, and third data objects generated by the transaction are bidirectionally linked through data lineage to clarify the correspondence that the three data objects belong to the same transaction. This constructs a memory data association structure that completely corresponds to the physical location of the acquisition array, ensuring that the memory data layout matches the terminal hardware deployment location.

[0059] The original transaction data stream is loaded into the memory data association structure. A parallel computing framework is used to simultaneously perform transaction processing on multiple transaction data objects. During the transaction processing, the number of transactions of each smart sales terminal within a continuous sliding time window is recorded in real time to generate transaction frequency time-series data. Specifically, this includes: continuously loading the original transaction data stream transmitted from the front-end acquisition array into the constructed memory data association structure; relying on the real-time processing capability of the memory computing framework, abandoning the inefficient mode of traditional disk read and write, and using a parallel computing framework to simultaneously perform transaction parsing, data verification, and other transaction processing operations on multiple different transaction data objects carried in the memory data association structure, realizing synchronous parallel processing of multi-terminal transactions and improving the overall efficiency of transaction processing; throughout the parallel transaction processing process, the continuous sliding time window is used as the statistical unit to count and record the total number of transactions completed by each smart sales terminal within the current sliding time window in real time; the number of transactions corresponding to each sliding time window is arranged and combined in chronological order to form transaction frequency time-series data that intuitively reflects the transaction fluctuation of smart sales terminals.

[0060] For the transaction frequency time-series data within the current time window, four control points are selected to construct a cubic Bézier curve to fit the changing trend of transaction frequency. The inflection points of the curve are obtained by solving for the points where the second derivative of the Bézier curve is zero. Specifically, this involves selecting four key data points corresponding to the time nodes in the transaction frequency time-series data generated within the current sliding time window as the four control points of the cubic Bézier curve. The curve parameters are value range Coordinates of any point on the curve: A cubic Bézier curve was constructed using four control points to fit the trend of transaction frequency changes. , After constructing the curve, the first derivative of the cubic Bézier curve is calculated using the following formula:

[0061] ,

[0062] The slope change function of the curve is obtained, and the formula for calculating the slope change function by taking the second derivative is:

[0063] ,

[0064] The second derivative function of the curve is obtained. The result of the second derivative function is set to zero. The coordinates of the points satisfying this condition are obtained through equation solving. These coordinates are the inflection points of the cubic Bézier curve. These inflection points can accurately characterize the turning points in the trend of changing trading frequency. , , , These correspond to the time coordinates of the four key data points within the sliding time window. , , , These correspond to the transaction frequency values ​​of the four key data points at their respective time points.

[0065] In this embodiment of the invention, a memory-based computing framework is adopted. Corresponding memory data objects are allocated to each module based on the physical location identifier of each smart sales terminal. Data objects of the same transaction are linked through data lineage to construct a memory data association structure corresponding to the physical location of the acquisition array. The original transaction data stream is loaded into this structure, and a parallel computing framework is used to process multiple transaction data objects synchronously. Simultaneously, transaction frequency is recorded in real time to generate time-series data. Control points are selected to construct a cubic Bézier curve to fit the transaction frequency trend, and the inflection point is obtained by solving for the zero point of the second derivative of the curve. Therefore, this overcomes the technical problems in traditional transaction processing, such as the mismatch between the memory data structure and the physical location of the acquisition array, weak data correlation, low efficiency due to the inability to process multiple transactions in parallel, and difficulty in accurately fitting the transaction frequency change trend and effectively identifying inflection points, which affect the scientific nature of subsequent regulation. This achieves precise correspondence between memory data and the physical location of the acquisition array, strengthens the correlation of transaction data, improves the parallel efficiency and real-time performance of transaction processing, and accurately captures the transaction frequency change trend and accurately locates inflection points.

[0066] In a preferred embodiment of the present invention, the points multiplier and inventory lock priority are dynamically adjusted according to the location and direction of the inflection point to obtain processed transaction data including locked inventory identifiers, points variables, and settlement amounts, including:

[0067] The algorithm analyzes the inflection point information of the cubic Bézier curve within the current time window, including the time period position of the inflection point and its concave / convex direction. Based on a preset adjustment strategy, if the inflection point is located in the first half of the time window and its direction is downward convex, the bonus multiplier for subsequent transactions is increased, and the inventory lock priority is raised. If the inflection point is located in the second half of the time window and its direction is upward convex, the bonus multiplier for transactions is decreased, and the inventory lock priority is lowered. If the inflection point is located in the first half of the time window with an upward convex direction, in the second half of the time window with a downward convex direction, or in the middle of the time window, the current bonus multiplier and inventory lock priority remain unchanged, resulting in the adjusted bonus multiplier. Specifically, this involves: using a memory computing framework, reading the obtained inflection point coordinate information, and combining this with the total duration of the current sliding time window to analyze the time period position of the inflection point within the time window. The current sliding time window is set to 60 minutes, with a start time of 9:00. The end time is 10:00. First, calculate the total duration of the current sliding time window. The total duration is 60 minutes. Then, the midpoint of the time window is calculated using a formula: Substituting the data, the result is 9:30. The x-coordinate corresponding to the inflection point, i.e. the time when the inflection point occurs, is compared with the intermediate time node 9:30. If the time corresponding to the inflection point is 9:20, which is less than the intermediate time node 9:30, then the inflection point is determined to be in the first half of the time window; if the time corresponding to the inflection point is 9:40, which is greater than the intermediate time node 9:30, then the inflection point is determined to be in the second half of the time window, thus clarifying the time period position of the inflection point.

[0068] The direction of the inflection point is determined by analyzing the calculated second derivative value of the ordinate. If the value is 0.8 (greater than zero), the inflection point is determined to be convex downwards, indicating that the growth trend of trading frequency within the current time window is accelerating. If the value is -0.6 (less than zero), the inflection point is determined to be convex upwards, indicating that the growth trend of trading frequency within the current time window is slowing down. If the value is 0, the inflection point has no obvious direction and the trading frequency trend remains stable.

[0069] Based on the preset adjustment strategy, and considering the time period and direction of the inflection point, the points multiplier and inventory lock priority are dynamically adjusted. The preset base points multiplier is 1.0, and the inventory lock priority is divided into five levels, from level one to level five, with level one being the highest priority and level five being the lowest priority. Each priority level corresponds to a different inventory lock order, with level one priority locking inventory first and level five priority locking inventory last. If the inflection point is in the first half of the time window, such as 9:20, and the inflection point direction is downward convex with a second derivative of 0.8 on the ordinate, it indicates that the store's transaction activity is rapidly increasing. To enhance consumer willingness to spend and ensure stable inventory of popular items, the transaction points multiplier needs to be increased and the inventory lock priority raised. The points multiplier is adjusted to the base points multiplier of 1.0 × 1.2, i.e., the adjusted points multiplier is 1.2, and the inventory lock priority is raised one level from the current level three to level two. If the inflection point is in the latter half of the time window... If the inflection point is 9:40 and the direction is upward convex with a second derivative of -0.6, it indicates that the store's transaction activity is slowing down. To reasonably control the cost of points and optimize the allocation of inventory resources, it is necessary to reduce the transaction points multiplier and lower the inventory lock priority. The points multiplier is adjusted to the base points multiplier of 1.0 × 0.8, that is, the adjusted points multiplier is 0.8. The inventory lock priority is reduced by one level from the current level three to level four. If the inflection point is located in the first half of the time window and the direction is upward convex, the inflection point is located in the second half of the time window and the direction is downward convex, the inflection point is located in the middle of the time window, including the case where the inflection point is located in the first half of the time window but the direction is upward convex, the case where the inflection point is located in the second half of the time window but the direction is downward convex, and the case where the inflection point has no obvious concave or convex direction, it indicates that the store's transaction frequency trend is stable. No parameter adjustment is required. The current points multiplier and inventory lock priority remain unchanged, and the final adjusted points multiplier and inventory lock priority are obtained.

[0070] Calculate the integral variable for the current transaction based on the adjusted integral multiplier, perform inventory locking operations according to the adjusted inventory locking priority and generate a locked inventory identifier, and simultaneously generate the settlement amount based on the transaction amount. Finally, output the processed transaction data containing the locked inventory identifier, integral variable, and settlement amount. Specifically, this includes: calculating the integral variable for the current transaction, denoted as... Read the transaction amount data of the current transaction and record it as... The adjusted integral multiplier obtained is denoted as ,according to The calculation rules are as follows: Points are calculated using a preset maximum of 150 points per transaction. If the calculated points are greater than this maximum, the points will be set to the preset maximum of 150 points per transaction. If the calculated points are less than or equal to this maximum, the actual calculated points will be used to ensure the reasonableness and controllability of the points. For example, if the transaction amount is 120 yuan, the adjusted points multiplier is 1.2, and the calculated points are 144, which is less than the maximum of 150 points, so the points are set to 144. If the transaction amount is 150 yuan, the adjusted points multiplier is 1.2, resulting in 180 points, which is greater than the maximum of 150 points, so the points are set to 150. If the transaction amount is 80 yuan, the adjusted points multiplier is 0.8, resulting in 64 points, which is less than the maximum of 150 points, so the points are set to 64.

[0071] Secondly, based on the adjusted inventory lock priority, an inventory lock operation is performed, and a locked inventory identifier is generated. The product identifier data for the current transaction is read; for example, if the product identifier is 002, the corresponding product is fresh green vegetables. The current available inventory quantity for this product is 50 jin (25 catties). Combined with the purchase quantity of 2 jin (1 catties) in this transaction, the inventory lock is performed according to the adjusted inventory lock priority. The higher the inventory lock priority, the earlier the lock operation is executed, prioritizing the inventory supply for high-priority transactions and avoiding overselling. If the adjusted inventory lock priority is level two, when multiple transactions simultaneously request to lock the product's inventory, the inventory lock operation for this transaction is executed first. During the lock operation, the available inventory quantity of the product is deducted, and the deducted quantity equals the purchase quantity of 2 jin (1 catties) in this transaction. After the deduction, the available inventory quantity of the product is updated to 48 jin, and a locked inventory identifier is generated. The locked inventory identifier is composed of the product identifier, the physical location identifier of the smart sales terminal, the unique transaction identifier, and the inventory lock timestamp, ensuring the uniqueness and traceability of each locking operation. For example, if the product identifier is 002, the physical location identifier of the smart sales terminal is 02 corresponding to terminal No. 2 in the store, the unique transaction identifier is 202603171430 corresponding to the transaction that occurred at 14:30 on March 17, 2026, and the inventory lock timestamp is 20260317143015 corresponding to the locking being completed at 14:30:15 on March 17, 2026, the combined locked inventory identifier is 002-02-202603171430-20260317143015.

[0072] The settlement amount is generated by combining the transaction amount and recorded as follows: It outputs the processed transaction data, reads the transaction amount data of the current transaction, and determines whether the member chooses to use points to deduct the settlement amount. , The settlement amount calculation formula has two scenarios: when a member chooses to deduct points: When a member does not choose to redeem points: For example, if the transaction amount is 120 yuan, the points variable is 144 points, and the deduction amount is 1.44 yuan, the settlement amount is 120 yuan minus 1.44 yuan, which equals 118.56 yuan. If the transaction amount is 5 yuan, the points variable is 64 points, which is less than 100, so no deduction is made, and the settlement amount is 5 yuan. If the transaction amount is 1 yuan, the points variable is 144 points, and the deduction amount is 1.44 yuan, the deduction amount is greater than the transaction amount, so the settlement amount is zero. If the member does not choose points deduction, the transaction amount is 120 yuan, and the settlement amount is 120 yuan. After completing the above calculations and operations, the locked inventory identifier, points variable, and settlement amount are bound and integrated into complete processed transaction data, which is pushed to the subsequent inventory synchronization stage in real time, providing accurate and standardized data support for the synchronous update of online mini-program inventory services and store back-end inventory services.

[0073] In this embodiment of the invention, by employing the technical means of analyzing the position and concavity / convexity direction of the inflection point of the cubic Bézier curve, dynamically adjusting the points multiplier and inventory lock priority according to a preset strategy, and then calculating the points variable based on the adjusted parameters, executing inventory lock, generating settlement amount, and outputting standardized processed transaction data, the technical problems of fixed points multipliers and uniform inventory lock priorities in traditional sales terminals, which cannot flexibly adapt to real-time transaction fluctuations and are prone to unreasonable points incentives, chaotic inventory locks, or waste of resources, are overcome. Thus, the invention achieves adaptive dynamic optimization of points and inventory strategies and accurate and reliable transaction settlement.

[0074] like Figure 2 As shown, in another preferred embodiment of the present invention, processed transaction data is synchronized in real time to the online mini-program inventory service and the store back-end inventory service to construct a distributed inventory consistency state mapping based on memory mirroring. Simultaneously, transaction logs are pushed to the store management service cluster in real time, including:

[0075] The processed transaction data, including locked inventory identifiers, points variables, and settlement amounts, is pushed to the memory areas of the online mini-program inventory service and the store back-end inventory service via a data pipeline provided by the in-memory computing framework. Specifically, relying on the data pipeline built into the in-memory computing framework, the integrated processed transaction data is first read. This data contains three core pieces of information: locked inventory identifiers, points variables, and settlement amounts. The locked inventory identifier clearly corresponds to a specific product, the physical location of the smart sales terminal, a unique transaction identifier, and an inventory lock timestamp. The points variable is the points actually calculated for the current transaction and can be used for deduction or accumulation. The settlement amount is the final amount payable for the current transaction. The data pipeline uses a direct memory read / write transmission method, eliminating the need for disk storage and ensuring real-time data transmission. The processed transaction data is simultaneously pushed to the dedicated memory areas of the online mini-program inventory service and the store back-end inventory service. During the push process, data integrity is verified in real time. If data is missing, such as a missing locked inventory identifier or settlement amount, a re-push mechanism is immediately triggered until the data is completely pushed to the memory areas of both inventory services, ensuring that both online and offline inventory services can obtain the latest transaction processing results in real time.

[0076] The online mini-program inventory service and the store back-end inventory service are based on the processed transaction data pushed to their respective memory areas. They perform atomic updates on the corresponding product inventory quantities according to the locked inventory identifiers, thereby forming a memory mirror inventory state in their respective memory areas that is decoupled from the physical inventory but logically consistent. Specifically, the online mini-program inventory service and the store back-end inventory service simultaneously read the processed transaction data in their respective memory areas, prioritize parsing the locked inventory identifiers in the data, and locate the corresponding inventory record for the product in their respective memory databases based on the product identifiers in the locked inventory identifiers. They then clarify the current available inventory quantity, locked inventory quantity, and inventory version stamp of the product. Taking a specific transaction as an example, the locked inventory identifier is 002-02-202603171430-20260317143015. Parsing reveals that the product identifier 002 corresponds to fresh green vegetables. The available inventory quantity of this product in the online mini-program inventory service memory area is 48 jin, the locked inventory quantity is 2 jin, and the inventory version stamp is 1. In the store backend inventory service memory area, the available inventory quantity of this product is also 48 jin, the locked inventory quantity is 2 jin, and the inventory version stamp is 1.

[0077] Two inventory services simultaneously perform atomic update operations on the inventory quantity of this product. Atomic updates ensure that operations such as inventory deduction and version stamp updates are completed synchronously, avoiding inventory data conflicts in concurrent scenarios. The specific update process is as follows: First, the current available inventory quantity of the product is read, and then the purchase quantity of this transaction (i.e., the locked inventory identifier corresponding to the purchase quantity of 2 jin) is subtracted to obtain the updated available inventory quantity. The calculation method is available inventory quantity minus the purchase quantity, which is 48 jin - 2 jin = 46 jin. Simultaneously, the inventory version stamp is incremented by one, calculated by adding one to the current inventory version stamp. That is, 1+1=2, which is used to record the number of inventory updates for easy consistency verification later. After the update is completed, the online mini-program inventory service and the store back-end inventory service will store the updated available inventory quantity, locked inventory quantity, inventory version stamp and corresponding transaction information of the product in their respective memory areas to form the memory mirror inventory status of the product. This memory mirror inventory status is decoupled from the actual physical inventory of the store. There is no need to synchronize the hardware storage data of the physical inventory in real time. It only reflects the logical inventory status of the product through memory data mapping, ensuring that the memory mirror inventory status is logically consistent with the actual physical inventory.

[0078] The system performs real-time comparisons of the in-memory mirror inventory status of the same product in the online mini-program inventory service and the store back-end inventory service to obtain comparison results. Based on these results, a two-way verification mechanism is established. When inconsistencies are detected, a traceability correction operation based on the in-memory data lineage is triggered to construct a distributed inventory consistency mapping. Specifically, this includes: leveraging the real-time comparison capabilities of the in-memory computing framework to establish a real-time data comparison mechanism between the online mini-program inventory service and the store back-end inventory service, with a comparison frequency set every 100 milliseconds to ensure timely detection of inconsistencies. During each comparison, using the product identifier as the unique matching criterion, a comprehensive comparison is performed between the in-memory mirror inventory status of a specific product in the online mini-program inventory service's in-memory area and the in-memory mirror inventory status of the same product in the store back-end inventory service's in-memory area. The comparison includes three core pieces of information: the product's available inventory quantity, the locked inventory quantity, and the inventory version stamp, ensuring complete consistency of all inventory parameters for the same product in both inventory services.

[0079] Taking product identifier 002 fresh green vegetables as an example, comparing the memory mirror inventory status of the online mini-program inventory service and the store back-end inventory service, if the available inventory quantity of the product in the online mini-program inventory service is 46 jin, the locked inventory quantity is 2 jin, and the inventory version stamp is 2, and the available inventory quantity of the product in the store back-end inventory service is also 46 jin, the locked inventory quantity is 2 jin, and the inventory version stamp is also 2, then the comparison result is consistent, and the memory mirror inventory status of the two inventory services remains unchanged. If, due to data push delays, concurrent update conflicts, or other reasons, the available inventory quantity of a product in the online mini-program inventory service is 46 jin (approximately 28 catties) with an inventory version stamp of 2, while the available inventory quantity of the same product in the store's backend inventory service is 48 jin (approximately 24 kg) with an inventory version stamp of 1, the comparison result is inconsistent, and a two-way verification mechanism is immediately triggered. After the two-way verification mechanism is activated, a traceability correction operation is carried out based on the in-memory data lineage. By tracing the push path of processed transaction data and inventory update records, the reason for the inconsistency in inventory status is clarified. Specifically, the traceability process is as follows: first, the timestamps of the two inventory services receiving processed transaction data are queried. If the timestamp of the store's backend inventory service receiving the data is later than... The online mini-program inventory service indicates a data push delay. In this case, the store back-end inventory service, which received the data later, is used as the correction target. The in-memory mirror inventory status of the product in the online mini-program inventory service is read, and the available inventory quantity of the product in the store back-end inventory service is updated to 46 catties and the inventory version stamp is updated to 2, ensuring that the two statuses are consistent. If the query finds that a concurrent conflict occurred during the inventory update process, causing the version stamp of one of the inventory services to not be updated normally, then the in-memory mirror inventory status of the inventory service with the higher version stamp is used as the standard to correct the inventory service with the lower version stamp, ensuring that the inventory version stamp of the two inventory services is completely consistent with all inventory parameters.

[0080] After completing the traceability correction, the memory image inventory status of all products in the online mini-program inventory service and the store back-end inventory service are uniformly associated to build a distributed inventory consistency state mapping. This mapping synchronizes the inventory status of the two inventory services in real time, ensuring that online and offline inventory data are consistent in real time, and completely solving the technical problems of online and offline inventory synchronization delay, data inconsistency, and easy overselling of inventory in the traditional model.

[0081] Based on the processed transaction data pushed to the system, the complete execution process is encapsulated into a transaction log. This transaction log is then pushed in parallel to the store management service cluster via the real-time message bus of the in-memory computing framework. Specifically, this involves: first, reading the processed transaction data pushed to the two inventory services; and simultaneously collecting information on the complete execution process of this processed transaction data from collection and processing to push, including the collection time of the original transaction data, the calculation process of the integral variable, the execution time of the inventory locking operation, the specific parameters of the inventory atomic update, the timestamp of the data push, and the verification results. This information is then integrated with the processed transaction data itself to complete the encapsulation of the transaction log. The encapsulated transaction log must contain complete transaction processing chain information to ensure that the store management service cluster can trace the complete processing process of each transaction through the transaction log. After the transaction log is encapsulated, it is pushed in parallel to the store management service cluster via the real-time message bus of the in-memory computing framework. The real-time message bus adopts a multi-channel parallel transmission mode, with each transaction log corresponding to an independent transmission channel to avoid transmission conflicts between transaction logs of multiple transactions. At the same time, direct memory transmission is used during the transmission process, without the need for disk transfer, ensuring the real-time push of transaction logs, with push latency controlled within 50 milliseconds. During the push process, the integrity and accuracy of transaction logs are verified in real time. If a transaction log is found to have missing information or data errors, a re-encapsulation and push mechanism is immediately triggered until the transaction log is pushed to the store management service cluster completely and accurately.

[0082] In this embodiment of the invention, a data pipeline using an in-memory computing framework is employed to push processed transaction data in real time to the memory areas of the online mini-program and the store's back-end inventory service. This allows for atomic updates to the inventory quantity to form a logically consistent in-memory mirror inventory state. A two-way verification mechanism is established, and traceability correction is performed through in-memory data lineage to construct a distributed inventory consistency mapping. Simultaneously, the transaction execution process is encapsulated as a transaction log and pushed in parallel to the store management service cluster via a real-time message bus. Therefore, this overcomes the technical problems of high synchronization latency, lack of atomicity guarantees for inventory updates, inconsistencies between online and offline inventory states, lack of verification and traceability mechanisms, and untimely transaction log transmission in traditional distributed inventory systems. This achieves real-time synchronization of online and offline inventory, strong data consistency, rapid verification and traceability correction, and provides complete and real-time transaction data support for store management services, thereby improving the stability and reliability of distributed inventory management.

[0083] In a preferred embodiment of the present invention, the online mini-program inventory service and the store back-end inventory service, based on the processed transaction data pushed to their respective memory areas, perform atomic updates on the corresponding product inventory quantities according to the locked inventory identifiers, thereby forming a memory-mirror inventory state in their respective memory areas that is decoupled from but logically consistent with the physical inventory, including:

[0084] The locked inventory identifier in the processed transaction data is parsed, and the corresponding product inventory record is located in the memory areas of the online mini-program inventory service and the store back-end inventory service, respectively, based on the identifier. Specifically, relying on the high-speed data parsing capabilities of the in-memory computing framework, the online mini-program inventory service and the store back-end inventory service simultaneously read the processed transaction data in their respective memory areas, and prioritize extracting the locked inventory identifier from the data. The locked inventory identifier is composed of four parts: product identifier, smart sales terminal physical location identifier, transaction unique identifier, and inventory lock timestamp. Each part is connected by a separator to clearly distinguish each core piece of information. Among them, the product identifier is used to uniquely identify the specific product, the smart sales terminal physical location identifier is used to distinguish the terminal where the transaction occurred, the transaction unique identifier is used to trace the specific transaction, and the inventory lock timestamp is used to record the specific time the inventory was locked.

[0085] Taking the specific locked inventory identifier 002-02-202603171430-20260317143015 as an example, we analyze each part of the identifier segment by segment: The first part 002 is the product identifier, corresponding to the fresh vegetables in the store; the second part 02 is the physical location identifier of the smart sales terminal, corresponding to smart sales terminal No. 2 in the store; the third part 202603171430 is the unique transaction identifier, corresponding to the transaction that occurred at 14:30 on March 17, 2026; the fourth part 20260317143015 is the inventory lock timestamp, corresponding to the inventory lock operation completed at 14:30:15 on March 17, 2026.

[0086] After parsing, to optimize the spatial efficiency of inventory retrieval and support subsequent inventory allocation decisions, we introduce a geometric algorithm: based on the physical location identifier of the smart sales terminal, each terminal is mapped to a preset coordinate point in the store's planar coordinate system. For example, terminal 02 corresponds to coordinates (10, 20). Utilizing the high-speed parallel capabilities of the in-memory computing framework, the Euclidean distance between the current terminal and all other terminals is quickly calculated, generating a distance matrix. This matrix is ​​stored in an in-memory data structure and used to analyze the proximity relationships between terminals. For example, when a product's inventory is insufficient, inventory can be preferentially allocated from the nearest terminal. This geometric algorithm executes entirely in memory, utilizing in-memory location data for high-speed calculation, avoiding disk I / O latency, and providing spatial context information for subsequent retrieval. After completing the geometric calculation, the parsed product identifier is used as the sole retrieval criterion. The online mini-program inventory service retrieves the product inventory record corresponding to the product identifier from its own in-memory database, and the store's backend inventory service also retrieves the product inventory record corresponding to the product identifier from its own in-memory database. The entire retrieval process is completed in memory, without accessing disk storage, ensuring retrieval speed and avoiding the latency caused by traditional disk retrieval. The retrieved product inventory records contain core information such as the available inventory quantity, locked inventory quantity, inventory version stamp, product name, and specifications. The inventory version stamp is used to record the number of inventory updates, ensuring data consistency during subsequent concurrent updates. For example, the retrieved inventory record corresponding to product identifier 002 is: available inventory quantity 48 catties, locked inventory quantity 2 catties, inventory version stamp 1, product name fresh green vegetables, specifications 500g / serving. After the retrieval is completed, the online mini-program inventory service and the store back-end inventory service load the located product inventory records into their respective memory operation areas.

[0087] Based on the located product inventory records, an atomic memory operation is used to deduct the inventory quantity and update the version stamp of the inventory record to ensure data consistency under concurrent updates. This results in the updated inventory quantity and version stamp. Specifically, the online mini-program inventory service and the store back-end inventory service simultaneously start the atomic memory operation. The atomic memory operation ensures that the inventory deduction and version stamp update operations are executed synchronously and cannot be separated. They must either complete at the same time or not be executed at the same time, completely avoiding inventory data chaos caused by one operation completing while the other fails in concurrent scenarios.

[0088] The available inventory quantity read from the located product inventory record is recorded as follows. With inventory version stamp Simultaneously, the corresponding purchase quantity for this transaction is read from the processed transaction data and recorded as... This quantity can be obtained through transaction information associated with the locked inventory identifier, such as the quantity purchased in this transaction corresponding to the locked inventory identifier 002-02-202603171430-20260317143015. 2 jin; Perform an inventory quantity deduction operation, and the specific calculation process for the updated available inventory quantity is as follows: For example, if the current available inventory is 48 jin (24 catties) and the purchase quantity in this transaction is 2 jin (1 catties), then the updated available inventory is 48 jin - 2 jin = 46 jin (23 catties). During the deduction process, the available inventory is checked in real time to see if it is greater than or equal to the purchase quantity in this transaction. If the available inventory is less than the purchase quantity, the atomic operation is terminated immediately, and a message indicating insufficient inventory is displayed to avoid overselling. If the available inventory is greater than or equal to the purchase quantity, the deduction operation continues to ensure the rationality and accuracy of inventory deduction.

[0089] While deducting the inventory quantity, an inventory version stamp update operation is performed. The specific calculation process is that the updated inventory version stamp equals the current inventory version stamp plus one. Taking specific data as an example, if the current inventory version stamp is 1, then the updated inventory version stamp is 1+1=2. The inventory version stamp update is used to record every inventory change. Subsequently, the version stamp can be compared to quickly determine whether there are any inconsistencies in the inventory records. After the memory atomic operation is completed, the online mini-program inventory service and the store back-end inventory service respectively receive the updated available inventory quantity and the locked inventory quantity, which remain unchanged at 2 jin, and the updated inventory version stamp. The updated inventory record of the online mini-program inventory service is: available inventory quantity 46 jin, locked inventory quantity 2 jin, and inventory version stamp 2. The updated inventory record of the store back-end inventory service is consistent with the online one, ensuring that the inventory data of the two inventory services are updated synchronously.

[0090] Based on the updated inventory quantity and version stamp, a memory-image inventory status containing the current inventory snapshot is obtained. This memory-image inventory status is then used as the respective memory-image inventory status for both the online mini-program inventory service and the store back-end inventory service. Specifically, the online mini-program inventory service and the store back-end inventory service synchronously perform the memory-image inventory status generation operation. First, all updated inventory-related information is collected, including the updated available inventory quantity, locked inventory quantity, and inventory version stamp. Simultaneously, the corresponding processed transaction data is associated, including the locked inventory identifier and the current transaction... The purchase quantity, transaction timestamp, settlement amount, and other information are integrated to form a snapshot of the current inventory of the product. The inventory snapshot is a real-time record of the current inventory status of the product, which fully reflects the current inventory status and related transaction information of the product. The available inventory quantity is 46 jin, the locked inventory quantity is 2 jin, the inventory version stamp is 2, the locked inventory identifier is 002-02-202603171430-20260317143015, the purchase quantity of this transaction is 2 jin, the transaction timestamp is 202603171430, and the settlement amount is 118.56 yuan.

[0091] The integrated inventory snapshots are stored in their respective in-memory mirror storage areas, constructing the in-memory mirror inventory status of the product. This in-memory mirror inventory status is completely decoupled from the actual physical inventory in the store. It does not require real-time reading of the physical inventory's hardware storage data; it only reflects the logical inventory status of the product through memory data mapping. This reduces the read / write pressure on the physical inventory, enables real-time updates of the inventory status, and avoids the inventory mirror distortion problem caused by physical inventory read / write latency in the traditional model. It ensures that the in-memory mirror inventory status remains logically consistent with the physical inventory. That is, the available inventory quantity and locked inventory quantity in the in-memory mirror inventory status completely match the actual available quantity and actual locked quantity in the store's physical inventory. For example, if the available inventory quantity of product 002 in the in-memory mirror is 46 jin, the actual available quantity of this product in the store's physical inventory is also 46 jin, and the locked inventory quantity is 2 jin. This ensures that the inventory displayed in the online mini-program and the inventory queried in the store's backend are consistent with the actual physical inventory, avoiding situations where users see that the product is in stock but it is actually out of stock.

[0092] After the online mini-program inventory service and the store back-end inventory service each generate their own memory image inventory status, they use that status as the standard inventory status of the product in their respective memory areas.

[0093] In this embodiment of the invention, the corresponding product inventory record is located based on the locked inventory identifier. The inventory quantity is deducted through atomic memory operations, and the inventory record version stamp is updated synchronously. Then, a memory-image inventory state containing an inventory snapshot is generated based on the updated inventory quantity and version stamp. Therefore, this technical means overcomes the technical problems of traditional inventory updates in concurrent scenarios, such as data conflicts, poor consistency, lack of version control, and high coupling between memory image and physical inventory, resulting in distorted inventory state. This achieves the technical effect of ensuring the atomicity and accuracy of inventory data during concurrent updates, decoupling memory image inventory from physical inventory while maintaining logical consistency, forming a stable and reliable real-time inventory snapshot, and providing solid data support for distributed inventory consistency management.

[0094] In a preferred embodiment of the present invention, the store management service cluster dynamically constructs a sales data stress tensor field in memory based on the received transaction logs, performs principal direction analysis and principal value calculation on the stress tensor field, and obtains a compensation factor characterizing the main mode of sales fluctuation. The compensation factor is used to correct the inventory threshold and promotion triggering conditions for the next period, including:

[0095] The store management service cluster, based on the pushed and received transaction logs, parses the product identifier, transaction timestamp, settlement amount, and points variables contained in each transaction log. It then constructs a sales data stress tensor field in memory, with the product as the dimension and time as the order. Specifically, the store management service cluster first reads all transaction logs pushed to its own memory area in real time through the in-memory computing framework. It then performs structured parsing on each transaction log, extracting the core data fields: product identifier, transaction timestamp, settlement amount, and points variables. The entire parsing process is completed in memory, without accessing the disk, ensuring parsing efficiency. For example, after parsing a certain transaction log, it obtains: Product identifier 002 Fresh Green Vegetables, Settlement Amount ... The transaction timestamp 202603171430 corresponds to 14:30 on March 17, 2026; the settlement amount is 118.56 yuan; and the points variable is 144 points. Parsing another transaction log for the same product yields: product identifier 002, transaction timestamp 202603171445, settlement amount 89.6 yuan, and points variable 89 points. After completing field parsing, a sales data stress tensor field is constructed in memory, using the product as the dimension and time as the order. This tensor field uses the product as the core classification dimension, with each product corresponding to an independent stress tensor field. Within the subfield, time intervals are divided in 15-minute increments using the transaction timestamp as the time axis, resulting in 96 intervals per day. The time interval numbers are denoted as follows. For example, 14:00-14:15 is =56, 14:15-14:30 is =57, 14:30-14:45 is =58, using settlement amount and points variables as core indicators to characterize sales stress, a three-dimensional stress tensor structure is constructed:

[0096] Time dimension: each time interval A time axis coordinate corresponding to the tensor;

[0097] Settlement amount dimension: This product within a time range The cumulative settlement amount stress value within The sum of all transaction settlement amounts within the interval is calculated using the following formula: ,in Time interval The number of transactions for this product. For the first Settlement amount for a transaction, example: There are 2 transactions for product 002 within the range of 58, with A1 = 118.56 yuan and A2 = 89.6 yuan. Substituting these values, we get... =118.56 + 89.6 = 208.16 yuan;

[0098] Indicator variable dimension: This product within a time range Cumulative integral variable stress value within The sum of the integral variables of all transactions within the interval is calculated using the following formula: Where Ii(t) is the integral variable of the i-th transaction, for example: For item 002 within the interval =58, I1 = 144 points and I2 = 89 points. Substituting these values, we get... =144+89=233 points.

[0099] The final constructed sales data stress tensor field is represented by each tensor element as ( , , For example, the stress tensor quantum field of product 002 contains elements such as (57, 0, 0), (58, 208.16, 233), and (59, 0, 0). There are no transactions in the interval t=57, and the stress value is 0. This tensor field is stored in the memory area of ​​the store management service cluster throughout the process and can be updated and accessed in real time.

[0100] The principal direction of the stress tensor field of sales data is analyzed. By calculating the gradient and divergence of the stress tensor field, the main directional characteristics of sales data fluctuations are extracted, resulting in the principal direction of the stress tensor field. Specifically, the gradient represents the rate of change of sales stress values ​​over time, reflecting the speed and trend direction of sales fluctuations. The time interval is uniformly set to... =15 minutes.

[0101] Settlement amount tiers Calculation formula: Example: Product 002 =208.16 yuan =0 yuan, substituting it, we get: ≈13.88 yuan / minute;

[0102] gradient of integral variable Calculation formula: Example: Product 002 =233 points =0 integral, substituting, we get: ≈15.53 points / minute;

[0103] A positive gradient value indicates that the sales stress value increases over time, and the sales enthusiasm rises; a negative gradient value indicates that the sales enthusiasm decreases. The larger the absolute value, the more drastic the sales fluctuation.

[0104] Divergence characterizes the degree of convergence and divergence of sales stress values ​​over time, reflecting the concentration characteristics of sales fluctuations.

[0105] Settlement amount divergence Calculation formula: Example: Product 002 =13.88 yuan / minute =0, substituting into the equation, we get: =6.94 yuan / minute;

[0106] Divergence of integral variables Calculation formula: Example: Product 002 =15.53 points / minute =0, substituting into the equation, we get: =7.77 points / minute;

[0107] A positive divergence value indicates that the sales stress value converges towards the sales peak within that time interval, while a negative value indicates that the sales trough diverges outward from that interval. By integrating the gradient and divergence calculation results, and using the fluctuation trend, concentration, and fluctuation intensity of the time dimension as the core dimensions, the main direction of sales data fluctuation is extracted. For example, the main direction of product 002 is as follows: in the t=58 interval (14:30-14:45), the sales stress value shows a rapid increase and highly convergent fluctuation characteristic, with a settlement amount fluctuation intensity of 13.88 yuan / minute and an integral variable fluctuation intensity of 15.53 integrals / minute. This period is the core sales peak direction for this product. Through the above gradient and divergence calculations, the main direction of the stress tensor field is finally obtained.

[0108] Based on the obtained principal direction, principal values ​​are calculated for the stress tensor field. By solving for the eigenvalues ​​of the stress tensor field, compensation factors characterizing the principal mode of sales fluctuations are obtained. These compensation factors are then applied to adjust the inventory threshold and promotion triggering conditions for the next cycle. Specifically, this includes: principal value calculation of the stress tensor field, principal value... The core eigenvalues ​​of the stress tensor field in the principal directions reflect the core strength of sales fluctuations. The calculation formula is as follows: ,in, The time interval number corresponding to the main direction. =0.7 settlement amount weight, a core sales indicator. =0.3 integral variable weight, auxiliary sales indicator. =15 minutes, with the main value ranging from 0 to 2. The closer to 2, the more drastic the sales fluctuations and the higher the popularity; the closer to 0, the more gradual the fluctuations and the lower the popularity.

[0109] The compensation factor is derived based on principal values ​​and is used to quantify and adjust the inventory threshold and promotion trigger conditions for the next cycle. (Inventory threshold compensation factor) Calculation formula: Promotional trigger condition compensation factor Calculation formula: ,in, These are the core eigenvalues ​​of the stress tensor field along the principal directions. =0.5, the baseline principal value, corresponds to a stable sales situation. =0.8 fluctuation correction coefficient, equilibrium correction range >1. The inventory threshold for the next cycle needs to be increased to cope with rising sales. <1 needs to be reduced; <1. The threshold for triggering promotions needs to be lowered. >1 needs to be improved.

[0110] The compensation factor is applied to adjust the inventory threshold and promotion trigger conditions in the next cycle. Calculation formula: Example: Product 002, original inventory threshold =50 jin: =50 × 1.368 = 68.4 jin, rounded up to 69 jin;

[0111] Corrected promotion trigger amount Calculation formula: Example: Product 002, original promotional trigger amount =200 yuan: =200 × 0.632 = 126.4 yuan, rounded down to 126 yuan;

[0112] The revised inventory threshold of 69 jin ensures sufficient inventory during peak sales periods and avoids overselling; the revised promotion trigger amount of 126 yuan lowers the promotion threshold and stimulates sales in advance. The revised results are synchronized in real time to the memory areas of the online mini-program inventory service and the store's back-end inventory service, replacing the traditional fixed thresholds and conditions, and realizing dynamic adjustment based on sales fluctuations.

[0113] In this embodiment of the invention, based on parsing product identifiers, transaction timestamps, settlement amounts, and points variables from transaction logs, a sales data stress tensor field with products as the dimension and time as the order is dynamically constructed in memory. By calculating the gradient and divergence to analyze the principal direction and solving for feature values, a compensation factor characterizing the main mode of sales fluctuation is obtained. This compensation factor is then used to correct the inventory threshold and promotion triggering conditions for the next cycle. Therefore, this method overcomes the technical problems of traditional sales data analysis, such as lack of scientific mathematical modeling, inability to accurately identify the main mode of sales fluctuation, and fixed and rigid inventory thresholds and promotion strategies that are difficult to adaptively adjust. As a result, it achieves the technical effect of accurately quantifying sales fluctuation characteristics, realizing dynamic adaptive optimization of inventory and promotion strategies, and improving the intelligence and refinement of store operation management.

[0114] In a preferred embodiment of the present invention, based on the obtained principal direction, principal value calculation is performed on the stress tensor field. By solving the eigenvalues ​​of the stress tensor field, a compensation factor characterizing the principal mode of sales fluctuation is obtained. The obtained compensation factor is applied to the correction of the inventory threshold and promotion triggering conditions for the next period, including:

[0115] Based on the obtained principal direction, principal value calculation is performed on the stress tensor field. By solving the eigenvalues ​​of the stress tensor field, the initial compensation factor characterizing the principal mode of sales fluctuation is obtained. Specifically, this includes: extracting the core data corresponding to the determined principal direction. Taking product 002 fresh green vegetables as an example, the time interval corresponding to its principal direction is the 58th interval (14:30-14:45). The gradient value of the settlement amount in this interval is 13.88 yuan / minute, and the gradient value of the integral variable is 15.53 points / minute. At the same time, the rationality and consistency of the preset parameters are confirmed: the weight of the settlement amount is preset to 0.7, as a core sales indicator with a higher weight ratio, directly reflecting the core value of the commodity transaction; the weight of the integral variable is preset to 0.3, as an auxiliary sales indicator, to help reflect user consumption activity and sales popularity; and the time interval duration is uniformly 15 minutes.

[0116] The principal value is the core eigenvalue of the stress tensor field in the principal direction, directly reflecting the core intensity of sales fluctuations. The calculation process is broken down into three steps:

[0117] Calculate the product of the settlement amount gradient value and the settlement amount weight: 13.88 yuan / minute × 0.7 = 9.716;

[0118] Calculate the product of the gradient value of the integral variable and the weight of the integral variable: 15.53 integrals / minute × 0.3 = 4.659;

[0119] Sum the products of the two items above and divide by the duration of the time interval to get the principal value: (9.716 + 4.659) ÷ 15 = 14.375 ÷ 15 ≈ 0.96.

[0120] The initial compensation factor is used to accurately characterize the amplitude and trend of sales fluctuations. The calculation uses a benchmark principal value of 0.5, representing a stable sales state, as a reference. The principal value calculated above is subtracted from the benchmark principal value: 0.96 - 0.5 = 0.46. A positive initial compensation factor of 0.46 indicates that the sales activity of product 002 in the 58th interval (14:30-14:45) is on the rise. A negative initial compensation factor indicates a decline in sales activity; a zero value corresponds to a stable sales state. This value provides a precise quantitative basis for the generation of the correction coefficient.

[0121] The initial compensation factor is analyzed for its magnitude and direction of sign. Based on the analysis results, inventory correction coefficients are generated to adjust the inventory threshold and promotion correction coefficients to adjust the promotion trigger conditions. Specifically, for product 002, the initial compensation factor is 0.46. Combined with the retail operation logic, the corresponding adjustment needs are clarified: if sales are on the rise, the inventory threshold needs to be increased to ensure product supply, while the promotion trigger threshold is lowered to further stimulate sales growth; if the initial compensation factor is negative, the inventory threshold needs to be lowered to avoid product backlog, while the promotion trigger threshold is increased to control operating costs; if it is zero, the existing inventory and promotion parameters remain unchanged to maintain stable operation.

[0122] Combined with a preset fluctuation correction factor of 0.8, used to balance the adjustment range and avoid operational risks caused by excessive parameter adjustment, two types of correction factors are calculated separately:

[0123] The inventory adjustment factor is used to adjust the inventory threshold: it is calculated by adding 1 to the product of the initial compensation factor and the volatility adjustment factor, that is: 1 + (0.46 × 0.8) = 1 + 0.368 = 1.368;

[0124] The promotion correction factor is used to adjust the promotion trigger conditions: the calculation method is 1 minus the product of the initial compensation factor and the volatility correction factor, that is: 1-(0.46×0.8)=1-0.368=0.632.

[0125] The generated inventory correction coefficient of 1.368 is greater than 1, and the promotion correction coefficient of 0.632 is less than 1. This perfectly matches the fluctuation characteristics of the rising sales popularity of product 002, ensuring that the correction direction is accurately matched with the sales trend.

[0126] The inventory adjustment factor is applied to the current period's inventory threshold to obtain the adjusted inventory threshold for the next period. Similarly, the promotion adjustment factor is applied to the current period's promotion trigger conditions to obtain the adjusted promotion trigger conditions for the next period. Specifically, this involves using the inventory threshold of 50 jin (25 catties) for product 002 in the 58th interval of the current period (14:30-14:45) as a base, multiplying it by the inventory adjustment factor of 1.368 to complete the adjustment. The calculation process is: 50 × 1.368 = 68.4 jin (34.6 catties). Considering the actual business scenario of stocking fresh produce by the jin (50 catties), the calculation result is rounded up, ultimately determining the adjusted inventory threshold for this period in the next period to be 69 jin (34.5 catties), fully meeting sales requirements. To address inventory needs during periods of increased sales volume, the system aims to prevent overselling from the outset. Based on the promotional trigger amount of 200 yuan for product 002 in the current cycle's 58th interval (meaning a promotional activity is triggered when the cumulative settlement amount reaches 200 yuan within this period), an adjustment factor of 0.632 is applied. The calculation is: 200 × 0.632 = 126.4 yuan. Taking into account the accuracy requirements of actual transaction settlement amounts, the result is rounded down, ultimately determining the adjusted promotional trigger amount for the next cycle to be 126 yuan. By lowering the promotional trigger threshold, the system adapts to the operational needs of increased sales volume, improving the timeliness and effectiveness of promotional activities.

[0127] The revised inventory threshold and promotion trigger conditions for the next cycle are output to the inventory management service and promotion management service to guide the business operation in the next cycle. Specifically, the store management service cluster outputs the revised inventory threshold of 69 catties for the 58th interval of the next cycle for product 002 to the inventory management service in real time through the high-speed data pipeline of the in-memory computing framework. The transmission process adopts the direct memory transmission mode without disk transfer, completely avoiding the transmission delay problem caused by traditional disk storage. After receiving the parameter, the inventory management service immediately writes it into its own memory mirror area, replacing the original fixed 50-jin inventory threshold. This corrected threshold will serve as the core basis for locking and replenishing the product's inventory in the next cycle for that period, ensuring that inventory reserves are accurately matched with sales demand. The store management service cluster outputs the corrected promotion trigger amount of 126 yuan for product 002 in the 58th interval of the next cycle to the promotion management service in real time. After receiving the parameter, the promotion management service loads it into the memory running area and updates the promotion trigger judgment rule for the product: when the cumulative settlement amount of product 002 reaches 126 yuan during the period from 14:30 to 14:45 in the next cycle, the corresponding promotional activity, such as discounts, points doubles, etc., will be automatically triggered immediately.

[0128] The revised inventory thresholds and promotion trigger conditions are synchronized at the memory level across the entire chain through the above process, eliminating the need to wait for disk data writes and reads, ensuring the real-time and consistency of parameter updates. In the next business cycle, the smart sales terminal, online mini-program inventory service, and store back-end inventory service will all operate based on the revised parameters: inventory management will be based on the 69-jin threshold for stock preparation, locking, and replenishment; the transaction settlement process will automatically execute promotion rules based on a trigger amount of 126 yuan; and the online and offline inventory synchronization process will also be based on the revised inventory thresholds for consistent control, achieving intelligent and dynamic adaptation of retail operations and effectively improving store operational efficiency and user consumption experience.

[0129] In this embodiment of the invention, an initial compensation factor is obtained based on the characteristic value of the principal direction of the stress tensor field. Its numerical magnitude and positive / negative direction are analyzed to generate inventory correction coefficients and promotion correction coefficients. The two correction coefficients are applied to the inventory threshold and promotion triggering conditions of the current period to obtain the correction results for the next period. The corrected parameters are then output to the corresponding management service to guide business operations. This overcomes the technical problems of traditional sales data compensation factors being unable to be finely decomposed, inventory thresholds and promotion triggering conditions being difficult to quantify and correct, strategy adjustments lacking scientific basis, and poor integration with business management services. As a result, the technical effects of accurate application of compensation factors, adaptive and scientific optimization of inventory and promotion parameters are achieved, thereby improving the intelligence and precision of store operation management.

[0130] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0131] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0132] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An intelligent point of sale real-time transaction data processing system based on in-memory computing framework, characterized in that, include: The acquisition module is used to capture raw transaction data streams in real time through a collection array consisting of scanning modules, payment modules, and member sensing modules deployed in various smart sales terminals. The computing module, based on an in-memory computing framework, constructs a memory data association structure in the memory area corresponding to the physical location of the acquisition array, including: Based on the physical location identifier of each smart sales terminal, the first data object, the second data object, and the third data object are assigned to the scanning module, payment module, and membership sensing module of each terminal in the memory area. The three data objects generated in the same transaction are linked together through data lineage to form a memory data association structure corresponding to the physical location of the collection array. Parallel transaction processing is performed on the original transaction data stream carried by the memory data association structure. During the parallel transaction processing, the transaction frequency time series data of each smart sales terminal is collected in real time. The transaction frequency within the current time window is fitted by a cubic Bézier curve, and the inflection point of the Bézier curve is calculated. The points multiplier and inventory lock priority are dynamically adjusted according to the location and direction of the inflection point to obtain the processed transaction data of locked inventory identifier, points variable and settlement amount. The push module is used to synchronize processed transaction data to the online mini-program inventory service and the store back-end inventory service in real time, build a distributed inventory consistency state mapping based on memory mirroring, and push transaction logs to the store management service cluster in real time, including: Parse the locked inventory identifiers in the processed transaction data, and locate the corresponding product inventory records in the memory areas of the online mini-program inventory service and the store back-end inventory service, respectively, based on the identifiers. Based on the located product inventory records, an atomic memory operation is used to deduct the inventory quantity and update the version stamp of the inventory record to ensure data consistency under concurrent updates, thus obtaining the updated inventory quantity and version stamp. Based on the updated inventory quantity and version stamp, the memory image inventory status containing the current inventory snapshot is obtained, and the memory image inventory status is used as the memory image inventory status of the online mini program inventory service and the store back-end inventory service respectively. The processing module is used by the store management service cluster to dynamically construct a sales data stress tensor field in memory based on the received transaction logs. It then performs principal direction analysis and principal value calculation on the stress tensor field to obtain compensation factors representing the main modes of sales fluctuation. These compensation factors are used to correct the inventory threshold and promotion triggering conditions for the next cycle, including: Based on the pushed and received transaction logs, the store management service cluster parses the product identifier, transaction timestamp, settlement amount and points variables contained in each transaction log, and constructs a sales data stress tensor field in memory with the product as the dimension and time as the order. The principal direction of the stress tensor field of sales data is analyzed. By calculating the gradient and divergence of the stress tensor field, the main directional characteristics of the sales data fluctuation are extracted, and the principal direction of the stress tensor field is obtained.

2. The in-memory computing framework based intelligent POS real-time transaction data processing system as claimed in claim 1, wherein, A data acquisition array consisting of scanning modules, payment modules, and membership sensing modules deployed in various smart sales terminals captures raw transaction data streams in real time, including: The barcode scanning module scans the product barcode and generates product identification data and transaction trigger signal; the payment module collects payment method, payment account and transaction amount data; and the membership sensing module reads membership card information and generates membership identification data and points account status data. The product identification data, payment method and payment account data, transaction amount data, member identification data, and points account status data are fused together according to the timestamp of the transaction to form original transaction data with a unique identifier.

3. The real-time transaction data processing system for intelligent sales terminals based on a memory computing framework according to claim 2, characterized in that, Based on the memory computing framework, a memory data association structure corresponding to the physical location of the acquisition array is constructed in the memory area; Parallel transaction processing is performed on the original transaction data stream carried by the memory data association structure. During the parallel transaction processing, the transaction frequency time-series data of each smart sales terminal is collected in real time. The transaction frequency within the current time window is fitted using a cubic Bézier curve, and the inflection point of the Bézier curve is calculated, including: The original transaction data stream is loaded into the memory data association structure, and a parallel computing framework is used to perform transaction processing on the data objects of multiple transactions simultaneously. During the transaction processing, the number of transactions of each smart sales terminal within a continuous sliding time window is recorded in real time to generate transaction frequency time series data. For the time series data of transaction frequency within the current time window, four control points are selected to construct a cubic Bézier curve to fit the changing trend of transaction frequency. The inflection point of the curve is obtained by solving the point where the second derivative of the Bézier curve is zero.

4. The real-time transaction data processing system for intelligent sales terminals based on a memory computing framework according to claim 3, characterized in that, The points multiplier and inventory lock priority are dynamically adjusted based on the location and direction of the inflection point to obtain processed transaction data including locked inventory identifiers, points variables, and settlement amounts, including: The algorithm analyzes the inflection point information of the cubic Bézier curve within the current time window, including the time period position of the inflection point and the direction of its concavity / convexity. According to the preset adjustment strategy, if the inflection point is located in the first half of the time window and the direction of the inflection point is downward convex, the integration multiplier of subsequent transactions is increased and the priority of inventory locking is improved. If the inflection point is located in the second half of the time window and the direction of the inflection point is upward convex, the integration multiplier of transactions is decreased and the priority of inventory locking is reduced. If the inflection point is located in the first half of the time window and the direction of the inflection point is upward convex, the inflection point is located in the second half of the time window and the direction of the inflection point is downward convex, and the inflection point is located in the middle of the time window, the current integration multiplier and the priority of inventory locking remain unchanged, and the adjusted integration multiplier is obtained. The current transaction's point variable is calculated based on the adjusted point multiplier. The inventory lock operation is executed according to the adjusted inventory lock priority, and a locked inventory identifier is generated. At the same time, the settlement amount is generated by combining the transaction amount. Finally, the processed transaction data containing the locked inventory identifier, point variable, and settlement amount is output.

5. The real-time transaction data processing system for intelligent sales terminals based on a memory computing framework according to claim 4, characterized in that, Processed transaction data is synchronized in real time to the online mini-program inventory service and the store back-end inventory service, building a distributed inventory consistency state mapping based on memory mirroring. Simultaneously, transaction logs are pushed to the store management service cluster in real time, including: The processed transaction data, which includes locked inventory identifiers, points variables, and settlement amounts, will be pushed to the memory areas of the online mini-program inventory service and the store back-end inventory service, respectively, through the data pipeline provided by the in-memory computing framework. The online mini-program inventory service and the store back-end inventory service are based on the processed transaction data pushed to their respective memory areas. They perform atomic updates on the corresponding product inventory quantities according to the locked inventory identifiers, thereby forming a memory mirror inventory state in their respective memory areas that is decoupled from the physical inventory but logically consistent. The system compares the in-memory mirror inventory status of the same product in the online mini-program inventory service and the store back-end inventory service in real time to obtain the comparison results. Based on the comparison results, a two-way verification mechanism is established. When the inconsistency between the two states is detected, a traceability correction operation based on the lineage of in-memory data is triggered to build a distributed inventory consistency state mapping. Based on the processed transaction data pushed by the system, the complete execution process is encapsulated as a transaction log, and the transaction log is pushed in parallel to the store management service cluster through the real-time message bus of the in-memory computing framework.

6. The real-time transaction data processing system for intelligent sales terminals based on a memory computing framework according to claim 5, characterized in that, Based on the obtained principal direction, the principal value of the stress tensor field is calculated. By solving the eigenvalues ​​of the stress tensor field, the compensation factor characterizing the principal mode of sales fluctuation is obtained. The obtained compensation factor will be applied to adjust the inventory threshold and promotion trigger conditions for the next period, including: Based on the obtained principal direction, the principal value of the stress tensor field is calculated. By solving the eigenvalues ​​of the stress tensor field, the initial compensation factor characterizing the principal mode of sales fluctuation is obtained. The numerical value and positive / negative direction of the initial compensation factor are analyzed, and an inventory correction coefficient for adjusting the inventory threshold and a promotion correction coefficient for adjusting the promotion triggering conditions are generated based on the analysis results. Apply the inventory adjustment factor to the inventory threshold of the current period to obtain the adjusted inventory threshold for the next period; apply the promotion adjustment factor to the promotion trigger condition of the current period to obtain the adjusted promotion trigger condition for the next period. The revised inventory threshold and promotion trigger conditions for the next cycle are output to the inventory management service and promotion management service to guide the business operations in the next cycle.

7. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to perform the system as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, performs the system as described in any one of claims 1 to 6.