Periodic upgrade management system and method of lottery terminal

By decomposing the lottery terminal architecture and performing performance loss gradient transformation, combined with image management and reinforcement learning algorithms, precise and automated upgrade management of the lottery terminal was achieved, solving the problem of lack of targeted upgrade management and improving upgrade efficiency and reliability.

CN121635931APending Publication Date: 2026-03-10GUANGDONG CAIHUI INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The lack of targeted upgrade management for existing lottery terminals leads to low upgrade efficiency, high risk, poor business continuity, and difficulty in adapting to the needs of high-frequency transactions and multiple business scenarios, which can easily result in service interruptions or performance degradation.

Method used

By deconstructing the lottery terminal architecture, collecting transaction performance datasets for performance degradation gradient transformation, setting up an image management module for upgrade cycle interval configuration, and utilizing reinforcement learning algorithms to optimize upgrade decisions, precise and automated upgrade management is achieved.

Benefits of technology

It significantly improves the efficiency and reliability of terminal upgrade management, ensures business continuity, and reduces upgrade risks and operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635931A_ABST
    Figure CN121635931A_ABST
Patent Text Reader

Abstract

The invention discloses a periodic upgrade management system and method for a lottery terminal, and relates to the technical field of equipment upgrade management, and the system comprises an architecture splitting unit which is used for carrying out architecture splitting on the lottery terminal to obtain a plurality of functional architecture layers; the performance loss gradient conversion unit is used for collecting a transaction performance data set and performing performance loss gradient conversion to obtain a plurality of performance loss gradient indexes; the mirror image management module setting unit is used for setting a mirror image management module and carrying out upgrading period interval configuration on the plurality of mirror image areas; and the upgrading processing unit is used for returning an upgrading decision result according to the corresponding upgrading period interval and carrying out upgrading processing in the corresponding mirror image area. The technical problems of low terminal upgrading efficiency, high risk and poor service continuity caused by extensive upgrading management and lack of pertinence in the prior art are solved, and the technical effects that the upgrading management process is accurate and automatic, and the upgrading management efficiency, reliability and flexibility of the terminal are remarkably improved are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of equipment upgrade management, specifically to a periodic upgrade management system and method for lottery terminals. Background Technology

[0002] With the continued expansion of the lottery industry, lottery terminals, as key equipment for lottery sales and services, directly impact user experience and business continuity in terms of stability, security, and operational efficiency. Traditional lottery terminals typically employ an integrated system architecture with highly coupled functional modules. This often necessitates a complete overhaul during system upgrades or functional expansions, increasing complexity and time costs. Furthermore, changes to localized functions can trigger system-wide risks. Moreover, because lottery terminals are typically deployed at widely distributed sales points in diverse environments, their performance is affected by hardware conditions, network status, and workload, leading to performance imbalances and localized bottlenecks. Current lottery terminal upgrade management relies on fixed cycles or unified triggering mechanisms, lacking dynamic awareness and targeted responses to the actual operational status of terminals. This makes it difficult to adapt to the demands of modern lottery systems with high-frequency transactions and diverse business scenarios, easily causing service interruptions or performance degradation in some terminals during upgrades, affecting availability and business processing capabilities. Furthermore, with the diversification of lottery games and the significant increase in transaction volume, performance degradation in transaction processing, data storage, and communication interaction is becoming increasingly prominent.

[0003] Therefore, the current technologies suffer from problems such as extensive and untargeted upgrade management, resulting in low efficiency, high risk, and poor business continuity in terminal upgrades. Summary of the Invention

[0004] This application provides a periodic upgrade management system and method for lottery terminals, which solves the technical problems of extensive and untargeted upgrade management in the prior art, resulting in low efficiency, high risk and poor business continuity of terminal upgrades. It achieves precise automation of the upgrade management process and significantly improves the efficiency, reliability and flexibility of terminal upgrade management.

[0005] This application provides a periodic upgrade management system for lottery terminals. The system includes: an architecture splitting unit for splitting the lottery terminal architecture to obtain multiple functional architecture layers; a performance loss gradient conversion unit for collecting transaction performance datasets of the lottery terminal and performing performance loss gradient conversion on the multiple functional architecture layers based on the transaction performance datasets to obtain multiple performance loss gradient indices corresponding to the multiple functional architecture layers; a mirror management module setting unit for setting a mirror management module, which includes multiple mirror regions corresponding to the multiple functional architecture layers, and configuring upgrade cycle intervals for the multiple mirror regions based on the multiple performance loss gradient indices; and an upgrade processing unit for, when the mirror management module receives an upgrade data packet, identifying the functional architecture layer to which the upgrade data packet belongs, returning the upgrade decision result of the upgrade data packet according to the upgrade cycle interval corresponding to the functional architecture layer, and performing upgrade processing in the corresponding mirror region according to the upgrade decision result.

[0006] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: defining key performance indicators for each of the plurality of functional architecture layers, wherein the plurality of functional architecture layers include at least a transaction processing layer, a data communication layer, a ticket printing layer, and a payment response layer; dividing and reorganizing the transaction performance dataset according to the plurality of functional architecture layers to obtain multiple sets of transaction performance datasets; calculating the gradient of the performance degradation rate sequence of the key performance indicators defined for each functional architecture layer according to the multiple sets of transaction performance datasets, and outputting the degradation gradient of the key performance indicators for each functional architecture layer; and performing a weighted calculation of the degradation gradient of the key performance indicators for each functional architecture layer to obtain the performance degradation gradient indicator for each functional architecture layer.

[0007] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: initializing a target performance loss gradient threshold and an action space, wherein the action space includes solutions for upgrade cycle intervals corresponding to the plurality of functional architecture layers; collecting multiple performance loss rate sequences corresponding to the plurality of functional architecture layers; constructing a reward function based on the gradient deviation between the target performance loss gradient threshold and the plurality of performance loss gradient indicators, upgrade costs, and the impact of transaction business; and training the solutions for upgrade cycle intervals output by the action space using a reinforcement learning algorithm based on the reward function until optimal solutions for multiple upgrade cycle intervals corresponding to the plurality of functional architecture layers are obtained, and configuring them into the plurality of mirror regions.

[0008] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: determining an initial solution for an upgrade cycle interval from the action space; inputting the initial solution into a corresponding mirror region to simulate an upgrade operation and obtaining simulation feedback data, including gradient deviation feedback data, upgrade cost feedback data, and transaction business impact feedback data; obtaining reward parameters for the reward function based on the simulation feedback data; updating the initial solution based on the reward parameters, and so on, until the reward parameters output by the reward function tend to stabilize, thus obtaining multiple optimal solutions for upgrade cycle intervals.

[0009] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: calculating the periodic difference time sequence magnitude between every two functional architecture layers in the plurality of optimal solutions for upgrade period intervals; when the periodic difference time sequence magnitude is greater than a preset threshold, identifying two functional architecture layers; performing differential adjustment on the optimal solutions for upgrade period intervals corresponding to the two identified functional architecture layers, and updating the plurality of optimal solutions for upgrade period intervals.

[0010] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: performing upgrade processing in a corresponding mirror area based on the upgrade decision result, each mirror area including a first mirror copy and a second mirror copy, the second mirror copy being a backup copy of the first mirror copy; when the upgrade decision result returns non-empty, verifying the upgrade data packet in the second mirror copy, and when the verification passes, returning the upgrade data packet to the first mirror copy for upgrade processing.

[0011] In a possible implementation, the periodic upgrade management system for a lottery terminal includes the following steps: when verification fails, collecting verification feedback data based on the second mirror copy, the verification feedback data including failed test case data and update strategy data corresponding to the failed test case data; updating the upgrade data packet according to the verification feedback data to obtain an updated upgrade data packet; and returning the updated upgrade data packet to the first mirror copy for upgrade processing.

[0012] This application also provides a method for periodic upgrade management of lottery terminals. The method includes: decomposing the lottery terminal architecture to obtain multiple functional architecture layers; collecting transaction performance datasets of the lottery terminal, performing performance loss gradient transformation on the multiple functional architecture layers based on the transaction performance datasets to obtain multiple performance loss gradient indices corresponding to the multiple functional architecture layers; setting up a mirror management module, the mirror management module including multiple mirror regions corresponding to the multiple functional architecture layers, configuring upgrade cycle intervals for the multiple mirror regions based on the multiple performance loss gradient indices; when the mirror management module receives an upgrade data packet, identifying the functional architecture layer to which the upgrade data packet belongs, returning the upgrade decision result of the upgrade data packet according to the upgrade cycle interval corresponding to the functional architecture layer, and performing upgrade processing in the corresponding mirror region according to the upgrade decision result.

[0013] This application proposes a periodic upgrade management system and method for lottery terminals. The system includes: an architecture splitting unit for splitting the lottery terminal architecture into multiple functional architecture layers; a performance degradation gradient conversion unit for collecting transaction performance datasets and performing performance degradation gradient conversion to obtain multiple performance degradation gradient indicators; a mirror management module setting unit for configuring upgrade cycle intervals for multiple mirror regions; and an upgrade processing unit for returning upgrade decision results according to the corresponding upgrade cycle interval and performing upgrade processing in the corresponding mirror region. This addresses the technical problems of existing technologies, such as extensive and untargeted upgrade management leading to low terminal upgrade efficiency, high risk, and poor business continuity. It achieves precise automation of the upgrade management process, significantly improving the efficiency, reliability, and flexibility of terminal upgrade management. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0015] Figure 1 This is a schematic diagram of a periodic upgrade management system for a lottery terminal provided in an embodiment of this application.

[0016] Figure 2 This is a schematic diagram of a periodic upgrade management method for a lottery terminal provided in an embodiment of this application.

[0017] Figure labeling: Architecture splitting unit 10, performance loss gradient conversion unit 20, image management module setting unit 30, upgrade processing unit 40. Detailed Implementation

[0018] To further illustrate the technical means and effects adopted by the present invention in order to achieve the intended purpose, the following detailed description is provided in conjunction with the accompanying drawings and preferred embodiments, based on the specific implementation methods, structures, features and effects of the present invention.

[0019] This application provides a periodic upgrade management system for lottery terminals, such as... Figure 1 As shown, the system includes: Architecture splitting unit 10 is used to split the lottery terminal architecture to obtain multiple functional architecture layers.

[0020] Preferably, the architecture decomposition unit is used to logically decompose the internal structure of the lottery terminal. This involves analyzing all business processes of the lottery terminal, including number selection, payment, ticket issuance, data upload, and management configuration, and identifying the core functional concerns. For example, user interaction involves screen display, touch or key input; transaction logic involves verifying the legality of betting schemes, calculating amounts, and generating unique transaction records; external communication data exchange with the lottery center server, such as uploading transactions and downloading prize information; interaction with payment devices such as bank cards and barcode scanners; and controlling the printer to complete lottery ticket printing. The identified core concerns are then divided according to their technical characteristics and responsibilities, determining multiple independently manageable service layers, i.e., functional architecture layers, which include at least a transaction processing layer, a data communication layer, a ticket printing layer, and a payment response layer. The transaction processing layer is used for transaction logic processing; the data communication layer is used for external communication and managing network connections, protocol encapsulation and parsing; the ticket printing layer is used to execute lottery ticket printing and manage the printer; and the payment response layer is used to coordinate payment processing. Furthermore, after separating the functional architecture layers, the calling interfaces, data formats, and communication protocols between the layers are clearly defined. For example, when the transaction processing layer needs to print tickets, it does not directly call the printer driver, but instead calls the ticket printing layer through a standardized interface for processing.

[0021] The performance loss gradient transformation unit 20 is used to collect the transaction performance dataset of the lottery terminal, and perform performance loss gradient transformation on the multiple functional architecture layers according to the transaction performance dataset to obtain multiple performance loss gradient indices corresponding to the multiple functional architecture layers.

[0022] Preferably, the performance degradation gradient conversion unit is used to convert the transaction performance data generated by the lottery terminal during operation into performance indicators that can accurately reflect the degree and trend of performance degradation of each functional architecture layer. Specifically, it collects performance data related to each functional architecture layer of the lottery terminal throughout the entire lifecycle of processing each lottery transaction as a transaction performance dataset. This may include, but is not limited to, single transaction processing time, CPU utilization, peak memory usage, transaction verification failure rate, network request round-trip time, data packet retransmission rate, bandwidth utilization, connection interruption frequency with the central server, response latency from print command to start printing, total printing time of a single ticket, print head temperature, number of paper jams or paper outages, handshake time with POS machine / scanning device, payment authorization response time, payment success rate, etc. Then, the collected transaction performance dataset is divided and reorganized into transaction performance data corresponding to each functional architecture layer and aggregated according to a preset time window to obtain time series data. The preset time window may be every 30 minutes or every hour.

[0023] Preferably, a performance degradation gradient transformation is performed on multiple functional architecture layers. This includes calculating the performance degradation rate for each time window from time-series data, resulting in a performance degradation rate sequence for multiple functional architecture layers. Next, gradient calculation is performed on the performance degradation rate sequence for each functional architecture layer. This involves calculating the first derivative of the performance degradation rate time series to output the degradation gradient of multiple key performance indicators for each functional architecture layer. Positive values ​​indicate an increasing performance degradation rate, meaning performance is deteriorating rapidly; values ​​close to zero indicate stable performance degradation; and negative values ​​indicate a decreasing performance degradation rate, meaning performance is recovering or improving. Finally, different weights are assigned to the multiple key indicators based on their importance, and a weighted calculation is performed to output a performance degradation gradient indicator representing the overall performance degradation trend of each functional architecture layer.

[0024] Furthermore, the specific configuration of the performance loss gradient transformation unit 20 also includes defining key performance indicators for each of the plurality of functional architecture layers, wherein the plurality of functional architecture layers include at least a transaction processing layer, a data communication layer, a ticket printing layer, and a payment response layer; dividing and reorganizing the transaction performance dataset according to the plurality of functional architecture layers to obtain multiple sets of transaction performance datasets; calculating the gradient of the performance loss rate sequence of the key performance indicators defined for each functional architecture layer according to the multiple sets of transaction performance datasets, and outputting the key performance indicator loss gradient of each functional architecture layer; and performing a weighted calculation of the key performance indicator loss gradient of each functional architecture layer to obtain the performance loss gradient indicator of each functional architecture layer.

[0025] Preferably, multiple key performance indicators are defined for each functional architecture layer. Specifically, for the transaction processing layer, the following are defined: average transaction processing latency (the average time from receiving a transaction request to completing business logic processing); CPU utilization (the percentage of CPU resources consumed during transaction processing); and transaction failure rate (the percentage of failed transactions due to internal logic errors or insufficient resources). For the data communication layer, the following are defined: network round-trip latency (the average time from sending a request to the central server to receiving a response); packet loss rate (the proportion of packets lost during communication); and connection interruption frequency (the number of times the connection with the server is unexpectedly disconnected per unit time). For the ticket printing layer, the following are defined: print command response latency (the time interval from issuing a print command to the printer starting to operate); average printing time per ticket (the total time required to print one lottery ticket); and printing hardware error code frequency (the number of times the printer returns hardware errors such as paper jams, paper shortages, or cutter errors per unit time). Define the payment authorization response time for the payment response layer, which is the time from when the user swipes their card / scans a code to when the payment gateway returns the authorization result; the payment success rate, which is the proportion of successfully completed transactions to the total number of payment attempts; and the peripheral connection timeout rate, which is the ratio of connection timeouts when communicating with payment devices such as POS machines and barcode scanners.

[0026] Preferably, the transaction performance dataset is divided and reorganized according to multiple functional architecture layers to obtain multiple sets of transaction performance datasets, including at least the transaction processing layer dataset, the data communication layer dataset, the invoice printing layer dataset, and the payment response layer dataset. Time series analysis is performed on the key performance indicators defined for each functional architecture layer based on these multiple sets of transaction performance datasets. Specifically, the difference between the average transaction processing time in the current time window and the baseline time in a healthy state is divided by the baseline time in a healthy state to quantify the performance degradation rate and trend of each key performance indicator. Then, the degradation rates of multiple consecutive time windows are arranged in chronological order to determine the performance degradation rate sequence. Finally, linear regression is performed on the performance degradation rate sequence to fit a trend line and calculate the slope as the gradient, thereby outputting the gradient value of each key performance indicator, i.e., the degradation gradient of the key performance indicator. Then, based on the importance of key performance indicators and historical transaction performance data, corresponding weights are assigned to the same functional architecture layer. The weighted sum of the loss gradients of multiple key performance indicators for each functional architecture layer is then obtained to obtain the performance loss gradient index for each functional architecture layer, which represents the overall health trend of that functional architecture layer. The larger the value of the performance loss gradient index, the more severe the overall performance deterioration trend of that layer is, and the higher the urgency of upgrading; a negative value indicates that the performance of that layer is improving.

[0027] The image management module setting unit 30 is used to set up the image management module, which includes multiple image regions corresponding to the multiple functional architecture layers, and configures the upgrade cycle interval of the multiple image regions based on the multiple performance loss gradient indicators.

[0028] Preferably, a container management program based on Docker Swarm is used as the image management module. This module is responsible for the entire lifecycle management of images, including creation, storage, deployment, startup, and shutdown. It includes multiple image regions corresponding to multiple functional architecture layers. Each image region contains a complete copy of the operating system, dependency libraries, configuration files, and its own application code required by that functional architecture layer. Each image region is isolated from others; for example, upgrading the ticket printing layer will not interfere with the running data communication layer. Then, upgrade cycle intervals are configured for multiple image regions based on multiple performance degradation gradient indicators. Specifically, a time range for the upgrade cycle is configured for each image region, including a minimum observation period (during which the layer cannot be upgraded again) and a maximum upgrade deadline (the upgrade of the layer must be scheduled before this deadline). The minimum observation period and maximum upgrade deadline of the corresponding image region are dynamically adjusted according to the performance degradation gradient indicator of each functional architecture layer. For a high positive degradation gradient indicator, the upgrade cycle interval is shortened; for a degradation gradient indicator close to zero, the default upgrade cycle interval is used; and for a low negative degradation gradient indicator, the upgrade cycle interval is extended or the upgrade is not scheduled.

[0029] Furthermore, the specific configuration of the mirror management module setting unit 30 also includes: initializing the target performance loss gradient threshold and action space, wherein the action space includes the solutions for the upgrade cycle intervals corresponding to the multiple functional architecture layers; collecting multiple performance loss rate sequences corresponding to the multiple functional architecture layers; constructing a reward function according to the gradient deviation between the target performance loss gradient threshold and the multiple performance loss gradient indicators, upgrade costs, and the impact of transaction business; and training the solutions for the upgrade cycle intervals output by the action space using a reinforcement learning algorithm based on the reward function until optimal solutions for the multiple upgrade cycle intervals corresponding to the multiple functional architecture layers are obtained, and configuring them to the multiple mirror regions.

[0030] Preferably, a target performance degradation gradient threshold is initialized as the upper limit of acceptable performance degradation trends. When the performance degradation gradient index of a certain functional architecture layer exceeds the target performance degradation gradient threshold, its performance degradation trend is considered unacceptable and must be addressed first. The solution space for the upgrade cycle intervals corresponding to multiple functional architecture layers is initialized, i.e., a combination of actions containing multiple shortest observation periods and latest upgrade deadlines. The latest multiple performance degradation rate sequences for each functional architecture layer are obtained to describe the current state of the lottery terminal. Then, a reward function is constructed according to the gradient deviation between the target performance degradation gradient threshold and multiple performance degradation gradient indices, upgrade costs, and the impact of transaction business. That is, the gradient deviation, upgrade costs, and the impact of transaction business are weighted and calculated as the reward function, where the weights are determined based on historical transaction performance data to adjust relative importance.

[0031] Preferably, gradient bias is determined by calculating the difference between the performance loss gradient index and the target performance loss gradient threshold. If the gradient bias is positive, it represents a penalty; conversely, if the gradient bias is negative, it represents a reward. This encourages the selection of upgrade cycles that allow the performance trend to return to below the threshold. Upgrade cost quantifies the resources consumed by performing the upgrade itself, which may include network bandwidth, computing resources, storage I / O, etc., consumed during the upgrade process. The more frequent the upgrade, the higher the cost, thus penalizing frequent upgrades and encouraging cost-effective upgrade strategies. Transaction business impact is used to assess the impact of the upgrade on normal lottery sales business. For example, the number of transaction failures caused by the temporary unavailability of functional architecture layer services during the upgrade, the increase in average transaction latency, or the decrease in user satisfaction. This penalizes upgrade strategies that trigger upgrades during peak business periods or cause long-term service interruptions. Then, reinforcement learning algorithms are used to train the solutions for the upgrade cycle intervals output in the action space. Specifically, the solutions for each upgrade cycle interval are simulated, and the corresponding new performance gradient indicators, upgrade costs, and impacts on the simulated business are calculated. The simulation results are then substituted into the reward function. The goal is to maximize the reward value, i.e. minimize the overall negative effect. High rewards strengthen the actions that result in the reward, while low rewards weaken the actions. The training is iterated until the reward value no longer increases significantly. At this point, multiple optimal solutions for upgrade cycle intervals corresponding to multiple functional architecture layers are converged, indicating the highest expected reward. Finally, the multiple optimal solutions for upgrade cycle intervals are configured into the corresponding multiple mirror regions.

[0032] Furthermore, the specific configuration of the mirror management module setting unit 30 also includes: determining an initial solution for the upgrade cycle interval from the action space; inputting the initial solution into the corresponding mirror area to simulate the upgrade operation and obtain simulation feedback data, the simulation feedback data including gradient deviation feedback data, upgrade cost feedback data, and transaction business impact feedback data; the reward function obtaining reward parameters based on the simulation feedback data; updating the initial solution based on the reward parameters, and so on, until the reward parameters output by the reward function tend to stabilize, thus obtaining multiple optimal solutions for the upgrade cycle interval.

[0033] Preferably, a combination of actions with the shortest observation period and the latest upgrade deadline is randomly selected from the action space to determine the initial solution for the upgrade cycle interval. This initial solution is then input into the corresponding mirror region for upgrade operation simulation. Specifically, this mirror region is set to simulate the upgrade according to the shortest observation period and the latest upgrade deadline of the initial solution. Considering real-world workloads, network fluctuations, and other uncertainties, the operational status of the functional architecture layer over a future period is obtained as simulation feedback data. This includes gradient deviation feedback data, upgrade cost feedback data, and transaction business impact feedback data. Gradient deviation feedback data represents the deviation state of the loss gradient index of the functional architecture layer after simulation, and upgrade cost feedback data refers to the total cost consumed according to the upgrade strategy. The system considers network traffic, computing resources, and storage space. Transaction business impact feedback data represents the number of service interruptions and simulated transaction failures or delays caused by each upgrade. The simulated feedback data is input into a reward function to calculate reward parameters, which characterize the comprehensive evaluation of the initial solution. A higher score indicates a better upgrade strategy, while a negative score indicates that the overall cost of the strategy outweighs the benefits. Finally, based on the reward parameters, reinforcement learning is used to update the initial solution, and new upgrade cycle interval solutions are selected for simulation. New simulated feedback data is obtained, and new reward parameters are calculated. This process is repeated until the reward parameters output by the reward function tend to stabilize, which is then determined as the optimal solution for the upgrade cycle interval of that functional layer. Ultimately, multiple optimal solutions for upgrade cycle intervals ensure the best balance between performance, cost, and business impact.

[0034] Furthermore, the specific configuration of the mirror management module setting unit 30 also includes: calculating the periodic difference time sequence size between every two functional architecture layers in the multiple upgrade cycle interval optimization solutions; when the periodic difference time sequence size is greater than a preset threshold, obtaining the two identified functional architecture layers; performing differential adjustment on the upgrade cycle interval optimization solutions corresponding to the two identified functional architecture layers, and updating the multiple upgrade cycle interval optimization solutions.

[0035] Preferably, the periodic difference time series between every two functional architecture layers in multiple optimal solutions for upgrade cycle intervals is calculated. This involves comparing the alignment or deviation of the upgrade time series of two functional architecture layers to quantify the temporal conflict and dispersion of upgrade strategies for any two functional architecture layers. Specifically, based on the optimal solution for each functional architecture layer's upgrade cycle interval, multiple upgrade events that may occur within a future period are simulated to obtain the planned upgrade time series for each functional architecture layer. For any two functional architecture layers, the difference in their planned upgrade time series is determined by calculating the average minimum time interval between upgrade events in the two sequences or by statistically analyzing the probability of upgrade events occurring simultaneously or close to each other within a specific time window. The periodic difference time series is output, representing the temporal conflict risk of the upgrade plans for the two functional architecture layers. The larger the value, the closer the upgrade plans for the two functional architecture layers are in time, and the higher the conflict risk.

[0036] Preferably, based on historical data from lottery terminals, a preset threshold is used to represent the minimum upgrade event interval. The magnitude of the period difference time sequence is compared with the preset threshold. If the magnitude of the period difference time sequence is greater than the preset threshold, it indicates that the upgrade plans of the two functional architecture layers are too close. These two functional architecture layers are then identified, forming a conflict layer pair. Then, the optimal solutions for the upgrade period intervals corresponding to the two identified functional architecture layers are differentiated. That is, priorities are distinguished based on business criticality, upgrade risk, or fixed upgrade window, and staggered arrangements are made. Multiple optimal solutions for upgrade period intervals are updated and output. This prevents multiple functional architecture layers from simultaneously pulling upgrade packages in the mirror area, consuming network and computing resources, and causing a sudden surge in load. This improves the smoothness of the overall upgrade processing business and reduces the complexity of operation and maintenance.

[0037] The upgrade processing unit 40 is used to, when the mirror management module receives an upgrade data packet, identify the functional architecture layer to which the upgrade data packet belongs, return the upgrade decision result of the upgrade data packet according to the upgrade cycle interval corresponding to the functional architecture layer, and perform upgrade processing in the corresponding mirror area according to the upgrade decision result.

[0038] Preferably, the image management module receives upgrade data packets and classifies them to determine upgrade targets. Specifically, it parses the metadata contained in the upgrade data packets, and determines the functional architecture layer to which the upgrade data packets belong, such as the data communication layer or the ticket printing layer, through the file name, the manifest file within the data packet, or the numerical tag. Then, it queries the corresponding upgrade cycle interval for that functional architecture layer, determines the timestamp of the last successful upgrade, and makes a decision to upgrade immediately or postpone the upgrade. If the current time minus the last upgrade time has reached the latest upgrade deadline of the upgrade cycle interval, the upgrade decision is to upgrade immediately; if the current time minus the last upgrade time is less than the shortest observation period, the upgrade decision is to postpone the upgrade, and the upgrade package is stored in a queue to wait for the observation period to end. Finally, based on the upgrade decision, the upgrade process is performed in the corresponding image area, that is, the standard upgrade script is executed in the target image area, such as stopping the old version of the service in the image container, decompressing the upgrade package and replacing the binary file or configuration file, running the database migration script and starting the new version of the service. After the upgrade process is completed, a health check and business verification are performed to realize the intelligent upgrade process of the lottery terminal and ensure the efficiency and reliability of upgrade management.

[0039] Furthermore, the specific configuration of the upgrade processing unit 40 also includes performing upgrade processing in the corresponding mirror area according to the upgrade decision result. Each mirror area includes a first mirror copy and a second mirror copy, and the second mirror copy is a backup copy of the first mirror copy. When the upgrade decision result returns a non-empty value, the upgrade data packet is verified in the second mirror copy. When the verification is successful, the upgrade data packet is returned to the first mirror copy for upgrade processing.

[0040] Preferably, the upgrade process is performed in the corresponding mirror region based on the upgrade decision result. Each mirror region includes a first mirror copy and a second mirror copy. The first mirror copy is an active instance currently carrying real production traffic, used to provide real-time services and ensure business continuity during the upgrade. The second mirror copy is a backup copy of the first mirror copy, whose software version, configuration, and data structure are completely identical to the first mirror copy. It is used to verify the upgrade data package and ensure upgrade security. If the upgrade decision result returns a non-empty value, it indicates that an upgrade is required and includes instructions and related parameters for executing the upgrade. Then, the upgrade data package is verified on the second mirror copy, including technical health checks, basic function tests, data compatibility tests, and integration interface tests. For example, it verifies whether the service process has started successfully, whether the port is listening normally, whether the input and output of the functional architecture layer meet expectations, whether the new version can be read and written correctly, and whether the database and message queue communication is normal. If the verification passes, the upgrade is deemed safe. Finally, the upgrade data package is applied to the first mirror copy for upgrade processing, ensuring the reliability and flexibility of the lottery terminal upgrade process.

[0041] Furthermore, the specific configuration of the upgrade processing unit 40 also includes: collecting verification feedback data based on the second mirror copy when verification fails, the verification feedback data including failed test case data and update strategy data corresponding to the failed test case data; updating the upgrade data packet according to the verification feedback data to obtain an updated upgrade data packet; and returning the updated upgrade data packet to the first mirror copy for upgrade processing.

[0042] Preferably, if verification fails on the second mirror copy, the failed test case data and the corresponding update strategy data are collected to form verification feedback data. The failed test case data includes at least the identifier of the failed test case, detailed error logs, abnormal resource performance indicators, and the specific expected and actual results of the failure. The update strategy data corresponding to the failed test case data is a repair instruction for a specific type of failure, including at least the repair actions for common error mode mappings, pre-written repair scripts / patch files, and corresponding rollback instructions. Then, the upgrade data package is updated according to the verification feedback data, i.e., the failed test case data is parsed and matched with the repair actions for common error mode mappings to determine the possible root causes and corresponding repair strategies, thereby obtaining the updated upgrade data package. The updated upgrade data package is then returned to the first mirror copy for upgrade processing, thus ensuring the reliability of the lottery terminal upgrade process.

[0043] In the above text, refer to Figure 1 A periodic upgrade management system for a lottery terminal according to an embodiment of the present invention is described in detail. Next, reference will be made to... Figure 2 This invention describes a method for periodic upgrade management of a lottery terminal according to an embodiment of the present invention.

[0044] A method for periodic upgrade management of lottery terminals, such as... Figure 2 As shown, the method includes: decomposing the lottery terminal architecture to obtain multiple functional architecture layers; collecting the transaction performance dataset of the lottery terminal, performing performance loss gradient transformation on the multiple functional architecture layers based on the transaction performance dataset, and obtaining multiple performance loss gradient indicators corresponding to the multiple functional architecture layers; setting up a mirror management module, the mirror management module including multiple mirror regions corresponding to the multiple functional architecture layers, configuring upgrade cycle intervals for the multiple mirror regions based on the multiple performance loss gradient indicators; when the mirror management module receives an upgrade data packet, by identifying the functional architecture layer to which the upgrade data packet belongs, returning the upgrade decision result of the upgrade data packet according to the upgrade cycle interval corresponding to the functional architecture layer, and performing upgrade processing in the corresponding mirror region according to the upgrade decision result.

[0045] In one possible implementation, the step of performing performance degradation gradient transformation on the plurality of functional architecture layers based on the transaction performance dataset to obtain a performance degradation gradient index for each functional architecture layer includes: defining key performance indicators for each of the plurality of functional architecture layers, wherein the plurality of functional architecture layers include at least a transaction processing layer, a data communication layer, a ticket printing layer, and a payment response layer; dividing and reorganizing the transaction performance dataset according to the plurality of functional architecture layers to obtain multiple sets of transaction performance datasets; calculating the gradient of the performance degradation rate sequence of the key performance indicators defined for each functional architecture layer based on the multiple sets of transaction performance datasets, and outputting the key performance indicator degradation gradient for each functional architecture layer; and performing a weighted calculation of the key performance indicator degradation gradient for each functional architecture layer to obtain a performance degradation gradient index for each functional architecture layer.

[0046] In one possible implementation, configuring upgrade cycle intervals for the multiple mirror regions based on the multiple performance loss gradient indices includes: initializing a target performance loss gradient threshold and an action space, wherein the action space includes solutions for upgrade cycle intervals corresponding to the multiple functional architecture layers; collecting multiple performance loss rate sequences corresponding to the multiple functional architecture layers; constructing a reward function according to the gradient deviation between the target performance loss gradient threshold and the multiple performance loss gradient indices, upgrade costs, and the impact of transaction business; and training the solutions for upgrade cycle intervals output by the action space using a reinforcement learning algorithm based on the reward function until optimal solutions for multiple upgrade cycle intervals corresponding to the multiple functional architecture layers are obtained, and configuring them to the multiple mirror regions.

[0047] In one possible implementation, based on the reward function, a reinforcement learning algorithm is used to train the solutions for the upgrade cycle intervals output by the action space. This includes: determining an initial solution for the upgrade cycle interval from the action space; inputting the initial solution into a corresponding mirror region to simulate an upgrade operation, obtaining simulation feedback data, including gradient deviation feedback data, upgrade cost feedback data, and transaction business impact feedback data; the reward function obtaining reward parameters based on the simulation feedback data; updating the initial solution based on the reward parameters, and so on, until the reward parameters output by the reward function tend to stabilize, thus obtaining multiple optimal solutions for the upgrade cycle intervals.

[0048] In one possible implementation, after obtaining multiple optimal solutions for upgrade cycle intervals, the method further includes: calculating the time series magnitude of the cycle difference between every two functional architecture layers in the multiple optimal solutions for upgrade cycle intervals; when the time series magnitude of the cycle difference is greater than a preset threshold, identifying two functional architecture layers; and performing differential adjustment on the optimal solutions for upgrade cycle intervals corresponding to the two identified functional architecture layers to update the multiple optimal solutions for upgrade cycle intervals.

[0049] In one possible implementation, the periodic upgrade management method for a lottery terminal further includes: performing upgrade processing in a corresponding mirror area according to the upgrade decision result, each mirror area including a first mirror copy and a second mirror copy, the second mirror copy being a backup copy of the first mirror copy; when the upgrade decision result returns non-empty, verifying the upgrade data packet in the second mirror copy, and when the verification passes, returning the upgrade data packet to the first mirror copy for upgrade processing.

[0050] In one possible implementation, the periodic upgrade management method for a lottery terminal further includes: collecting verification feedback data based on the second mirror copy when verification fails, the verification feedback data including failed test case data and update strategy data corresponding to the failed test case data; updating the upgrade data packet according to the verification feedback data to obtain an updated upgrade data packet; and returning the updated upgrade data packet to the first mirror copy for upgrade processing.

[0051] The lottery terminal periodic upgrade management system provided in this embodiment of the invention can execute the lottery terminal periodic upgrade management method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0052] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.

[0053] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A periodic upgrade management system for a lottery terminal, characterized by, The system comprises: an architecture splitting unit, configured to split the lottery terminal machine into a plurality of functional architecture layers; a performance loss gradient conversion unit, configured to collect a transaction performance data set of the lottery terminal machine, and perform performance loss gradient conversion on the plurality of functional architecture layers according to the transaction performance data set, to obtain a plurality of performance loss gradient indicators corresponding to the plurality of functional architecture layers; a mirror management module setting unit, configured to set a mirror management module, the mirror management module comprising a plurality of mirror areas corresponding to the plurality of functional architecture layers, and perform upgrade cycle interval configuration on the plurality of mirror areas based on the plurality of performance loss gradient indicators; an upgrade processing unit, configured to, when the mirror management module receives an upgrade data packet, identify the functional architecture layer to which the upgrade data packet belongs, return an upgrade decision result of the upgrade data packet according to the upgrade cycle interval corresponding to the functional architecture layer, and perform upgrade processing in the corresponding mirror area according to the upgrade decision result.

2. The periodic upgrade management system of a lottery terminal according to claim 1, wherein The performance loss gradient conversion unit performs the following steps: defining a key performance indicator for each functional architecture layer in the plurality of functional architecture layers, the plurality of functional architecture layers comprising at least a transaction processing layer, a data communication layer, a ticket printing layer, and a payment response layer; reorganizing the transaction performance data set according to the plurality of functional architecture layers to obtain a plurality of transaction performance data sets; performing gradient calculation on the performance loss rate sequence of the key performance indicator defined for each functional architecture layer according to the plurality of transaction performance data sets, and outputting the key performance indicator loss gradient of each functional architecture layer; performing weighted calculation on the key performance indicator loss gradient of each functional architecture layer to obtain the performance loss gradient indicator of each functional architecture layer.

3. The periodic upgrade management system of a lottery terminal according to claim 1, wherein The mirror management module setting unit performs the following steps: initializing a target performance loss gradient threshold and an action space, the action space comprising solutions of upgrade cycle intervals corresponding to the plurality of functional architecture layers; collecting a plurality of performance loss rate sequences corresponding to the plurality of functional architecture layers; constructing a reward function according to the gradient deviation between the target performance loss gradient threshold and the plurality of performance loss gradient indicators, upgrade cost, and transaction business impact; training the solutions of upgrade cycle intervals output by the action space based on the reward function using a reinforcement learning algorithm until obtaining a plurality of optimal solutions of upgrade cycle intervals corresponding to the plurality of functional architecture layers, and configuring the plurality of mirror areas.

4. The periodic upgrade management system of a lottery terminal according to claim 3, wherein The mirror management module setting unit performs the following steps: determining an initial solution of the upgrade cycle interval from the action space; inputting the initial solution into the corresponding mirror area to perform upgrade operation simulation, and obtaining simulation feedback data, the simulation feedback data comprising gradient deviation feedback data, upgrade cost feedback data, and transaction business impact feedback data; the reward function obtains reward parameters according to the simulation feedback data; updating the initial solution based on the reward parameters, and so on until the reward parameters output by the reward function tend to be stable, and a plurality of optimal solutions of upgrade cycle intervals are obtained.

5. The periodic upgrade management system of a lottery terminal according to claim 3, wherein The mirror management module setting unit further performs the following steps: Calculate the cycle difference timing size between each two functional architecture layers in the plurality of upgrade cycle interval optimal solutions; When the cycle difference timing size is greater than a preset threshold, obtain the two identified functional architecture layers; Differentially adjust the upgrade cycle interval optimal solution corresponding to the two identified functional architecture layers, and update the plurality of upgrade cycle interval optimal solutions.

6. The periodic upgrade management system of a lottery terminal according to claim 1, wherein According to the upgrade decision result, perform upgrade processing in the corresponding mirror area, each mirror area includes a first mirror copy and a second mirror copy, the second mirror copy is a backup copy of the first mirror copy; When the upgrade decision result returns not empty, verify the upgrade data packet in the second mirror copy, and return the upgrade data packet to the first mirror copy for upgrade processing when the verification is passed.

7. The periodic upgrade management system of a lottery terminal according to claim 6, wherein When the verification is not passed, collect verification feedback data based on the second mirror copy, the verification feedback data includes failure case data and update strategy data corresponding to the failure case data; According to the verification feedback data, update the upgrade data packet to obtain the updated upgrade data packet, and return the updated upgrade data packet to the first mirror copy for upgrade processing.

8. A periodic upgrade management method of a lottery terminal, characterized by, The method is applied to the periodic upgrade management system of any one of the lottery terminal machines in claims 1-7, and the method comprises: Architectural splitting of the lottery terminal machine to obtain a plurality of functional architecture layers; Collecting transaction performance data set of the lottery terminal machine, and performing performance loss gradient conversion on the plurality of functional architecture layers according to the transaction performance data set to obtain a plurality of performance loss gradient indexes corresponding to the plurality of functional architecture layers; Setting a mirror management module, the mirror management module includes a plurality of mirror areas corresponding to the plurality of functional architecture layers, and configuring the plurality of mirror areas based on the plurality of performance loss gradient indexes; When the mirror management module receives an upgrade data packet, the upgrade decision result of the upgrade data packet is returned according to the corresponding upgrade cycle interval of the functional architecture layer by identifying the functional architecture layer to which the upgrade data packet belongs, and the upgrade processing is performed in the corresponding mirror area according to the upgrade decision result.