Data processing method and device based on scenic spot SaaS cloud ticketing system

By combining cloud computing and edge computing technology in the scenic area SaaS cloud ticketing system, dynamically switching data processing modes according to network conditions, the data inconsistency caused by instability in the scenic area network is solved and the stability of ticket sales and inspection services is ensured.

CN119484555AInactive Publication Date: 2025-02-18GUANGXI NANNING JIAKAI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411712557.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Due to the large number of people in scenic spots, the network usage scenarios are complex, and the network is unstable, data upload and synchronization are affected, and there is a problem of inconsistent data between the cloud and the edge.

Method used

Provide a data processing method based on the scenic area SaaS cloud ticketing system. By obtaining the initial ticket sales and inspection data and network situation values, determine whether the preset network situation threshold is met, and selecting the edge or cloud data processing mode to ensure the smooth data processing and synchronization. conduct.

Benefits of technology

In the case of unstable network or disconnection, ensuring that ticket sales and inspection services are not interrupted, and normal ticket sales and inspection services are maintained, solving the problem of inconsistent data between the cloud and the edge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484555A_ABST
    Figure CN119484555A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of system data processing, and discloses a data processing method based on a scenic spot SaaS cloud ticketing system, and the method comprises the steps: obtaining initial fare collection data and network condition values of the scenic spot SaaS cloud ticketing system; whether a preset network condition threshold value is met or not is judged according to the network condition numerical value, when the network condition numerical value does not meet the preset network condition threshold value, an edge end data processing mode is selected, and the initial fare collection data are transmitted to an edge end through a network for data processing and sent to a cloud end; and when the network condition numerical value meets a preset network condition threshold value, selecting a cloud data processing mode, transmitting the initial fare collection data to a cloud through a network for processing, and synchronizing the initial fare collection data to an edge end, thereby realizing data synchronization of the cloud and the edge end. The method can solve the problems that data uploading and synchronization are affected due to the fact that the number of people in a scenic spot is large, the flow is large, and the network is unstable, and data of the cloud end and data of the edge end are not consistent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of system data processing, and in particular to a data processing method and device based on a scenic spot SaaS cloud ticketing system. Background Art

[0002] In recent years, the new generation of information technology represented by cloud computing has become increasingly mature, making the cloud computing-based SaaS (Software-as-a-Service) operation model gradually become the mainstream of the industry. SaaS service is to deploy applications uniformly in the cloud center of cloud computing. Enterprises do not need to purchase software and can interact with local application data through the Internet. The operation and maintenance costs of enterprises are greatly reduced, and new versions of software can be obtained in a timely manner while maintaining flexibility. Various business functions such as scenic area management, ticket sales, settlement and data storage can be realized through SaaS services, and the powerful parallel computing function of cloud servers can accelerate data processing and reduce latency, providing a basis for real-time ticket sales and inspection.

[0003] In one existing technology, an analysis report is obtained by analyzing and processing the data uploaded by the IoT terminal and the environment around the IoT terminal. The analysis report is encrypted and added to a specified location around the IoT terminal. At the same time, an alarm trigger signal is sent to the IoT. The IoT terminal receives the alarm trigger signal and responds.

[0004] The existing technology does not take into account the fact that data upload and synchronization are affected due to the large number of people and high mobility in scenic spots, complex network usage scenarios, and unstable network. Therefore, there is a problem of inconsistency between cloud and edge data. Summary of the invention

[0005] The present invention provides a data processing method and device based on a scenic spot SaaS cloud ticketing system to solve the problem of inconsistent data between the cloud and edge due to the large number of people and high mobility in the scenic spot, complex network usage scenarios, and unstable network, which affects data upload and synchronization.

[0006] In the first aspect, in order to solve the above technical problems, the present invention provides a data processing method based on a scenic spot SaaS cloud ticketing system, comprising:

[0007] Obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system;

[0008] Determine whether the preset network condition threshold is met according to the network condition value; when the network condition value does not meet the preset network condition threshold, select the edge data processing mode, transmit the initial ticket sales and inspection data to the edge through the network for data processing and send it to the cloud;

[0009] When the network condition value meets the preset network condition threshold, the cloud data processing mode is selected, and the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge end, so as to achieve data synchronization between the cloud and the edge end;

[0010] Among them, the edge data processing mode and the cloud data processing mode are data processing methods that are pre-set and stored in the system.

[0011] In an optional implementation, judging whether a preset network condition threshold is met according to the network condition value, and when the network condition value does not meet the preset network condition threshold, selecting an edge data processing mode, transmitting the initial ticket sales and inspection data to the edge through the network for data processing and sending it to the cloud, includes:

[0012] Transmitting the initial ticket sales and inspection data to the edge end through the network for processing to obtain edge end ticket sales and inspection data;

[0013] According to the edge terminal ticket sales and inspection data, the edge terminal inputs the data into the preset receiving time calculation formula for calculation to obtain the receiving data time of the edge terminal receiving the data;

[0014] The system automatically generates a queue according to the order of the received data time to obtain an order-preserving queue and a cache queue;

[0015] Synchronize the initial ticket sale and inspection data to the sequence-preserving queue to obtain the sequence-preserving ticket sale and inspection data;

[0016] Synchronize the edge-end ticket sales and inspection data to the cache queue to obtain cache ticket sales and inspection data;

[0017] Compare and judge the order-keeping ticket sales and inspection data with the cached ticket sales and inspection data. When the order-keeping ticket sales and inspection data are inconsistent with the cached ticket sales and inspection data, analyze the cached ticket sales and inspection data to obtain edge abnormal data;

[0018] The abnormal data at the edge is analyzed to obtain synchronization error factors, data is re-transmitted according to the synchronization error factors, and the re-transmitted edge ticket sales and inspection data is sent to the cloud.

[0019] In an optional implementation manner, the step of inputting the edge terminal ticket sales and inspection data into a preset receiving time calculation formula for calculation to obtain the receiving data time of the edge terminal receiving the data comprises:

[0020] The received data time is calculated as follows:

[0021]

[0022] Among them, T is the time to receive data, D is the size of the data, B is the network transmission speed, P d is the network transmission delay, and C is the preset transmission delay constant.

[0023] In an optional implementation, when the network condition value meets a preset network condition threshold, a cloud data processing mode is selected, and the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge end, so as to achieve cloud and edge data synchronization, including:

[0024] The initial ticket sales and inspection data is transmitted to the cloud through the network for data processing to obtain cloud ticket sales and inspection data;

[0025] The cloud ticket sales and inspection data is synchronized to the edge end through a data synchronization algorithm to obtain synchronized ticket sales and inspection data;

[0026] According to the synchronous ticket sales and inspection data, the data is saved to the edge to achieve data synchronization between the cloud and the edge.

[0027] In an optional implementation, synchronizing the cloud ticket sales and inspection data to the edge end through a data synchronization algorithm to obtain synchronized ticket sales and inspection data includes:

[0028] Obtain the first time value of synchronizing the cloud ticketing data to the edge end, the second time value of the edge end receiving the cloud ticketing data, and the third time value of the edge end sending the cloud ticketing data;

[0029] Calculate the time value difference according to the second time value and the third time value;

[0030] The time value difference is compared with the first time value. When the time value difference is less than the first time value, it is determined that the cloud ticket sales and inspection data has not been synchronized to the edge end; when the time value difference is greater than the first time value, it is determined that the cloud ticket sales and inspection data has been synchronized to the edge end.

[0031] In an optional implementation, obtaining a network status value includes:

[0032] Get the current network quality value and network delay value;

[0033] Calculate the current network quality value and the preset network quality threshold to obtain a quality value difference;

[0034] A calculation is performed based on the quality value difference and the network delay value to obtain a network status value.

[0035] In an optional embodiment, the method further includes:

[0036] The network transmission delay is calculated by the following method:

[0037]

[0038] Among them, P d is the network transmission delay, L is the transmission line length, and v is the signal propagation speed.

[0039] In a second aspect, the present invention provides a data processing device based on a scenic spot SaaS cloud ticketing system, comprising:

[0040] The data acquisition module is used to obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system;

[0041] The edge processing module is used to determine whether the network condition value meets the preset network condition threshold according to the network condition value. When the network condition value does not meet the preset network condition threshold, the edge data processing mode is selected to transmit the initial ticket sales and inspection data to the edge through the network for data processing and send it to the cloud;

[0042] The cloud processing module is used to select the cloud data processing mode when the network status value meets the preset network status threshold, transmit the initial ticket sales and inspection data to the cloud through the network for processing and synchronize it to the edge end, so as to realize data synchronization between the cloud and the edge end.

[0043] In a third aspect, the present invention also provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data processing method based on the scenic spot SaaS cloud ticketing system as described above is implemented.

[0044] In a fourth aspect, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data processing methods based on the scenic spot SaaS cloud ticketing system.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] The present invention discloses a data processing method based on a scenic spot SaaS cloud ticketing system, comprising obtaining initial ticket sale and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system; judging whether a preset network status threshold is met according to the network status value, and when the network status value does not meet the preset network status threshold, selecting an edge data processing mode, transmitting the initial ticket sale and inspection data to the edge via the network for data processing and sending it to the cloud; when the network status value meets the preset network status threshold, selecting a cloud data processing mode, transmitting the initial ticket sale and inspection data to the cloud via the network for processing and synchronizing it to the edge, thereby realizing data synchronization between the cloud and the edge; wherein the edge data processing mode and the cloud data processing mode are data processing methods pre-set and stored in the system.

[0047] The present invention combines the two data processing modes of cloud computing and edge computing in combination with network conditions to ensure that the ticket sales and inspection services are not interrupted when the network is unstable or disconnected. When the network is unstable or disconnected, normal ticket sales and inspection services can still be maintained. Therefore, it can solve the problem of data upload and synchronization being affected due to a large number of people and large flow in scenic spots, complex network usage scenarios, and unstable network, resulting in inconsistency between cloud and edge data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of a data processing method of a scenic spot SaaS cloud ticketing system provided by the first embodiment of the present invention;

[0049] Figure 2 It is a schematic diagram of the edge data processing mode flow provided by the present invention;

[0050] Figure 3 It is a schematic diagram of the edge data processing mode flow provided by the present invention;

[0051] Figure 4 It is a structural schematic diagram of a system data sending device provided by the present invention;

[0052] Figure 5 It is a structural diagram of a data processing device of a scenic spot SaaS cloud ticketing system provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Reference Figure 1 The first embodiment of the present invention provides a data processing method based on a scenic spot SaaS cloud ticketing system, comprising the following steps:

[0055] S1, obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system;

[0056] S2, judging whether the network condition value meets the preset network condition threshold according to the network condition value, and when the network condition value does not meet the preset network condition threshold, selecting the edge end data processing mode, transmitting the initial ticket sales and inspection data to the edge end through the network for data processing and sending it to the cloud;

[0057] S3, when the network condition value meets the preset network condition threshold, the cloud data processing mode is selected, the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge end, so as to achieve data synchronization between the cloud and the edge end;

[0058] In step S1, the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system are obtained.

[0059] In one implementation, obtaining a network status value includes: obtaining a current network quality value and a network delay value; calculating based on the current network quality value and a preset network quality threshold to obtain a quality value difference; and calculating based on the quality value difference and the network delay value to obtain a network status value.

[0060] Among them, the current network quality value can be obtained by using network detection tools (such as Ping test, Traceroute, etc.) to measure the real-time quality of the network. The current network quality value can be evaluated by multiple indicators, such as: signal strength: for wireless networks, signal strength will directly affect the stability of data transmission; packet loss rate: during data transmission, if the data packet is lost, the overall communication efficiency will be reduced; bandwidth utilization: it is a measure of the use of network bandwidth, and an overloaded network will cause increased delay. The network delay value can be calculated by measuring the response time between the cloud server and using HTTP requests (such as sending GET requests). The smaller the delay value, the faster the network response is, which is suitable for real-time data transmission requirements. The obtained current network quality value and the preset network quality threshold are input into the difference calculation formula for comparison to obtain the quality value difference. The difference calculation formula is that the quality value difference is the difference between the current network quality value and the network quality threshold. If the quality value difference is negative, it means that the current network quality is lower than the preset standard, indicating that there will be network failure or instability. After obtaining the quality value difference and network delay value, input the quality value difference and network delay value into the numerical calculation formula for calculation to obtain the network status value. In order to ensure the compatibility between different indicators, the original data needs to be standardized. For example, the network delay value can be inverted (i.e., its inverse is taken) so that the shorter the delay time, the higher its contribution.

[0061] It should be noted that the initial ticket sales and inspection data can be obtained by extracting the current ticket sales and inspection data from the ticket management system of the scenic spot, wherein the initial ticket sales and inspection data includes the number of tickets sold, the number of tickets inspected, the time of recording ticket sales and inspection, and customer information. The number of tickets sold can be recorded by recording the total number of tickets sold in a specific time period, and can be classified and counted according to different ticket types (such as adult tickets, children's tickets, group tickets, etc.). The number of tickets inspected can reflect the actual number of people present by recording the number of tourists entering the scenic spot. Different ticket inspection channels can be set and counted separately to facilitate the statistics of traffic distribution at different entrances. Recording the time of ticket sales and inspection means that each ticket sales and inspection record is accompanied by an accurate timestamp. Customer information includes the identity information and contact information of the ticket purchaser, and also provides data support for some market analysis, such as analyzing the age structure and identity background of tourists. The acquisition method of the initial ticket sales and inspection data can adopt the API function call interface implementation method with the advantages of strong real-time performance and high degree of automation. If the system has an open API interface, the required data can be extracted by programming and calling the relevant interface. You can also use database query to obtain the initial ticket sales and inspection data, directly connect to the database of the ticketing system, and use SQL statements to query data. This method of obtaining data through database query is suitable for occasions with large data volumes and frequent operations, but you need to pay attention to data security and permission issues. You can also use log analysis to obtain the initial ticket sales and inspection data. The system will generate detailed operation logs. By analyzing these log files, you can also obtain relevant ticket sales and inspection data. This method of obtaining data through log analysis is suitable for situations where there is no open API or database access rights.

[0062] In step S2, it is determined whether the network status value meets the preset network status threshold according to the network status value. When the network status value does not meet the preset network status threshold, the edge data processing mode is selected, and the initial ticket sales and inspection data is transmitted to the edge through the network for data processing and sent to the cloud.

[0063] Step S2 timely determines whether the preset network condition threshold is met according to the change of the network condition value. Once the network condition is found to be poor, the system will automatically switch to the edge data processing mode to ensure the timely processing and effective transmission of the ticket sales and inspection data. In the system, a network condition threshold is set in advance. The value is determined based on historical data analysis. The network condition threshold is obtained by analyzing the data of past network performance. It is a standard that comprehensively considers network quality and delay. For example, a network condition value greater than or equal to 70 can be regarded as a good network, and less than 70 indicates a poor network condition. The threshold can be continuously optimized through simulation tests or machine learning algorithms to meet actual operational needs. Use dynamic monitoring tools (such as network performance monitoring tools, API request delay monitoring, etc.) to continuously collect network condition values ​​and compare them with the set thresholds. If the comparison result is to meet the preset network condition threshold, the system will enter the cloud data processing mode to continue the normal data transmission process; if the comparison result is not to meet the preset network condition threshold, the edge data processing mode is entered.

[0064] Reference Figure 2 In one implementation, the step S2 of selecting the edge data processing mode includes:

[0065] S21, transmitting the initial ticket sales and inspection data to the edge end through the network for processing to obtain edge end ticket sales and inspection data;

[0066] S22, inputting the edge terminal ticket sales and inspection data into a preset receiving time calculation formula for calculation to obtain the receiving data time of the edge terminal receiving the data;

[0067] S23, the system automatically generates a queue according to the order of the received data time, and obtains an order-preserving queue and a cache queue;

[0068] S24, synchronizing the initial ticket sales and inspection data to the order-keeping queue to obtain the order-keeping ticket sales and inspection data;

[0069] S25, synchronizing the ticket sales and inspection data at the edge end to the cache queue to obtain cached ticket sales and inspection data;

[0070] S26, comparing and judging the order-keeping ticket sales and inspection data and the cached ticket sales and inspection data, when the order-keeping ticket sales and inspection data and the cached ticket sales and inspection data are inconsistent, analyzing the cached ticket sales and inspection data to obtain edge abnormal data;

[0071] S27, analyzing the abnormal data at the edge to obtain synchronization error factors, retransmitting data according to the synchronization error factors, and sending the retransmitted edge ticket sales and inspection data to the cloud.

[0072] In step S21, the system transmits the initial ticket sales and inspection data to the edge device through the network to obtain the edge ticket sales and inspection data. In this process, the following operations are performed: the collected data is packaged to form a unified message format, such as JSON or XML; a reliable network protocol (such as TCP / IP) is used to establish a connection with the edge device. Considering the security of data transmission, the SSL / TLS encryption layer can be applied; data is sent from the system to the edge node through the set network interface. The data transmission process has an error detection mechanism, such as a retransmission strategy, which can automatically remedy when the data packet is lost or damaged.

[0073] In step S22, the data receiving time is calculated by:

[0074]

[0075] Among them, T is the time to receive data, D is the size of the data, B is the network transmission speed, P d is the network transmission delay, and C is the preset transmission delay constant.

[0076] Furthermore, the network transmission delay is calculated by the following method:

[0077]

[0078] Among them, P d is the network transmission delay, L is the transmission line length, and v is the signal propagation speed.

[0079] The data receiving time refers to the total time to receive data, including the time required for data transmission, network delay and inherent time, and is measured in seconds. The data size refers to the amount of data that needs to be transmitted, expressed in bytes (B) or bits (bit), which can be obtained through the file system API, program or database query. For example, you can use the operating system command to view the file size, or use the application to actively count the amount of data that needs to be transmitted. The data size directly determines the network burden. For large data transmission, higher bandwidth and longer transmission time are required. Network transmission speed refers to the rate at which data is transmitted in the network, expressed as bits per second (bps). It can be measured by using network performance testing tools (such as iPerf, Speedtest), or by viewing the service specifications in the network provider's documentation. Transmission speed is an important indicator of network configuration, and too low a speed will become a bottleneck for data transmission; network transmission delay refers to the time required for a data signal to propagate in a transmission line, which is determined by the distance and propagation speed, including propagation delay, queuing delay, and processing delay. It can be measured by using the ping command to measure the round-trip time (RTT), and then subtracting the average processing delay to estimate the one-way delay. It can also be calculated by entering it into the network transmission delay calculation formula; the transmission delay constant refers to the delay inherent in the system design, which represents the coordination delay. Protocol overhead (such as TCP / IP header processing), packet processing time, etc. can be obtained through benchmarking and performance evaluation, and the transmission delay constant can be obtained by consulting historical data; the transmission line length signal refers to the distance propagated in the physical medium, which refers to the actual distance between the data center and the end-user device. It can be obtained through physical measurement or using a network topology diagram. In a complex network architecture, network management software can be used to estimate the routing path length. Longer transmission line lengths will result in higher latency. Therefore, when designing a network, shortening the transmission distance as much as possible can improve performance; signal propagation speed refers to the speed at which the signal propagates in the medium, which depends on the type of material used (such as optical fiber, cable, etc.). It can be found based on standard values. Common propagation speeds are: optical fiber transmission is about (2\times 10^8)m / s, and copper wire transmission speed is about (1.2\times 10^8)m / s. It can also be measured experimentally, especially in specific environments, where the actual speed will be different.

[0080] In step S23, the system automatically generates an order-preserving queue and a cache queue according to the order of the received data time. The design of these two queues has different functions: the order-preserving queue is used to ensure that the data is arranged in the order of the receiving time, which is very important for data that needs to be processed strictly according to time. For example, when performing real-time data analysis or monitoring, it is necessary to ensure that the order of the data flow is correct. The cache queue is used to temporarily store processed data, which can be used to balance the load or improve responsiveness. The cache queue allows fast reading and writing, which is suitable for high-frequency read and write operations to prevent system overload.

[0081] In steps S24 and S25, the system synchronizes the initial ticket sales and inspection data to the sequence-keeping queue. The specific operations in this process include: data verification, ensuring that the data in the sequence-keeping queue conforms to the predetermined format and standards, including validity checks; data insertion, inserting the initial ticket sales and inspection data into the sequence-keeping queue in sequence based on the receipt time of the initial ticket sales and inspection data, to ensure that the sequence relationship of the initial ticket sales and inspection data is maintained.

[0082] Next, the edge ticketing data is synchronized to the cache queue. The specific operation process includes: quickly entering the newly received data to ensure that the system can continue to receive and store new data even during high traffic, and will not cause data loss due to processing speed lag. The cached data can be extracted in later batch processing or analytical processing, so that when there are spare resources, the system can read the data from the cache and perform detailed analysis without affecting the processing of real-time data.

[0083] In step S26, the system compares the order-keeping ticket sales and inspection data with the cached ticket sales and inspection data. During this process, the data in the order-keeping queue and the cache queue will be compared to ensure consistency between the two. If there is a difference, the system needs to analyze the cached ticket sales and inspection data and quickly identify the type of problem (such as data loss, data modification, etc.). After identifying the type of problem, the anomalies found in the comparison process are divided into multiple categories, and then the edge abnormal data is obtained according to different categories. For example: Data loss: There is data in the order-keeping queue, but the cache queue lacks this part of the data; Data duplication: Duplicate records appear in the cache queue, but not in the order-keeping queue; Data error: The values ​​of certain data fields are inconsistent in the two queues. In addition, detailed logs are recorded for the anomalies found, including data content, occurrence time, anomaly type and other information.

[0084] In step S27, after detecting abnormal data at the edge, a machine learning model or a deep learning model is used to perform in-depth analysis of the abnormality to find out the synchronization error factors. Exemplarily, at the edge, a lightweight machine learning model or a deep learning model is deployed to perform real-time analysis of the preprocessed abnormal data at the edge. These models can be trained based on historical data to identify corresponding synchronization error factors. By analyzing the difference between abnormal data and normal data, the specific factors that cause synchronization errors can be determined.

[0085] Specifically, synchronization error factors include network failure, software bug, user input error, etc. Based on the analysis results, the corresponding feedback report is generated, and the system formulates corresponding processing strategies. For example, if data is lost due to network failure, it is necessary to check the network connection and reconnect; if the data format is incorrect, it is necessary to verify the data source and its format specification, and then retransmit it. The system marks the data that needs to be retransmitted and prepares to send it to the edge again. During this process, incremental updates can be adopted to only send changed data to avoid the burden of full data transmission. Appropriate retransmission mechanisms (such as ARQ or FEC) can also be used to ensure reliable data transmission. After the edge receives the correct data, it sends the correct data to the cloud. The cloud needs to return confirmation information to ensure that the data has been successfully received. If the confirmation is not received, the system will automatically trigger the retransmission logic until the maximum number of retries is reached.

[0086] In step S3, when the network status value meets the preset network status threshold, the cloud data processing mode is selected, and the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge, thereby realizing cloud and edge data synchronization.

[0087] Reference Figure 3 In one implementation, the cloud data processing mode includes:

[0088] S31. The initial ticket sales data is transmitted to the cloud via the network for data processing to obtain the cloud ticket sales data;

[0089] S32, synchronizing the cloud ticket sales and inspection data to the edge end through a data synchronization algorithm to obtain synchronized ticket sales and inspection data;

[0090] S33, saving the synchronized ticket sales and inspection data to the edge end to achieve data synchronization between the cloud and the edge end.

[0091] In step S32, the cloud-based ticket sales and inspection data is synchronized to the edge end through the data synchronization algorithm to obtain the synchronized ticket sales and inspection data, including: obtaining the first time value when the cloud-based ticket sales and inspection data is synchronized to the edge end, the second time value when the edge end receives the cloud-based ticket sales and inspection data, and the third time value when the edge end sends the cloud-based ticket sales and inspection data; calculating according to the second time value and the third time value to obtain the time value difference; comparing the time value difference with the first time value, when the time value difference is less than the first time value, determining that the cloud-based ticket sales and inspection data is not synchronized to the edge end; when the time value difference is greater than the first time value, determining that the cloud-based ticket sales and inspection data has been synchronized to the edge end.

[0092] The cloud data processing mode is a method of centrally processing data using cloud computing resources. It is suitable for scenarios with high bandwidth and high latency tolerance. In this mode, the system will upload the initial ticket sales and inspection data to the cloud for processing and ensure that the edge can obtain the updated data in a timely manner. The initial ticket sales and inspection data is sent to the cloud for data processing to generate new cloud ticket sales and inspection data. During the data processing process, it is necessary to ensure that the data format meets the cloud processing requirements (such as JSON, XML or CSV). At the same time, important data is encrypted to protect user privacy and information security. The processed cloud ticket sales and inspection data is synchronized to the edge to ensure that the edge device has the latest data to ensure that the cloud and edge data are consistent. After the cloud processing is completed, the generated cloud ticket sales and inspection data needs to be transmitted to the edge through the data synchronization algorithm. During this process, the system will record several key time points: the first time value: the time when the cloud ticket sales and inspection data starts to be synchronized to the edge; the second time value: the time when the edge receives the cloud ticket sales and inspection data; the third time value: the time when the edge sends a confirmation to receive the cloud ticket sales and inspection data. Verify whether the cloud-based ticketing data is successfully synchronized to the edge by monitoring the time value: if the time value difference is less than the first time value (that is, the delay in data reception and confirmation is small), it is determined that the cloud-based ticketing data has not been synchronized to the edge; if the time value difference is greater than the first time value, it is determined that the cloud-based ticketing data has been synchronized to the edge. Store the synchronized ticketing data to the edge, and select a suitable storage solution, such as a local database (such as SQLite, MySQL, etc.) or memory cache (such as Redis) for data storage, to ensure that the storage solution supports fast query and data consistency, so that edge applications can efficiently access this data. At the same time, set up a mechanism to regularly check the data consistency between the edge and the cloud, such as using hash verification or version control. If inconsistencies are found, automatically trigger resynchronization or alarm mechanisms.

[0093] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0094] The working process of the present invention is described below using a relatively common scenario as an example.

[0095] A well-known tourist attraction receives millions of tourists every year. Especially during holidays and weekends, ticket sales and ticket checking become extremely busy. The scenic spot introduced a SaaS-based cloud ticketing system to achieve efficient ticket sales and ticket checking management. However, due to unstable network conditions, data upload delays or losses often occur, resulting in inconsistent ticket sales and ticket checking data between the cloud and edge ends, affecting the tourists' admission experience. In response to the above problems, the scenic spot selected the data processing method based on the SaaS cloud ticketing system of the present invention, which effectively solved the problem of ticket service interruption under unstable network conditions by combining cloud computing and edge computing technology. During peak hours, the system obtains the initial ticket sales and ticket checking data (such as the number of tickets purchased, user information, etc.) and the current network status values ​​(such as bandwidth, delay, etc.) in real time. The system automatically determines whether the network status meets the preset threshold. For example, when the network delay exceeds 500ms or the bandwidth is less than 1Mbps, the system determines that the network is unstable. In view of the unstable network, the system selects the edge data processing mode. The initial ticket sales and ticket checking data is transmitted to the edge device (such as the ticket checking machine) in the venue through the network for local processing. The edge device inputs the received ticket sales and inspection data into the receiving time calculation formula to generate a sequence-preserving queue and a cache queue. The initial ticket sales and inspection data is synchronized to the sequence-preserving queue to ensure the order of the data. The processed edge-end ticket sales and inspection data is synchronized to the cache queue to support fast access and subsequent analysis. The edge device regularly compares the sequence-preserving ticket sales and inspection data with the cached ticket sales and inspection data. Once the data is inconsistent, it immediately enters the exception handling process to identify possible synchronization error factors (such as network interruption, data format error, etc.) and re-trigger data transmission. According to the analysis results, the edge device adjusts and sends the ticket sales and inspection data to the cloud again to ensure timely update of cloud data. When the network returns to stability and meets the preset network condition threshold, the system automatically switches to the cloud data processing mode, starts uploading the latest edge-end ticket sales and inspection data to the cloud, and synchronizes the data. After the cloud processing is completed, the latest data is synchronized back to the edge to ensure the consistency of the data between the two, and the edge device stores the processed data for subsequent query and report generation.

[0096] In summary, the present invention discloses a data processing method based on a scenic spot SaaS cloud ticketing system, including obtaining the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system; judging whether a preset network status threshold is met according to the network status value, and when the network status value does not meet the preset network status threshold, selecting an edge data processing mode, and the edge data processing mode includes transmitting the initial ticket sales and inspection data to the edge through the network for processing to obtain edge ticket sales and inspection data; inputting the edge ticket sales and inspection data into a preset receiving time calculation formula for calculation to obtain the receiving data time of the edge receiving data; and judging whether the receiving data time is met according to the receiving data time. The system automatically generates queues in the order of the order between the two, and obtains the order-keeping queue and the cache queue; synchronizes the initial ticket sales and inspection data to the order-keeping queue to obtain the order-keeping ticket sales and inspection data; synchronizes the edge-end ticket sales and inspection data to the cache queue to obtain the cached ticket sales and inspection data; compares and judges according to the order-keeping ticket sales and inspection data and the cached ticket sales and inspection data, and when the order-keeping ticket sales and inspection data and the cached ticket sales and inspection data are inconsistent, analyzes according to the cached ticket sales and inspection data to obtain the edge-end abnormal data; analyzes according to the edge-end abnormal data to obtain the synchronization error factor, retransmits the data according to the synchronization error factor, and sends the retransmitted edge-end ticket sales and inspection data to the cloud. When the network condition value meets the preset network condition threshold, the cloud data processing mode is selected, and the edge-end data processing mode includes transmitting the initial ticket sales and inspection data to the cloud through the network for data processing to obtain the cloud ticket sales and inspection data; synchronizes the cloud ticket sales and inspection data to the edge through the data synchronization algorithm to obtain the synchronized ticket sales and inspection data; saves the synchronized ticket sales and inspection data to the edge to achieve cloud and edge data synchronization.

[0097] The present invention combines the two data processing modes of cloud computing and edge computing in combination with network conditions to ensure that the ticket sales and inspection services are not interrupted when the network is unstable or disconnected. When the network is unstable or disconnected, normal ticket sales and inspection services can still be maintained. Therefore, it can solve the problem of data upload and synchronization being affected due to a large number of people and large flow in scenic spots, complex network usage scenarios, and unstable network, resulting in inconsistency between cloud and edge data.

[0098] Reference Figure 4 and Figure 5 The second embodiment of the present invention provides a data processing device based on a scenic spot SaaS cloud ticketing system, comprising:

[0099] The data acquisition module is used to obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system;

[0100] The edge processing module is used to determine whether the network condition value meets the preset network condition threshold according to the network condition value. When the network condition value does not meet the preset network condition threshold, the edge data processing mode is selected to transmit the initial ticket sales and inspection data to the edge through the network for data processing and send it to the cloud;

[0101] The cloud processing module is used to select the cloud data processing mode when the network status value meets the preset network status threshold, transmit the initial ticket sales and inspection data to the cloud through the network for processing and synchronize it to the edge end, so as to realize data synchronization between the cloud and the edge end.

[0102] It should be noted that the data processing device based on the scenic spot SaaS cloud ticketing system provided in an embodiment of the present invention is used to execute all the process steps of the data processing method based on the scenic spot SaaS cloud ticketing system in the above embodiment. The working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.

[0103] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an algorithm program. When the processor executes the computer program, the steps in the above-mentioned data processing method embodiment based on the scenic spot SaaS cloud ticketing system are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are realized, such as the cloud processing module.

[0104] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0105] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0106] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0107] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0108] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0109] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0110] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data processing method based on a scenic spot SaaS cloud ticketing system, characterized in that: Executed by a computer, including: Obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system; Determine whether the preset network condition threshold is met according to the network condition value; when the network condition value does not meet the preset network condition threshold, select the edge data processing mode, transmit the initial ticket sales and inspection data to the edge through the network for data processing and send it to the cloud; When the network condition value meets the preset network condition threshold, the cloud data processing mode is selected, and the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge end, so as to achieve data synchronization between the cloud and the edge end; Among them, the edge data processing mode and the cloud data processing mode are data processing methods that are pre-set and stored in the system.

2. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 1 is characterized in that: The determining whether the preset network condition threshold is met according to the network condition value, and when the network condition value does not meet the preset network condition threshold, selecting the edge end data processing mode, transmitting the initial ticket sales and inspection data to the edge end through the network for data processing and sending it to the cloud, includes: Transmitting the initial ticket sales and inspection data to the edge end through the network for processing to obtain edge end ticket sales and inspection data; According to the edge terminal ticket sales and inspection data, the edge terminal inputs the data into the preset receiving time calculation formula for calculation to obtain the receiving data time of the edge terminal receiving the data; The system automatically generates a queue according to the order of the received data time to obtain an order-preserving queue and a cache queue; Synchronize the initial ticket sale and inspection data to the sequence-preserving queue to obtain the sequence-preserving ticket sale and inspection data; Synchronize the edge-end ticket sales and inspection data to the cache queue to obtain cached ticket sales and inspection data; Compare and judge the order-keeping ticket sales and inspection data with the cached ticket sales and inspection data. When the order-keeping ticket sales and inspection data are inconsistent with the cached ticket sales and inspection data, analyze the cached ticket sales and inspection data to obtain edge abnormal data; The abnormal data at the edge is analyzed to obtain synchronization error factors, data is re-transmitted according to the synchronization error factors, and the re-transmitted edge ticket sales and inspection data is sent to the cloud.

3. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 2 is characterized in that: The step of inputting the edge terminal ticket sales and inspection data into a preset receiving time calculation formula for calculation to obtain the receiving data time of the edge terminal receiving the data includes: The received data time is calculated as follows: Among them, T is the time to receive data, D is the size of the data, B is the network transmission speed, P d is the network transmission delay, and C is the preset transmission delay constant.

4. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 1 is characterized in that: When the network condition value meets the preset network condition threshold, the cloud data processing mode is selected, the initial ticket sales and inspection data is transmitted to the cloud through the network for processing and synchronized to the edge end, so as to achieve cloud and edge data synchronization, including: The initial ticket sales and inspection data is transmitted to the cloud through the network for data processing to obtain cloud ticket sales and inspection data; The cloud ticket sales and inspection data is synchronized to the edge end through a data synchronization algorithm to obtain synchronized ticket sales and inspection data; According to the synchronous ticket sales and inspection data, the data is saved to the edge to achieve data synchronization between the cloud and the edge.

5. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 4 is characterized in that: The step of synchronizing the cloud ticket sales and inspection data to the edge end through a data synchronization algorithm to obtain synchronized ticket sales and inspection data includes: Obtain the first time value of synchronizing the cloud ticketing data to the edge end, the second time value of the edge end receiving the cloud ticketing data, and the third time value of the edge end sending the cloud ticketing data; Calculate the time value difference according to the second time value and the third time value; The time value difference is compared with the first time value. When the time value difference is less than the first time value, it is determined that the cloud ticket sales and inspection data has not been synchronized to the edge end; when the time value difference is greater than the first time value, it is determined that the cloud ticket sales and inspection data has been synchronized to the edge end.

6. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 2 is characterized in that: Get network status values, including: Get the current network quality value and network delay value; Calculate the current network quality value and the preset network quality threshold to obtain a quality value difference; A calculation is performed based on the quality value difference and the network delay value to obtain a network status value.

7. The data processing method based on the scenic spot SaaS cloud ticketing system according to claim 3 is characterized in that: The method further comprises: The network transmission delay is calculated by the following method: Among them, P d is the network transmission delay, L is the transmission line length, and v is the signal propagation speed.

8. A data processing device based on a scenic spot SaaS cloud ticketing system, characterized in that: include: The data acquisition module is used to obtain the initial ticket sales and inspection data and network status values ​​of the scenic spot SaaS cloud ticketing system; The edge processing module is used to determine whether the network condition value meets the preset network condition threshold according to the network condition value. When the network condition value does not meet the preset network condition threshold, the edge data processing mode is selected to transmit the initial ticket sales and inspection data to the edge through the network for data processing and send it to the cloud; The cloud processing module is used to select the cloud data processing mode when the network status value meets the preset network status threshold, transmit the initial ticket sales and inspection data to the cloud through the network for processing and synchronize it to the edge end, so as to realize data synchronization between the cloud and the edge end.

9. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the data processing method based on the scenic spot SaaS cloud ticketing system as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data processing method based on the scenic spot SaaS cloud ticketing system as described in any one of claims 1 to 7.