Shopping mall sales data storage method based on cloud platform
By monitoring the number of online users and data flow growth on the cloud platform and storing sales data in layers, the database performance degradation caused by high concurrent writes is solved, and system stability and data security are improved.
Patent Information
- Application Number
- CN202510521401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-24
AI Technical Summary
In the prior art, the performance of relational databases deteriorates when they are highly concurrent write requests, resulting in response delays and system lags, especially during peak periods of flash sale activities on e-commerce platforms, read operations are also affected.
By monitoring the number of online users in real time on the cloud platform, setting traffic judgment zones, calculating the average growth rate and scheduling coefficient of data flow, storing sales data in layers, hot data is stored in memory databases, warm data is stored in solid-state hard disks, and cold data is stored in large-capacity hard disks.
It improves the stability and data integrity of the cloud platform under high traffic shocks, avoids data corruption and resource waste caused by frequent transfers, and ensures efficient operation of the system.
Smart Images

Figure CN120371837A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and particularly to a method for storing mall sales data based on a cloud platform. Background Art
[0002] In current cloud platform sales operations, relational databases such as MySQL or PostgreSQL are used to store order data. Through SQL statements, it is possible to quickly query the order volume and sales amount within a certain time period, or query the purchase history of a specific customer based on customer information, etc.
[0003] Relational databases organize data in the form of tables. A table consists of rows and columns. Rows represent records, and columns represent fields. Data is stored according to a predefined schema, supporting complex SQL queries, transaction processing, and data integrity constraints. Its characteristics are that the data structure is clear, data is stored in the form of tables, each table has fixed columns and rows, this structure is very clear and easy to understand, facilitating understanding and management. At the same time, the relationships between tables are also clear. Different tables can be associated through foreign keys to better manage and maintain data.
[0004] In the prior art, due to the emphasis on strong consistency in relational databases and strict requirements for the ACID characteristics of transactions, each transaction operation requires disk I / O, locking, and logging operations, resulting in relatively slow write operations. For high-concurrency write scenarios, such as the peak period of flash sales activities on e-commerce platforms, a large number of write requests may cause a significant decline in database performance, resulting in response delays or even system freezes. Read operations are also affected to a certain extent during complex queries, especially when involving multi-table join queries and large dataset filtering. The database needs to spend more time for calculation and data extraction. Therefore, hierarchical processing needs to be carried out in advance when storing data to solve the situation where a large number of write requests within a short period of time lead to a decline in database performance, response delays, or even system freezes. So, a method for storing mall sales data based on a cloud platform is needed to solve the data hierarchical problem. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for storing mall sales data based on a cloud platform to solve the above technical problems.
[0006] The purpose of the present invention can be achieved through the following technical solutions: A method for storing mall sales data based on a cloud platform 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 quantity threshold N max then mark it as a crowded period; If the continuous occurrence count C of the congestion period is greater than the preset judgment count C sta , classify the corresponding congestion period into the traffic judgment area; S2: Determine the congestion periods 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 , where M i represents the number of bytes of the i-th congestion period within the traffic judgment area; Denote the next detection period adjacent to the current detection period as the ideal period, and calculate the ideal number of bytes MX = ΔM + M of the data stream within the ideal period now , where M now represents the number of bytes of the data stream in the current detection period S3: Obtain the total number of bytes M_sum of the data stream within the traffic judgment area and the number of times Y that the cloud platform reads and writes sales data, calculate the operation ratio R = M_sum / Y, and calculate the ideal number of times YX = MX / R, where the read and write operations refer to the operations of reading and writing sales data from the cloud platform storage space; Calculate the scheduling coefficient of the sales data within the ideal period , where λ represents a preset unit correction coefficient, and perform hierarchical storage of the sales data based on the scheduling coefficient D.
[0007] As a further solution of the present invention: In the step S3, the process of performing hierarchical storage of the sales data based on the scheduling coefficient D specifically includes: If the scheduling coefficient D > γ1, mark the corresponding sales data as hot data, where hot data represents sales data that has been frequently accessed and processed recently, and transfer the hot data from the original storage address to the in-memory database of the cloud platform; If the scheduling coefficient γ2 < D ≤ γ1, mark the corresponding sales data as warm data, where warm data represents sales data that has not been frequently accessed but is relatively important, and transfer the warm data from the original storage address to the solid-state drive storage of the cloud platform; If the scheduling coefficient D < γ2, mark the corresponding sales data as cold data, where cold data represents sales data with a low access frequency and low importance, and transfer the cold data from the original storage address to the large-capacity hard disk storage of the cloud platform; Among them, γ1 is a preset first judgment coefficient, γ2 is a preset second judgment coefficient, and γ2 < D ≤ γ1.
[0008] As a further solution of the present invention: In the step S1, the calculation method of the detection period T specifically includes: Obtain the current time point T now , when the cumulative number of users logged in to the cloud platform is equal to the quantity threshold N maxObtain the time point T at this time end , calculate the duration ΔT = T end - T now , repeat the step of calculating the duration and calculate the average value T of the duration ave , let the detection period T = T ave .
[0009] As a further solution of the present invention: in the step S1, obtain the online duration TC of the user. If the online duration TC is less than the preset minimum duration TC min , then it is not included in the number N of online users
[0010] As a further solution of the present invention: in the step S2, if the average growth rate ΔM of the data stream < 0 and M now < δ, stop the hierarchical storage of the sales data, where δ is the optimal throughput of the preset cloud platform
[0011] As a further solution of the present invention: in the step S1, if there is no traffic judgment area, stop the subsequent steps
[0012] As a further solution of the present invention: in the step S3, the calculation method of the number of bytes Mx consumed by the cloud platform for reading and writing the sales data specifically includes: Obtain the number of bytes M1, M2, and M3 consumed by the cloud platform for reading and writing transaction data, customer data, and commodity data, and calculate the number of bytes Mx = M1 + M2 + M3
[0013] As a further solution of the present invention: in the step S3, if the storage space of the in-memory database of the cloud platform has been consumed, stop the hierarchical storage of the sales data and send a warning message
[0014] The beneficial effects of the present invention: in the technical solution involved in the present invention, first, the number of online users in the cloud platform is accurately obtained according to the preset detection period. On the premise of ensuring data accuracy, the system resources are reasonably utilized to avoid various problems caused by overly frequent or sparse detections
[0015] And during the actual use process, it is necessary to pay special attention to the fact that the mall on the cloud platform has a certain ability to resist traffic shocks. As the core carrier of numerous commercial activities and user interactions, the cloud platform faces various traffic challenges. Especially for the mall on the cloud platform, its business characteristics determine that it must be able to withstand a certain degree of traffic fluctuations. The architecture design of the cloud platform mall adopts advanced distributed systems, load balancing technologies, and powerful server clusters and other means. These technologies work together, enabling the mall to remain relatively stable when facing a high data traffic shock in a short period. For example, when a large number of users access the mall page, query products, or place orders simultaneously, the distributed system can disperse the requests to multiple server nodes for processing, and the load balancing technology will dynamically allocate tasks according to the load conditions of each node to ensure that no node is overloaded. The powerful server cluster provides sufficient computing resources and storage capabilities to handle sudden traffic peaks.
[0016] Therefore, during actual operation, a high data traffic shock within a short period will not easily have a serious impact on the fluency and stability of the entire cloud platform system. Based on this characteristic, for the traffic shock situation within a short period, the present invention proposes an optimized processing strategy - it is not necessary to transfer and store the sales data.
[0017] There are mainly two considerations for such a design. On the one hand, there are relatively large risks in frequently transferring and storing the sales data, which is likely to cause damage to the sales data. As one of the core data for mall operation, the integrity and accuracy of the sales data are of crucial significance for aspects such as merchants' decision-making, inventory management, and customer service. Each data transfer and storage operation involves multiple links such as data reading, writing, and transmission. Any error in any link may lead to problems such as data loss, tampering, or inconsistency. Moreover, under the high-concurrency traffic shock, frequent data transfer and storage operations are more likely to trigger various potential faults and anomalies, further increasing the risk of data damage.
[0018] On the other hand, frequently transferring and storing the sales data is too wasteful of system resources. In the cloud platform system, the allocation and use of resources need to be carefully planned and managed. Each data transfer and storage requires a certain amount of network bandwidth, storage space, and computing resources such as CPU and memory. When facing a high traffic shock within a short period, if the sales data is frequently transferred and stored, it will undoubtedly impose a huge burden on the system, resulting in the tension and waste of system resources. This will not only affect the operation efficiency of other normal businesses but also may cause unnecessary equipment wear and tear.
[0019] First of all, the pressure faced by the cloud platform shows a significant positive correlation with the number of online users. This means that as the number of online users increases, the requests to be processed by the cloud platform, the tasks to be executed, and the amount of data to be transmitted will all increase accordingly, thereby exerting greater pressure on the platform's computing resources, storage resources, network bandwidth, etc. Therefore, by monitoring in real time or statistically counting the number of online users regularly, it can provide an important basis for roughly judging the current pressure situation of the cloud platform.
[0020] It is worth noting that when the cloud platform is operating normally, it will not generate a large amount of data streams without reason. The generation of data streams mainly stems from the interaction behaviors between users and the cloud platform, such as user logins, page browsing, file uploading or downloading, online transactions, and other operations. Only when users are using the cloud platform will there be a relatively large flow of data streams. Therefore, when analyzing the traffic pressure of the cloud platform, the key indicator of the number of online users can be focused on to screen out the periods that may be congested.
[0021] Furthermore, it is not very prudent to make a decision to adjust the storage location of sales data based solely on one congested period. This is because the cloud platform itself has a certain traffic resistance ability and can cope with a certain degree of traffic fluctuations in the short term without serious performance problems. Therefore, in order to more accurately judge whether the traffic situation has reached the threshold that requires adjustment, consecutive congested periods need to be selected as the traffic judgment area.
[0022] The purpose of setting the traffic judgment area is precisely based on the characteristic that the cloud platform has a certain traffic resistance ability. By comprehensively considering multiple consecutive congested periods, it is possible to more comprehensively understand the changing trend of traffic and its impact on the cloud platform. After determining the traffic judgment area, the average growth rate of the data stream within this area can be accurately calculated. This average growth rate reflects how fast the traffic grows within a specific time period and provides strong support for predicting the future development trend of traffic.
[0023] Based on the average growth rate of the data stream within the traffic judgment area, the next detection period can be predicted, and thus the ideal number of bytes of the data stream for the next detection period can be calculated. After obtaining the ideal number of bytes of the data stream for the next detection period, in-depth analysis and processing are still required. This includes comparing the prediction result with the actual carrying capacity of the cloud platform, evaluating whether the storage location of the sales data needs to be adjusted, as well as the extent and method of the adjustment. Through such a series of analysis and processing processes, a more scientific and reasonable next judgment can be made to ensure the stable operation of the cloud platform and the security and reliability of the data.
[0024] By studying the total number of bytes of data flow in the traffic judgment area, the scale and rate of data flow can be insightfully understood, thus providing a solid foundation for predicting the data traffic in the next detection cycle. At the same time, by combining the actual number of read and write operations on sales data by the cloud platform previously, the efficiency and load capacity of the platform in processing such data can be further understood.
[0025] After inferring the ideal number of read and write operations on sales data by the cloud platform in the next detection cycle, a formula is used to calculate the scheduling coefficient of each sales data. As the number of read and write operations increases or the ideal number of bytes of the data flow rises, the scheduling coefficient will also increase accordingly, thus more accurately reflecting the importance and priority of sales data in the cloud platform. Incorporating the detection cycle as the denominator into the formula avoids errors in the results caused by an overly long detection cycle setting, making the calculation of the scheduling coefficient more accurate and reasonable.
[0026] In summary, the present invention proposes a method for storing mall sales data based on a cloud platform to solve the problem of data stratification. By storing sales data in layers, it solves the situation where a large number of write requests in a short period of time lead to a decline in database performance, response latency, and even system jamming. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below with reference to the accompanying drawings.
[0028] Figure 1 is a schematic flowchart of a method for storing mall sales data based on a cloud platform according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0030] Please refer to Figure 1 As shown, the present invention is a method for storing mall sales data based on a cloud platform, including the following steps: S1: Starting from the current moment, obtain the number N of online users in the cloud platform with a preset detection cycle T. If the number N of online users is greater than the preset number threshold N max then it is marked as a congested period; If the consecutive occurrence times C of the congested period are greater than the preset judgment times C sta , the corresponding congested period is classified into the traffic 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 , where M i represents the number of bytes in the i-th congestion period within the traffic judgment area; Denote the next detection period adjacent to the current detection period as the ideal period, and calculate the ideal number of bytes MX = ΔM + M of the data stream within the ideal period now , where M now represents the number of bytes of the data stream in the current detection period S3: Obtain the total number of bytes M_sum of the data stream within the traffic judgment area and the number of times Y that the cloud platform reads and writes sales data, calculate the operation ratio R = M_sum / Y, and calculate the ideal number of times YX = MX / R, where the read and write operations refer to the operations of reading and writing sales data from the cloud platform storage space; Calculate the scheduling coefficient of the sales data within the ideal period , where λ represents a preset unit correction coefficient, and the sales data is hierarchically stored based on the scheduling coefficient D.
[0031] It should be noted that first, the number of online users in the cloud platform will be accurately obtained according to the preset detection period. On the premise of ensuring data accuracy, the system resources are reasonably utilized to avoid various problems caused by overly frequent or sparse detections.
[0032] And in the actual use process, it should be particularly noted that the mall of the cloud platform has a certain ability to resist traffic impact. As the core carrier of numerous commercial 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 fluctuations. The architecture design of the cloud platform mall adopts advanced distributed systems, load balancing technologies, and powerful server clusters and other means. These technologies work together to enable the mall to still maintain a relatively stable operating state when facing a high data traffic impact in a short period of time. For example, when a large number of users access the mall page, query products, or place orders simultaneously, the distributed system can disperse the requests to multiple server nodes for processing, and the load balancing technology will dynamically allocate tasks according to the load conditions of each node to ensure that each node will not be overloaded. The powerful server cluster provides sufficient computing resources and storage capabilities to cope with sudden traffic peaks.
[0033] Therefore, in actual operation, a high data flow impact in a short period of time will not easily cause a serious impact on the fluency and stability of the entire cloud platform system. Based on this feature, the present invention proposes an optimized processing strategy for the flow impact in a short period of time - sales data can be transferred without storage.
[0034] There are two main reasons for making such a design. On the one hand, there is a great risk of frequently transferring sales data, which can easily cause sales data corruption. As one of the core data of mall operations, the integrity and accuracy of sales data are of vital importance to merchants' decision-making, inventory management, and customer service. Each data transfer operation involves multiple links such as data reading, writing, and transmission. Errors in any link may lead to data loss, tampering, or inconsistency. Moreover, under the impact of high concurrent traffic, frequent data transfer operations are more likely to cause various potential failures and anomalies, further increasing the risk of data corruption.
[0035] On the other hand, frequent transfer of sales data is a waste of system resources. In the cloud platform system, the allocation and use of resources need to be carefully planned and managed. Each data transfer requires a certain amount of network bandwidth, storage space, and computing resources such as CPU and memory. When faced with a high traffic impact in a short period of time, if sales data needs to be transferred frequently, it will undoubtedly bring a huge burden to the system, resulting in tension and waste of system resources. This will not only affect the operating efficiency of other normal businesses, but may also cause unnecessary equipment loss.
[0036] First, the pressure faced by the cloud platform is significantly proportional to the number of online users. This means that as the number of online users increases, the requests that the cloud platform needs to process, the tasks that it performs, and the amount of data that it transmits will increase accordingly, which will in turn put greater pressure on the platform's computing resources, storage resources, and network bandwidth. Therefore, real-time monitoring or regular statistics of the number of online users can provide an important basis for roughly judging the current pressure status of the cloud platform.
[0037] It is worth noting that the cloud platform itself does not generate a large amount of data flow for no reason when it is operating normally. The generation of data flow mainly comes from the interaction between users and the cloud platform, such as user login, page browsing, file uploading or downloading, online transactions, etc. Only when users use the cloud platform will more data flow be triggered. Therefore, when analyzing the traffic pressure of the cloud platform, we can focus on the key indicator of the number of online users to screen out the periods that may be congested.
[0038] Furthermore, it is not prudent enough to make a decision to adjust the storage location of sales data based solely on a single congestion period. This is because the cloud platform itself has a certain traffic resistance ability and can cope with a certain degree of traffic fluctuations in the short term without serious performance problems. Therefore, in order to more accurately judge whether the traffic condition has reached the threshold that requires adjustment, it is necessary to select consecutive congestion periods as the traffic judgment area.
[0039] The purpose of setting the traffic judgment area is precisely based on the characteristic that the cloud platform has a certain traffic resistance ability. By comprehensively considering multiple consecutive congestion periods, it is possible to more comprehensively understand the change trend of traffic and its impact on the cloud platform. After determining the traffic judgment area, the average growth rate of the data stream within this area can be accurately calculated. This average growth rate reflects how fast the traffic grows within a specific time period and provides strong support for predicting the future development trend of traffic.
[0040] Based on the average growth rate of the data stream within the traffic judgment area, the next detection period can be predicted, and thus the ideal number of bytes of the data stream for the next detection period can be calculated. After obtaining the ideal number of bytes of the data stream for the next detection period, in-depth analysis and processing are still required. This includes comparing the prediction result with the actual carrying capacity of the cloud platform, evaluating whether the storage location of sales data needs to be adjusted, as well as the extent and method of adjustment. Through such a series of analysis and processing processes, a more scientific and reasonable next judgment can be made to ensure the stable operation of the cloud platform and the security and reliability of data.
[0041] By studying the total number of bytes of the data stream within the traffic judgment area, the scale and rate of data flow can be insight, which provides a solid foundation for predicting the data traffic in the next detection period. At the same time, combined with the actual number of times the cloud platform has read and written sales data before, the efficiency and load capacity of the platform in processing such data can be further understood.
[0042] After inferring the ideal number of times the cloud platform reads and writes sales data in the next detection period, a formula is used to calculate the scheduling coefficient for each sales data. As the number of read and write operations increases or the ideal number of bytes of the data stream rises, the scheduling coefficient will also increase accordingly, thus more accurately reflecting the importance and priority of sales data in the cloud platform. Incorporating the detection period as the denominator into the formula avoids errors in the results caused by too long detection periods, making the calculation of the scheduling coefficient more accurate and reasonable.
[0043] In another preferred embodiment of the present invention, the process of hierarchically storing sales data based on the scheduling coefficient D specifically includes: If the scheduling coefficient D > γ1, mark the corresponding sales data as hot data. Hot data represents sales data that has been frequently accessed and processed recently. Transfer the hot data from its original storage address to the in-memory database of the cloud platform. If the scheduling coefficient γ2 < D ≤ γ1, mark the corresponding sales data as warm data. Warm data represents sales data that has not been frequently accessed but is relatively important. Transfer the warm data from its original storage address to the solid-state drive storage of the cloud platform. If the scheduling coefficient D < γ2, mark the corresponding sales data as cold data. Cold data represents sales data with a low access frequency and low importance. Transfer the cold data from its original storage address to the large-capacity hard disk storage of the cloud platform. Among them, γ1 is a preset first judgment coefficient, γ2 is a preset second judgment coefficient, and γ2 < D ≤ γ1.
[0044] It should be noted that, according to the scheduling coefficient D, the sales data is hierarchically stored, and the more frequently accessed data is stored in the faster memory.
[0045] In another preferred embodiment of the present invention, the calculation method of the detection period T specifically includes: Obtain the current time point T now , when the cumulative number of users logged in to the cloud platform is equal to the number threshold N max Obtain the time point T at this time end , calculate the duration ΔT = T end -T now , repeat the step of calculating the duration and calculate the average value T of the duration ave , let the detection period T = T ave .
[0046] It can be understood that the value of the detection period obtained by this method is relatively accurate, which can improve the accuracy of subsequent hierarchical storage of sales data.
[0047] In another preferred embodiment of the present invention, obtain the online duration TC of the user. If the online duration TC is less than the preset minimum duration TC min , then do not count it into the number N of online users.
[0048] It should be noted that when the online duration TC of the user is less than the preset minimum duration TC min , this means that the user may have only briefly accessed the cloud platform and has not formed effective business interactions or data traffic. Therefore, to ensure the accuracy and effectiveness of the number of online users, we do not count such users into the number N of online users.
[0049] In another preferred embodiment of the present invention, if the average growth rate ΔM of the data stream < 0 and M now< δ, stop hierarchical storage of sales data, where δ is the optimal throughput of the preset cloud platform.
[0050] It should be noted that when the average growth rate of the data stream ΔM < 0 and M now < δ, it indicates that the access pressure on the cloud platform is small at this time, and there is no need to spend extra manpower and material resources to hierarchically store the already stored sales data again.
[0051] In another preferred embodiment of the present invention, if there is no traffic judgment area, stop the subsequent steps.
[0052] It can be understood that it is not prudent enough to make a decision to adjust the storage location of sales data based only on a single congestion period. This is because the cloud platform itself has a certain traffic resistance ability and can cope with a certain degree of traffic fluctuations in the short term without serious performance problems. Therefore, in order to more accurately judge whether the traffic condition has reached the threshold that requires adjustment, it is necessary to select consecutive congestion periods as the traffic judgment area.
[0053] In another preferred embodiment of the present invention, the calculation method of the number of bytes Mx consumed by the cloud platform for reading and writing sales data specifically includes: Obtain the number of bytes M1, M2, and M3 consumed by the cloud platform for reading and writing transaction data, customer data, and commodity data, and calculate the number of bytes Mx = M1 + M2 + M3.
[0054] It is worth noting that detailed calculations need to be performed on each different data to enhance accuracy.
[0055] In another preferred embodiment of the present invention, if the storage space of the in-memory database of the cloud platform has been exhausted, stop hierarchical storage of sales data and send a warning prompt.
[0056] It is worth noting that if the pre-allocated storage space of the in-memory database of the cloud platform is gradually exhausted after long-term data accumulation, business growth, and various complex operations, the operation stability and data management efficiency of the entire system will face severe challenges. Therefore, it is necessary to stop the hierarchical operation and remind the staff to handle it in time.
[0057] The above has described an embodiment of the present invention in detail, but the content described is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made according to the scope of the present invention application should still fall within the scope covered by the patent of the present invention.
Claims
1. A method for storing mall sales data based on a cloud platform, characterized in that, Including 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 number threshold N max then mark it as a crowded period; If the continuous occurrence count C of the congestion period is greater than the preset judgment count C sta , classify the corresponding congestion period into the traffic judgment area; S2: Determine the congestion period in 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 , where M i represents the number of bytes in the i-th congestion period in the traffic judgment area; The next detection cycle adjacent to the current detection cycle is recorded as the ideal cycle, and the ideal number of bytes of the data stream in the ideal cycle is calculated as MX=ΔM+M now , where M now Represents the number of bytes in the data stream of 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 that the cloud platform reads and writes sales data, calculate the operation ratio R = M_sum / Y, and calculate the ideal number of times YX = MX / R, where the read and write operations refer to the operations 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, and the sales data is hierarchically stored based on the scheduling coefficient D.
2. The method for storing mall sales data based on a cloud platform according to claim 1, wherein In the step S3, the process of hierarchically storing sales data based on the scheduling coefficient D specifically includes: If the scheduling coefficient D > γ1, mark the corresponding sales data as hot data. Hot data represents sales data that has been frequently accessed and processed recently, and transfer the hot data from the original storage address to the in-memory database of the cloud platform; If the scheduling coefficient γ2 < D ≤ γ1, mark the corresponding sales data as warm data. Warm data represents sales data that has not been frequently accessed but is relatively important, and transfer the warm data from the original storage address to the solid-state drive storage of the cloud platform; If the scheduling coefficient D < γ2, mark the corresponding sales data as cold data. Cold data represents sales data with a low access frequency and low importance, and transfer the cold data from the original storage address to the large-capacity hard disk storage of the cloud platform; Where γ1 is a preset first judgment coefficient, γ2 is a preset second judgment coefficient, and γ2 < D ≤ γ1.
3. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that, In the step S1, the calculation method of the detection period T specifically includes: Obtain the current time point T now , when the number of users who have logged in to the cloud platform accumulatively is equal to the quantity threshold N max , obtain the time point T at this time end , calculate the duration ΔT = T end - T now , repeat the steps of calculating the duration and calculate the average value T of the duration ave , let the detection period T = T ave .
4. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that, In the step S1, the online duration TC of the user is obtained. If the online duration TC is less than the preset minimum duration TC min , then it is not counted in the number N of online users.
5. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that, In the step S2, if the average growth rate of the data stream ΔM < 0 and M now < δ, stop the hierarchical storage of the sales data, where δ is the optimal throughput of the preset cloud platform.
6. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that, In the step S1, if there is no traffic judgment area, stop the subsequent steps.
7. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that In the step S3, the calculation method of the number of bytes Mx consumed by the cloud platform for reading and writing sales data specifically includes: The sales data includes transaction data, customer data, and commodity data. Obtain the number of bytes M1, M2, and M3 consumed by the cloud platform for reading and writing transaction data, customer data, and commodity data in sequence, and calculate the number of bytes Mx = M1 + M2 + M3.
8. A method for storing mall sales data based on a cloud platform according to claim 1, characterized in that, In the step S3, if the storage space of the in-memory database of the cloud platform has been consumed, stop hierarchically storing sales data and send a warning prompt.
Citation Information
Patent Citations
Cache optimization method based on artificial intelligence
CN108829343A
Data storage method and device
CN110209345A
Data storage method and device
CN113778318A
Data processing method and device, electronic equipment and computer readable storage medium
CN115022342A
Data storage method and device and computing equipment
CN118708561A