A cloud platform-based mall sales data storage method
By monitoring the number of online users and the growth rate of data flow on the cloud platform, and implementing tiered storage of sales data, the problems of database performance degradation and system lag caused by high-concurrency writes were solved, improving the stability and data integrity of the cloud platform and reducing resource waste.
Patent Information
- Application Number
- CN202510521401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-04-24
AI Technical Summary
In high-concurrency write scenarios, relational databases suffer from performance degradation and response latency issues, especially during peak periods of flash sales on e-commerce platforms, leading to database performance decline and system lag.
By monitoring the number of online users in real time on the cloud platform, setting traffic judgment zones, calculating the average growth rate of data flow and scheduling coefficient, and performing tiered storage of sales data, hot data is transferred to the memory database, warm data is transferred to the solid-state drive, and cold data is transferred to the large-capacity hard drive, avoiding frequent data transfer operations.
It improves the stability and data integrity of the cloud platform under high concurrency, reduces system resource waste, ensures the accuracy and reliability of e-commerce operation data, and avoids data corruption and system burden.
Smart Images

Figure CN120371837B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of data storage, and particularly relates to a mall sales data storage method based on a cloud platform. BACKGROUND
[0002] In current cloud platform sales businesses, order data is stored by using a relational database such as MySQL or PostgreSQL, and the order quantity and sales amount in a certain time period can be quickly queried by using an SQL statement, or the purchase history of a specific customer can be queried according to customer information.
[0003] A relational database organizes data in the form of a table, the table is composed of rows and columns, the row represents a record, and the column represents a field. Data is stored according to a predefined mode, and complex SQL queries, transaction processing and data integrity constraints are supported. The relational database has the characteristics of clear data structure, the data is stored in the form of a table, each table has fixed columns and rows, the structure is very clear and easy to understand, and the data is easy to understand and manage. Meanwhile, the relationship between tables is also clear, different tables can be associated through foreign keys, and the data is better managed and maintained.
[0004] In the prior art, since the relational database emphasizes strong consistency and strictly requires the ACID characteristics of transactions, each transaction operation needs to perform disk I / O, locking and log recording and the like, so that the write operation is relatively slow. For a high-concurrency write scenario, such as a peak period of a e-commerce platform's flash sale activity, a large number of write requests may cause the database performance to decrease obviously, and response delay or even system freezing may occur. The read operation is also affected to a certain extent, especially when a multi-table association query and a large data set filtering are involved, the database needs to spend more time on calculation and data extraction. Therefore, when data is stored, hierarchical processing needs to be performed in advance, so as to solve the problem that a large number of write requests in a short time cause the database performance to decrease and response delay or even system freezing, and therefore a mall sales data storage method based on a cloud platform is needed to solve the hierarchical problem of data. SUMMARY
[0005] The application aims to provide a mall sales data storage method based on a cloud platform, which solves the above technical problems.
[0006] The application can be achieved by the following technical solutions.
[0007] A mall sales data storage method based on a cloud platform, comprising the following steps:
[0008] S1: acquiring the number N of online users in the cloud platform from the current time at a preset detection period T, if the number N of online users is greater than a preset number threshold N maxThe period is marked as a crowded period;
[0009] If the number of continuous crowded periods C is greater than the preset number of judgment times C sta The corresponding crowded period is classified into a traffic judgment area;
[0010] S2: determine the crowded period in the traffic judgment area, mark it as a first period, obtain the byte number M of the data stream in the first period, and calculate the average speed of the data stream Wherein, M i represents the byte number of the i-th crowded period in the traffic judgment area;
[0011] The next detection period adjacent to the current detection period is marked as an ideal period, and the ideal byte number MX=ΔM+M of the data stream in the ideal period is calculated now Wherein, M now represents the byte number of the data stream in the current detection period
[0012] S3: obtain the total byte number M_sum of the data stream in the traffic judgment area and the number Y of read-write operations of the sales data by the cloud platform, calculate the operation ratio R=M_sum / Y, and calculate the ideal number YX=MX / R, wherein the read-write operation refers to the operation of reading and writing the sales data from the cloud platform storage space;
[0013] The scheduling coefficient of the sales data in the ideal period is calculated Wherein, λ represents a preset unit correction coefficient, and the sales data is stored in layers based on the scheduling coefficient D.
[0014] As a further scheme of the application: in the step S3, the process of storing the sales data in layers based on the scheduling coefficient D specifically includes:
[0015] If the scheduling coefficient D>γ1, the corresponding sales data is marked as hot data, the hot data represents the sales data frequently accessed and processed in recent period, and the hot data is transferred from the original storage address to the memory database of the cloud platform;
[0016] If the scheduling coefficient γ2
[0017] If the scheduling coefficient D<γ2, the corresponding sales data is marked as cold data, the cold data represents the sales data with low access frequency and low importance, and the cold data is transferred from the original storage address to the large-capacity hard disk storage of the cloud platform;
[0018] Wherein, gamma 1 is a preset first judging coefficient, gamma 2 is a preset second judging coefficient, and gamma 2 < D <= gamma 1.
[0019] As a further scheme of the present application, the calculation method of the detection period T in the step S1 specifically comprises:
[0020] acquiring the current time point T now , when the cumulative number of users logging into the cloud platform is equal to the number threshold N max , acquiring the time point T end at this time, calculating the duration AT = T end -T now , repeating the step of calculating the duration and calculating the average duration T ave , and setting the detection period T = T ave .
[0021] As a further scheme of the present application, in the step S1, the online duration TC of the user is acquired, and if the online duration TC is less than the preset minimum duration TC min , the number N of online users is not counted.
[0022] As a further scheme of the present application, in the step S2, if the average increase rate AM of the data flow is less than 0 and M now < delta, the hierarchical storage of the sales data is stopped, wherein delta is a preset optimal throughput of the cloud platform.
[0023] As a further scheme of the present application, in the step S1, if there is no flow judgment area, the subsequent steps are stopped.
[0024] As a further scheme of the present application, in the step S3, the calculation method of the number Mx of bytes consumed by the cloud platform in the read-write operation of the sales data specifically comprises:
[0025] acquiring the number M1, M2 and M3 of bytes consumed by the cloud platform in the read-write operation of the transaction data, the customer data and the commodity data, and calculating the number Mx = M1+M2+M3 of bytes.
[0026] As a further scheme of the present application, in the step S3, if the storage space of the memory database of the cloud platform has been consumed, the hierarchical storage of the sales data is stopped, and a warning prompt is sent.
[0027] The present application has the following beneficial effects: in the technical scheme of the present application, the number of online users in the cloud platform is accurately acquired according to the preset detection period, the system resources are reasonably utilized under the premise of ensuring the accuracy of data, and various problems caused by too frequent or sparse detection are avoided.
[0028] And in actual use, special attention needs to be paid to the fact that the mall of the cloud platform has certain traffic impact resistance ability. As the core carrier of numerous business activities and user interactions, the cloud platform faces various traffic challenges. Especially for the mall of the cloud platform, its business characteristics determine that it must be able to withstand a certain degree of traffic fluctuation. The architecture design of the cloud platform mall adopts advanced distributed systems, load balancing technology, and powerful server clusters and other means. These technologies work together to enable the mall to remain relatively stable in operation when facing high data traffic impact in a short time. For example, when a large number of users simultaneously access the mall page, conduct product queries or order operations, the distributed system can disperse the request to multiple server nodes for processing, and the load balancing technology will dynamically allocate tasks according to the load of each node to ensure that no node is overloaded. The powerful server cluster provides sufficient computing resources and storage capacity to cope with sudden traffic peaks.
[0029] Therefore, in actual operation, short-term high data traffic impact does not easily cause serious impact on the smoothness and stability of the entire cloud platform system. Based on this feature, for the case of short-term traffic impact, the present application proposes an optimized processing strategy - sales data can not be transferred.
[0030] There are two main considerations for making such a design. On the one hand, frequent transfer of sales data poses a significant risk of data corruption. Sales data, as one of the core data of the mall operation, its integrity and accuracy are of great significance to the decision-making, inventory management and customer service of the business. Each data transfer operation involves multiple steps such as data reading, writing and transmission, and any error in any of these steps can cause data loss, tampering or inconsistency. Moreover, under high-concurrency traffic impact, frequent data transfer operations are more likely to cause various potential failures and abnormalities, further increasing the risk of data corruption.
[0031] On the other hand, frequent transfer of sales data is a waste of system resources. In the cloud platform system, resource allocation and use need to be carefully planned and managed. Each data transfer requires certain network bandwidth, storage space, and CPU and memory computing resources. When facing high traffic impact in a short time, if sales data transfer is also frequently performed, it will undoubtedly put a heavy burden on the system, leading to system resource shortage and waste. This not only affects the efficiency of other normal business operations, but also may cause unnecessary equipment damage.
[0032] First, the pressure faced by a cloud platform is significantly proportional to the number of online users. This means that as the number of online users increases, the number of requests the cloud platform needs to process, the tasks it needs to execute, and the amount of data it needs to transmit will also increase accordingly, thus putting greater pressure on the platform's computing resources, storage resources, and network bandwidth. Therefore, real-time monitoring or periodic statistics on the number of online users can provide important information for roughly judging the current pressure status of the cloud platform.
[0033] It's important to note that cloud platforms themselves do not generate large amounts of data streams arbitrarily during normal operation. Data streams primarily originate from user interactions with the cloud platform, such as logging in, browsing pages, uploading or downloading files, and conducting online transactions. Significant data surges only occur when users are actively using the cloud platform. Therefore, when analyzing cloud platform traffic pressure, it's crucial to focus on the key indicator of the number of online users to identify periods where congestion may occur.
[0034] Furthermore, making decisions to adjust the location of sales data storage based solely on a single congestion cycle is not prudent. This is because cloud platforms possess a certain degree of traffic resilience, capable of handling short-term traffic fluctuations without causing serious performance issues. Therefore, to more accurately determine whether traffic conditions have reached the threshold requiring adjustment, consecutive congestion cycles should be selected as the traffic assessment area.
[0035] The purpose of setting up a traffic assessment zone is based on the cloud platform's ability to withstand certain traffic congestion. By comprehensively considering multiple consecutive congestion cycles, a more complete understanding of traffic trends and their impact on the cloud platform can be obtained. After determining the traffic assessment zone, the average growth rate of data flow within that zone can be accurately calculated. This average growth rate reflects the speed of traffic growth within a specific time period, providing strong support for predicting future traffic trends.
[0036] Based on the average growth rate of the data flow within the traffic assessment zone, the next detection cycle can be predicted, thereby calculating the ideal number of bytes for the data flow in the next detection cycle. After obtaining the ideal number of bytes for the data flow in the next detection cycle, further in-depth analysis and processing are required. This includes comparing the prediction results with the actual carrying capacity of the cloud platform, assessing whether the storage location of the sales data needs to be adjusted, and the extent and method of such adjustment. Only through this series of analytical processes can a more scientific and reasonable next step be made, ensuring the stable operation of the cloud platform and the security and reliability of the data.
[0037] By studying the total number of bytes in the data flow within a given area, we can gain insight into the scale and rate of data flow, thus providing a solid foundation for predicting data flow in the next monitoring cycle. Furthermore, by combining this information with the actual number of read and write operations performed on sales data by the cloud platform previously, we can further understand the platform's efficiency and load capacity when processing this type of data.
[0038] After determining the ideal number of read / write operations the cloud platform will perform on sales data within the next monitoring cycle, a scheduling coefficient for each sales data point is calculated using a formula. As the number of read / write operations increases or the ideal number of bytes in the data stream rises, the scheduling coefficient also increases accordingly, thus more accurately reflecting the importance and priority of sales data within the cloud platform. Incorporating the monitoring cycle as the denominator into the formula avoids errors caused by excessively long monitoring cycles, making the calculation of the scheduling coefficient more precise and reasonable.
[0039] In summary, this invention proposes a cloud platform-based method for storing e-commerce sales data to address the issue of data layering. By storing sales data in layers, it solves the problem of database performance degradation, response delays, and even system lag caused by a large number of write requests occurring in a short period of time. Attached Figure Description
[0040] The invention will now be further described with reference to the accompanying drawings.
[0041] Figure 1 This is a flowchart illustrating a cloud-based method for storing sales data in an online marketplace according to the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Please see Figure 1 As shown, this invention is a method for storing e-commerce sales data based on a cloud platform, comprising the following steps:
[0044] S1: Starting from the current moment, obtain the number N of online users in the cloud platform at a preset detection period T. If the number N of online users is greater than the preset threshold N... max This is then marked as a congestion cycle;
[0045] If the number of consecutive occurrences of the congestion cycle C is greater than the preset number of judgments C sta The corresponding congestion period is classified into the flow judgment area;
[0046] S2: Determine the congestion period within the traffic judgment area, denoted as the first period, obtain the number of bytes M of the data stream within the first period, and calculate the average growth rate of the data stream. , of which M i This represents the number of bytes in the i-th congestion cycle within the traffic judgment area;
[0047] Let the next detection period adjacent to the current detection period be the ideal period, and calculate the ideal number of bytes in the data stream within the ideal period: MX = ΔM + M now , of which M now The number of bytes in the data stream representing the current detection cycle.
[0048] S3: Obtain the total number of bytes M_sum of the data stream in the traffic judgment area and the number of times Y is performed by the cloud platform to read and write sales data, calculate the operation ratio R=M_sum / Y, and calculate the ideal number of times YX=MX / R, wherein the read and write operation refers to the operation of reading and writing sales data from the cloud platform storage space;
[0049] Calculate the scheduling coefficient of sales data within the ideal period. , where λ represents the preset unit correction coefficient, and sales data is stored in layers based on the scheduling coefficient D.
[0050] It should be noted that the system will first accurately determine the number of online users on the cloud platform according to a preset detection cycle. While ensuring data accuracy, the system will make reasonable use of resources to avoid various problems caused by overly frequent or sparse detections.
[0051] Furthermore, in practical use, it is crucial to pay special attention to the cloud platform's ability to withstand traffic surges. As the core carrier of numerous commercial activities and user interactions, the cloud platform faces various traffic challenges. This is especially true for cloud platform e-commerce, whose business characteristics dictate that it must be able to withstand a certain degree of traffic fluctuation. The cloud platform e-commerce architecture employs advanced distributed systems, load balancing technology, and powerful server clusters. These technologies work together to ensure the e-commerce maintains relatively stable operation even when faced with high data traffic surges in a short period. For example, when a large number of users simultaneously access the e-commerce page, search for products, or place orders, the distributed system can distribute requests across multiple server nodes for processing, while load balancing technology dynamically allocates tasks based on the load of each node, ensuring that no node is overloaded. The powerful server cluster provides ample computing resources and storage capacity to cope with sudden traffic spikes.
[0052] Therefore, in actual operation, a short-term surge in data traffic will not easily and seriously affect the smoothness and stability of the entire cloud platform system. Based on this characteristic, this invention proposes an optimized processing strategy for short-term traffic surges—avoiding the transfer of sales data.
[0053] This design was chosen primarily for two reasons. First, frequent data transfers pose a significant risk, potentially leading to data corruption. Sales data is a core component of e-commerce operations, and its integrity and accuracy are crucial for merchants' decision-making, inventory management, and customer service. Each data transfer operation involves multiple steps, including reading, writing, and transmitting data; errors in any of these steps can result in data loss, tampering, or inconsistencies. Furthermore, under high-concurrency traffic, frequent data transfers are more prone to triggering various potential malfunctions and anomalies, further increasing the risk of data corruption.
[0054] On the other hand, frequently transferring sales data is a waste of system resources. In cloud platform systems, resource allocation and usage require careful planning and management. Each data transfer consumes network bandwidth, storage space, and computing resources such as CPU and memory. Facing short-term surges in traffic, frequent sales data transfers will undoubtedly place a huge burden on the system, leading to resource strain and waste. This will not only affect the efficiency of other normal business operations but may also cause unnecessary equipment damage.
[0055] First, the pressure faced by a cloud platform is significantly proportional to the number of online users. This means that as the number of online users increases, the number of requests the cloud platform needs to process, the tasks it needs to execute, and the amount of data it needs to transmit will also increase accordingly, thus putting greater pressure on the platform's computing resources, storage resources, and network bandwidth. Therefore, real-time monitoring or periodic statistics on the number of online users can provide important information for roughly judging the current pressure status of the cloud platform.
[0056] It's important to note that cloud platforms themselves do not generate large amounts of data streams arbitrarily during normal operation. Data streams primarily originate from user interactions with the cloud platform, such as logging in, browsing pages, uploading or downloading files, and conducting online transactions. Significant data surges only occur when users are actively using the cloud platform. Therefore, when analyzing cloud platform traffic pressure, it's crucial to focus on the key indicator of the number of online users to identify periods where congestion may occur.
[0057] Furthermore, making decisions to adjust the location of sales data storage based solely on a single congestion period is not prudent. This is because cloud platforms possess a certain degree of traffic resilience, capable of handling short-term traffic fluctuations without causing serious performance issues. Therefore, to more accurately determine whether traffic conditions have reached the threshold requiring adjustment, it is necessary to select consecutive congestion periods as the traffic judgment area.
[0058] The purpose of setting up a traffic assessment zone is based on the cloud platform's ability to withstand certain traffic congestion. By comprehensively considering multiple consecutive congestion cycles, a more complete understanding of traffic trends and their impact on the cloud platform can be obtained. After determining the traffic assessment zone, the average growth rate of data flow within that zone can be accurately calculated. This average growth rate reflects the speed of traffic growth within a specific time period, providing strong support for predicting future traffic trends.
[0059] Based on the average growth rate of the data flow within the traffic assessment zone, the next detection cycle can be predicted, thereby calculating the ideal number of bytes for the data flow in the next detection cycle. After obtaining the ideal number of bytes for the data flow in the next detection cycle, further in-depth analysis and processing are required. This includes comparing the prediction results with the actual carrying capacity of the cloud platform, assessing whether the storage location of the sales data needs to be adjusted, and the extent and method of such adjustment. Only through this series of analytical processes can a more scientific and reasonable next step be made, ensuring the stable operation of the cloud platform and the security and reliability of the data.
[0060] By studying the total number of bytes in the data flow within a given area, we can gain insight into the scale and rate of data flow, thus providing a solid foundation for predicting data flow in the next monitoring cycle. Furthermore, by combining this information with the actual number of read and write operations performed on sales data by the cloud platform previously, we can further understand the platform's efficiency and load capacity when processing this type of data.
[0061] After determining the ideal number of read / write operations the cloud platform will perform on sales data within the next monitoring cycle, a scheduling coefficient for each sales data point is calculated using a formula. As the number of read / write operations increases or the ideal number of bytes in the data stream rises, the scheduling coefficient also increases accordingly, thus more accurately reflecting the importance and priority of sales data within the cloud platform. Incorporating the monitoring cycle as the denominator into the formula avoids errors caused by excessively long monitoring cycles, making the calculation of the scheduling coefficient more precise and reasonable.
[0062] In another preferred embodiment of the present invention, the process of hierarchically storing sales data based on the scheduling coefficient D specifically includes:
[0063] If the scheduling coefficient D > γ1, the corresponding sales data will be marked as hot data. Hot data represents sales data that has been frequently accessed and processed recently. The hot data will be transferred from the original storage address to the in-memory database of the cloud platform.
[0064] If the scheduling coefficient γ2<D≤γ1, the corresponding sales data will be marked as warm data. Warm data represents sales data that is not frequently accessed but is relatively important. The warm data will be transferred from the original storage address to the solid-state drive storage of the cloud platform.
[0065] If the scheduling coefficient D < γ2, the corresponding sales data will be marked as cold data. Cold data represents sales data with low access frequency and low importance. The cold data will be transferred from the original storage address to the large-capacity hard disk storage of the cloud platform.
[0066] Wherein, γ1 is the preset first judgment coefficient, γ2 is the preset second judgment coefficient, and γ2<D≤γ1.
[0067] It is worth noting that sales data is stored in layers according to the scheduling coefficient D, with data accessed more frequently stored in faster memory.
[0068] In another preferred embodiment of the present invention, the method for calculating the detection period T specifically includes:
[0069] Get the current time point T now When the cumulative number of users logging into the cloud platform equals the threshold number N max Get the current time point T end Calculate the duration ΔT=T end -T now Repeat the steps to calculate the duration and calculate the mean of the duration T. ave Let the detection period T = T ave .
[0070] Understandably, the detection cycle value obtained through this method is relatively accurate, which can improve the accuracy of subsequent tiered storage of sales data.
[0071] In another preferred embodiment of the present invention, the user's online time TC is obtained, and if the online time TC is less than a preset minimum time TC... min If the number of users is N, then it will not be included in the count of online users.
[0072] It should be noted that when a user's online time (TC) is less than the preset minimum online time (TC), min This means that the user may have only briefly accessed the cloud platform and has not yet generated any effective business interaction or data traffic. Therefore, to ensure the accuracy and validity of the online user count, we do not include such users in the total number of online users N.
[0073] In another preferred embodiment of the present invention, if the average growth rate of the data stream ΔM < 0 and M now <δ, stop tiered storage of sales data, where δ is the preset optimal throughput of the cloud platform.
[0074] It should be noted that when the average growth rate of the data stream ΔM < 0 and M now When the value is less than δ, it indicates that the cloud platform is under relatively low access pressure, and there is no need to spend extra manpower and resources to re-store the already stored sales data in layers.
[0075] In another preferred embodiment of the present invention, if there is no traffic determination area, the subsequent steps are stopped.
[0076] Understandably, making decisions to adjust the location of sales data storage based solely on a single congestion period is not a sound approach. This is because cloud platforms possess a certain degree of traffic resilience, capable of handling short-term traffic fluctuations without causing serious performance issues. Therefore, to more accurately determine whether traffic conditions have reached the threshold requiring adjustment, it is necessary to select consecutive congestion periods as the traffic assessment area.
[0077] In another preferred embodiment of the present invention, the method for calculating the number of bytes Mx consumed by the cloud platform in reading and writing sales data specifically includes:
[0078] Obtain the number of bytes M1, M2, and M3 consumed by the cloud platform in reading and writing transaction data, customer data, and product data, and calculate the number of bytes Mx = M1 + M2 + M3.
[0079] It is worth noting that detailed calculations are required for each different data point to enhance accuracy.
[0080] In another preferred embodiment of the present invention, if the storage space of the cloud platform's memory database has been exhausted, the tiered storage of sales data will be stopped and an early warning will be sent.
[0081] It is worth noting that if the cloud platform's in-memory database gradually exhausts its pre-allocated storage space after a long period of data accumulation, business growth, and various complex operations, the stability of the entire system and the efficiency of data management will face severe challenges. Therefore, it is necessary to stop the tiered operation and remind staff to handle it in a timely manner.
[0082] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for storing e-commerce sales data based on a cloud platform, characterized in that, Includes the following steps: S1: Starting from the current moment, obtain the number N of online users in the cloud platform at a preset detection period T. If the number N of online users is greater than the preset threshold N... max This is then marked as a congestion cycle; If the number of consecutive occurrences of the congestion cycle C is greater than the preset number of judgments C sta The corresponding congestion period is classified into the flow judgment area; S2: Determine the congestion period within the traffic judgment area, denoted as the first period, obtain the number of bytes M of the data stream within the first period, and calculate the average growth rate of the data stream. , of which M i This represents the number of bytes in the i-th congestion cycle within the traffic judgment area; Let the next detection period adjacent to the current detection period be the ideal period, and calculate the ideal number of bytes in the data stream within the ideal period: MX = ΔM + M now , of which M now The number of bytes in the data stream representing the current detection cycle; S3: Obtain the total number of bytes M_sum of the data stream in the traffic judgment area and the number of times Y is performed by the cloud platform to read and write sales data, calculate the operation ratio R=M_sum / Y, and calculate the ideal number of times YX=MX / R, wherein the read and write operation refers to the operation of reading and writing sales data from the cloud platform storage space; Calculate the scheduling coefficient of sales data within the ideal period. Where λ represents the preset unit correction coefficient, the process of hierarchically storing sales data based on the scheduling coefficient D specifically includes: If the scheduling coefficient D > γ1, the corresponding sales data will be marked as hot data. Hot data represents sales data that has been frequently accessed and processed recently. The hot data will be transferred from the original storage address to the in-memory database of the cloud platform. If the scheduling coefficient γ2<D≤γ1, the corresponding sales data will be marked as warm data. Warm data represents sales data that is not frequently accessed but is relatively important. The warm data will be transferred from the original storage address to the solid-state drive storage of the cloud platform. If the scheduling coefficient D < γ2, the corresponding sales data will be marked as cold data. Cold data represents sales data with low access frequency and low importance. The cold data will be transferred from the original storage address to the large-capacity hard disk storage of the cloud platform. Wherein, γ1 is the preset first judgment coefficient, γ2 is the preset second judgment coefficient, and γ2<D≤γ1.
2. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, In step S1, the method for calculating the detection period T specifically includes: Get the current time point T now When the cumulative number of users logging into the cloud platform equals the threshold number N max Get the current time point T end Calculate the duration ΔT=T end -T now Repeat the steps to calculate the duration and calculate the mean of the duration T. ave Let the detection period T = T ave .
3. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, In step S1, the user's online time TC is obtained. If the online time TC is less than the preset minimum time TC... min If the number of users is N, then it will not be included in the count of online users.
4. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, In step S2, if the average growth rate of the data stream ΔM < 0 and M now <δ, stop tiered storage of sales data, where δ is the preset optimal throughput of the cloud platform.
5. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, If there is no flow determination area in step S1, then the subsequent steps are stopped.
6. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, In step S3, the method for calculating the number of bytes Mx consumed by the cloud platform in reading and writing sales data specifically includes: The sales data includes transaction data, customer data, and product data. The number of bytes consumed by the cloud platform in sequentially reading and writing transaction data, customer data, and product data is obtained as M1, M2, and M3, respectively. The number of bytes is calculated as Mx = M1 + M2 + M3.
7. The method for storing e-commerce sales data based on a cloud platform according to claim 1, characterized in that, In step S3, if the storage space of the cloud platform's memory database has been exhausted, the tiered storage of sales data will be stopped, and an early warning will be sent.
Citation Information
Patent Citations
Data storage method and device
CN113778318A
Data storage method, apparatus and computing device
WO2024187922A1