A lottery intelligent sorting method and system

By intelligently analyzing and dynamically adjusting the length of order data, and by using predictive models and time series algorithms to optimize the sorting system, the problems of congestion and supply interruption in traditional sorting systems when order volume fluctuates and inventory is insufficient are solved, achieving efficient and accurate sorting and resource management.

CN119939436BActive Publication Date: 2025-10-28GUANGDONG CAIHUI INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510428241.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-10-28
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

Traditional sorting systems are prone to sorting congestion and supply disruptions when order volume surges or lottery ticket inventory is insufficient, and cannot effectively cope with order flow fluctuations and inventory management issues.

Method used

By analyzing lottery order data, a prediction model is trained. The CNN-LSTM network and DTW algorithm are used to process the order data, dynamically adjust the order data length, optimize resource allocation and sorting strategies, and use time series similarity algorithms for risk assessment and system adjustment.

Benefits of technology

It improved sorting efficiency and accuracy, enhanced the system's adaptability and stability, optimized resource allocation, and reduced operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939436B_ABST
    Figure CN119939436B_ABST
Patent Text Reader

Abstract

This invention relates to the field of sorting technology, and more particularly to a lottery intelligent sorting method and system. The method includes: acquiring order data containing timestamps, lottery numbers, lottery quantities, warehouse location data, and replenishment data from a lottery order analysis system, and preprocessing it. The preprocessed data is divided into a training set to train a first prediction model, and a standard data set for all defect types is obtained. The optimal standard data is determined by calculating the approximation between each order data point and the standard data. An expansion coefficient value is calculated for each data point using a time series similarity algorithm, and the order data length is adjusted accordingly for secondary training of the first prediction model, resulting in a second prediction model. Real-time order data is input into the second prediction model to obtain the sorting risk type and adjust the sorting system to complete the order sorting. This invention can improve sorting efficiency and accuracy, enhance system adaptability and stability, optimize resource allocation, and reduce costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sorting technology. In particular, it relates to an intelligent lottery sorting method and system. Background Technology

[0002] In today's wave of digitalization and automation, the lottery industry is constantly seeking technological innovation to improve operational efficiency. As an emerging technology, intelligent lottery sorting systems are gradually becoming a focus of the industry. By combining artificial intelligence, machine learning, and automated equipment, this system can quickly identify and classify lottery tickets, allocating them to the correct channels or inventory based on real-time demand. Compared to traditional sorting methods, intelligent sorting systems not only improve sorting speed and accuracy but also significantly reduce human error rates, providing the lottery industry with an efficient and reliable solution.

[0003] The lottery industry faces increasing market demand and complex operational challenges. Traditional sorting methods often rely on manual operation or simple rule engines, which are prone to problems such as sorting congestion, high error rates, and poor inventory management when faced with surges in order volume or peak periods. To address these challenges, intelligent sorting systems have emerged. By introducing advanced algorithms and automation technologies, intelligent sorting systems can analyze order flow and inventory status in real time and dynamically adjust sorting strategies to avoid congestion and stagnation. At the same time, it can significantly reduce human error rates, ensuring that lottery tickets are accurately distributed to users, improving user experience and operational efficiency.

[0004] Despite the numerous advantages of intelligent sorting systems, some challenges may still arise in practical applications. Traditional sorting systems typically employ a rule-based FIFO (First-In, First-Out) strategy, which can lead to sorting congestion or even standstill when order volumes suddenly increase. Furthermore, insufficient lottery ticket stock is a common problem, especially during periods of high demand, potentially resulting in supply shortages during sorting, impacting user experience and sales efficiency. Summary of the Invention

[0005] To address the problem that traditional sorting systems, due to their FIFO strategy and lack of dynamic adjustment capabilities, are prone to sorting congestion and supply interruptions when order volume surges or lottery ticket reserves are insufficient, this invention provides solutions in the following aspects.

[0006] In a first aspect, a lottery intelligent sorting method includes: acquiring order data from a lottery order analysis system and preprocessing it, wherein the order data includes: timestamp, lottery number, lottery quantity, warehouse data, and replenishment data; dividing the preprocessed order data into a training set and training a preset prediction model to obtain a first prediction model that has been trained; acquiring a standard data set of all defect types in the training of the first prediction model; calculating the approximation between each input order data in the training set and the standard data of multiple defect types to obtain the best standard data for each order data; using a time series similarity algorithm, calculating the expansion coefficient value of each data point in the input order data based on the correspondence between data points in the best standard data of each input order data; adjusting the length of the order data according to the expansion coefficient value, and using the adjusted order data length as input data for the secondary training of the first prediction model to obtain a second prediction model; inputting real-time order data into the second prediction model to obtain the sorting risk type of the real-time order data, and adjusting the sorting system to complete the order sorting.

[0007] The benefits are as follows: By acquiring and preprocessing order data containing timestamps, lottery numbers, lottery quantities, position data, and replenishment data from a lottery order analysis system, a first prediction model and its standard dataset are trained. The similarity between each order's data and the standard data for defect types is calculated to obtain the optimal standard data. A time series similarity algorithm is used to calculate the expansion coefficient value and adjust the order data length. The adjusted data is then used for secondary training to obtain a second prediction model. Real-time order data is input into the second prediction model to obtain sorting risk types and adjust the sorting system to complete order sorting. This not only improves sorting efficiency and accuracy but also enhances the system's adaptability and stability, while optimizing resource allocation and reducing costs.

[0008] Preferably, the preprocessing of order data includes:

[0009] The order data is labeled according to the defect type, which includes: too many orders, too few orders, too many lottery tickets, too few lottery tickets, and normal sorting. The labeled data is then encoded to complete the preprocessing of the order data.

[0010] Preferably, the first prediction model includes:

[0011] The first prediction model uses a CNN-LSTM network and employs a multi-class cross-entropy loss function as the loss function for the first prediction model.

[0012] The encoded dataset is divided into a training set and a validation set. The training set is then divided into a matrix of order data from a preset number of time periods, which serves as the training set for the preset prediction model.

[0013] The benefits are as follows: By employing a CNN-LSTM network as the primary prediction model and using a multi-class cross-entropy loss function, the time-series features of order data can be effectively processed, improving the model's ability to identify different defect types. Dividing the encoded dataset into training and validation sets, and organizing the training set into a matrix according to time series, not only improves the efficiency and accuracy of model training but also enhances the model's adaptability to dynamic changes in order data.

[0014] Preferred, the standard dataset includes:

[0015] During the training of the first prediction model, the order data corresponding to the lowest cross-entropy loss function value is used as the standard data for the corresponding defect type, and the standard data of all defect types are used to form a standard data set.

[0016] Its effects are as follows: by using standardized data, order data preprocessing, risk assessment and sorting control can be carried out more effectively, thereby enhancing the system's adaptability and stability, optimizing resource allocation, reducing operating costs, and improving overall sorting efficiency and system stability.

[0017] Preferred, the optimal standard data includes:

[0018] The DTW algorithm is used to calculate the approximation between each input order data and each standard data in the standard data set, to obtain the corresponding DTW value sequence. The minimum DTW value in the DTW value sequence is obtained to determine the closest defect type, and the corresponding standard data is used as the best standard data for each input order data.

[0019] Its effectiveness lies in the following: By using the DTW algorithm to calculate the approximation between each input order data and each standard data in the standard dataset, it can effectively handle the time-series characteristics of order data, accurately matching even data of varying lengths. Obtaining the minimum value in the DTW value sequence accurately identifies the closest defect type between the input data and the standard dataset, thus providing the most suitable standard data for the order data. This not only improves the matching accuracy between order data and standard data but also enhances the system's ability to identify different defect types, providing a reliable basis for subsequent sorting risk assessment and system adjustments, thereby optimizing the sorting process and improving sorting efficiency and accuracy.

[0020] Preferably, the correspondence includes:

[0021] The cumulative distance matrix between the input order data and the best standard data is constructed using the dynamic time warping algorithm. Each element in the cumulative distance matrix represents the local distance between the input order data and the best standard data at the corresponding position.

[0022] Using dynamic programming, the shortest path from the starting point to the ending point in the cumulative distance matrix is ​​obtained. Based on the trajectory corresponding to the shortest path, the correspondence between the input order data and the optimal standard data is determined.

[0023] Preferably, the expansion coefficient value includes:

[0024] Calculate the matching degree between each input order data and the standard data and actual data of each defect type, and calculate the difference and normalize it to obtain the expansion coefficient value between each input order data and each defect type.

[0025] Preferably, the process of adjusting the length of the completed order data includes the following steps:

[0026] Peak point detection is performed on the expansion coefficient value sequence to obtain a peak sequence, wherein the peak sequence includes peak valley points and peak points; the two peak points closest to the two ends of the peak sequence are taken as edge peak points, and the index values ​​of the two edge peak points in the expansion coefficient value sequence are obtained respectively. The minimum value of the distance between the edge peak point and the starting end and the ending end is calculated to obtain the adjustment direction coefficient.

[0027] Based on the data on one side corresponding to the adjustment direction coefficient, calculate the mean of the sequence of expansion coefficient values ​​corresponding to all data points, and multiply the mean by the expansion coefficient value of the peak corresponding to the input order data to obtain the window adjustment coefficient. The product of the window adjustment coefficient and the adjustment direction coefficient is used as the length adjustment value.

[0028] If the length adjustment value is less than the current data length, data is removed from the end to make the length of the removed data consistent with the length adjustment value; if the length adjustment value is greater than or equal to the current data length, data is added from the end to make the length of the added data consistent with the length adjustment value.

[0029] Secondly, a lottery intelligent sorting system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned lottery intelligent sorting method is implemented.

[0030] The present invention has the following effects:

[0031] 1. This invention enables the sorting system to process orders more efficiently by intelligently analyzing order data and dynamically adjusting the length of order data, thereby reducing sorting errors and congestion caused by fluctuations in order volume or insufficient lottery ticket reserves, and thus improving sorting efficiency and accuracy.

[0032] 2. This invention utilizes predictive models to conduct risk assessments and sorting controls on order data, enabling the system to adapt to different order patterns and unexpected problems, reducing risks during the sorting process, and ensuring the stable operation of the system.

[0033] 3. This invention uses intelligent analysis and prediction of order data to rationally allocate sorting resources, avoid resource waste, reduce operating costs, and improve the overall performance and reliability of the system. Attached Figure Description

[0034] Figure 1 This is a flowchart of steps S1-S5 in a lottery intelligent sorting method according to an embodiment of the present invention.

[0035] Figure 2 This is a structural block diagram of a lottery intelligent sorting system according to an embodiment of the present invention. Detailed Implementation

[0036] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0037] Reference Figure 1 A lottery intelligent sorting method includes steps S1-S5, as detailed below:

[0038] S1: Obtain order data from the lottery order analysis system and preprocess it. The order data includes: timestamp, lottery number, lottery quantity, position data, and replenishment data.

[0039] Preprocessing of order data includes:

[0040] The order data is labeled according to the defect type, which includes: too many orders, too few orders, too many lottery tickets, too few lottery tickets, and normal sorting. The labeled data is then encoded to complete the preprocessing of the order data.

[0041] To further explain, defect types include, but are not limited to, too many / too few orders, too many / too few lottery tickets remaining. Other defect types can be labeled and set by the implementer according to the specific implementation scenario. Further analysis of the potential problems associated with each defect type is also needed.

[0042] Too many orders: The number of orders exceeds the system's processing capacity, causing sorting congestion. Too few orders: Insufficient orders may lead to resource waste or low sorting efficiency. Too much lottery ticket stock: Excessive stock of a particular lottery type may lead to inventory backlog. Too little lottery ticket stock: Insufficient stock of a particular lottery type may result in supply shortages during sorting. Normal: No of the above issues; the sorting process proceeds normally.

[0043] The purpose of data annotation is to identify which data points contain which types of problems, providing labels for supervised learning of predictive models, enabling the models to learn the characteristics of different defect types. By analyzing the annotated data, common problems in the system can be discovered, and sorting strategies and inventory management can be optimized.

[0044] In this embodiment, one-hot encoding is used for data encoding. Implementers can adjust the data encoding method according to the specific implementation scenario.

[0045] S2: Divide the preprocessed order data into training sets and train a preset prediction model to obtain the first prediction model after training. Obtain the standard data set of all defect types in the training of the first prediction model.

[0046] The first prediction model includes:

[0047] The first prediction model uses a CNN-LSTM network and employs the cross-entropy loss function for multi-class classification as the loss function for the first prediction model.

[0048] The encoded dataset is divided into a training set and a validation set. The training set is then divided into a matrix of order data from a preset number of time periods, which serves as the training set for the preset prediction model.

[0049] Specifically, in constructing the CNN-LSTM network, local feature extraction is first performed on the input data using a one-dimensional convolutional layer (CNN part). The input data format is (feature dimension, time step), where the feature dimension is composed of one-hot encoding and numerical features (e.g., lottery numbers, position data). A one-dimensional convolutional layer (nn.Conv1d) is used to locally convolve the input features to extract local temporal features. The number of input channels is set to input_dim, the number of output channels is 16, the kernel size is 3, and padding=1 is used to keep the time step constant. The output of the convolutional layer introduces non-linearity through the ReLU activation function, enabling the model to capture more complex feature relationships.

[0050] Next, to adapt to the input requirements of LSTM, the dimensions of the output tensors after convolution and activation need to be transformed. The data is rearranged into the format (time step, batch_size, number of feature channels) using permute(2, 0, 1), where batch_size is 1 because only one sample is input at a time.

[0051] Then, LSTM layers are used for temporal dependency modeling. The input feature dimension of the LSTM layer is 16 (the number of output channels from the CNN part), and the hidden state size is set to 64. The role of the LSTM layer is to capture long-term dependencies in the sequence, improving the ability to recognize dynamic changes in data through temporal modeling.

[0052] Finally, after the LSTM layer, the output of the last time step (i.e., the last hidden state) is taken, which carries the information of the entire sequence. Through a fully connected layer (nn.Linear), the 64-dimensional hidden state is mapped to 5 categories, corresponding to 5 defect types (e.g., too many orders, too few orders, too many lottery tickets, too few lottery tickets, and normal sorting).

[0053] In this embodiment, the cross-entropy loss function for multi-class classification is used. It means that, among them, This indicates the current training iteration of the first prediction model. Total training iterations. The value is set to 300, which implementers can adjust according to specific implementation scenarios. They can also adjust the loss function and network model based on the specific implementation scenario and requirements. For example, different network architectures (such as pure LSTM, GRU, etc.) can be selected, or the number of training epochs can be adjusted. To optimize model performance.

[0054] In this embodiment, a 1:4 ratio is used to divide the validation set and training set. The ratio can be adjusted by the implementer according to the specific implementation scenario. The preset number of time points is 200 time points of order data, which can be adjusted by the implementer according to the specific implementation method.

[0055] The standard dataset includes:

[0056] During the training of the first prediction model, the order data corresponding to the lowest cross-entropy loss function value is used as the standard data for the corresponding defect type, and the standard data of all defect types are used to form a standard data set.

[0057] In other words, selecting the lowest value of the cross-entropy loss function indicates that the prediction result of the defect type is accurate in the inference result of the first prediction model in this iteration. Furthermore, in the multi-class cross-entropy loss function, the better the inference result of the first prediction model, the lower the calculated loss function value.

[0058] It's important to note that a sudden surge in order volume can lead to a large number of consecutive order input datasets exhibiting localized features of the same defect type. In this case, the model may overfit to these local features while ignoring other features, resulting in decreased generalization ability and impacting overall accuracy. Conversely, if the order input data contains multiple defect types, or if the multidimensional information of the input data changes drastically, the model may be affected by too much irrelevant information, making it difficult to accurately identify the main defect type and thus impacting prediction accuracy.

[0059] To address these issues, the length of the order input data needs to be adaptively adjusted to ensure the model can better match the characteristics of different defect types, thereby improving the accuracy and stability of predictions. The specific steps are as follows:

[0060] S3: Calculate the similarity between each input order data in the training set and standard data for multiple defect types, and obtain the best standard data for each order data.

[0061] Best standard data includes:

[0062] The DTW algorithm is used to calculate the approximation between each input order data and each standard data in the standard data set, to obtain the corresponding DTW value sequence. The minimum DTW value in the DTW value sequence is obtained to determine the closest defect type, and the corresponding standard data is used as the best standard data for each input order data.

[0063] It should be noted that the DTW value represents the similarity between the input order data and the standard data for a certain defect type. The smaller the value, the closer the two are. However, even if the value is small, it does not mean that all features in the input data are completely useful. It only indicates that the input order data is most similar to the standard data for that defect type overall, but it does not exclude the possibility that the input data may still contain incomplete or redundant information.

[0064] It should also be noted that the length of the input data was fixed during the previous training. However, in practical applications, the length of the input data may vary. The DTW algorithm can handle time series data of different lengths, while methods such as the Pearson correlation coefficient usually require the same input data length. Therefore, the DTW algorithm was used to analyze the augmentation coefficient value of each data point. The specific steps are as follows:

[0065] S4: Using a time series similarity algorithm, calculate the expansion coefficient value of each data point in the input order data based on the correspondence between data points in the best standard data of each input order data.

[0066] It should be noted that the sequence of augmentation coefficient values ​​corresponding to all data points in each input order data is obtained. The sequence of augmentation coefficient values ​​is one-dimensional data sorted according to the correspondence between all data points in each input order data.

[0067] Correspondence relationships include:

[0068] The cumulative distance matrix between the input order data and the best standard data is constructed using the dynamic time warping algorithm. Each element in the cumulative distance matrix represents the local distance between the input order data and the best standard data at the corresponding position.

[0069] Using dynamic programming, the shortest path from the starting point to the ending point in the cumulative distance matrix is ​​obtained. Based on the trajectory corresponding to the shortest path, the correspondence between the input order data and the optimal standard data is determined.

[0070] In other words, after obtaining the correspondence, if the input order data shows a many-to-one relationship with the best standard data (i.e., multiple order input data are aligned with one best standard data), it indicates that the order input data is redundant and needs to be removed. If the order input data shows a one-to-many relationship with the best standard data (i.e., one order input data is aligned with multiple best standard data), it indicates that the order input data is incomplete and needs to be supplemented. If the order input data shows a one-to-one relationship with the best standard data, it indicates that the current order input data and the best standard data have a high degree of matching.

[0071] However, when expanding or deleting input order data, one cannot remove or expand directly from the order data, as this would lead to data corruption and make it impossible to determine the exact location of the inserted data. Therefore, it is necessary to obtain the expansion coefficient value corresponding to each data point in each order data set.

[0072] The expansion factor values ​​include:

[0073] Calculate the matching degree between each input order data and the standard data and actual data of each defect type, and calculate the difference and normalize it to obtain the expansion coefficient value between each input order data and each defect type.

[0074] Specifically, the expansion coefficient values ​​satisfy the following relationship:

[0075] ;

[0076] In the formula, Indicates the first The order data entered by the first input is the same as the first input. Expansion coefficient values ​​between defect types Indicates the first The order data entered by the first input is the same as the first input. Feature matching degree between standard data for each defect type Indicates the first The order data entered by the first input is the same as the first input. Feature matching degree between actual data of each defect type Represented by natural numbers An exponential function with base 0.

[0077] In other words, if This indicates that the order input data has a one-to-one correspondence with the best standard data. This indicates that the length of the input data remains unchanged.

[0078] like The number of optimal standard data points is large, while the number of order input data points is small, indicating a one-to-many relationship between order input data and optimal standard data. This needs to be expanded. This indicates that the length of the order input data needs to be expanded to a longer value;

[0079] like The number of optimal standard data points is small, while the number of order input data points is large, meaning there is a many-to-one relationship between the order input data and the optimal standard data points, which needs to be expanded. This indicates that the length of the input data needs to be reduced.

[0080] To further explain, although the augmentation coefficient value can determine which data point should be augmented or deleted, it is not possible to directly insert or delete data points within the data. Therefore, insertion or removal can only be performed on edge data points. The specific steps for peak point detection on the sequence composed of augmentation coefficient values ​​are as follows:

[0081] S5: Adjust the order data length according to the expansion coefficient value, and use the adjusted order data length as the input data for the secondary training of the first prediction model to obtain the second prediction model; input the real-time order data into the second prediction model to obtain the sorting risk type of the real-time order data, and adjust the sorting system to complete the order sorting.

[0082] To adjust the length of order data, the following steps are involved:

[0083] Peak point detection is performed on the expansion coefficient value sequence to obtain the peak sequence, which includes peak valley points and peak points; the two peak points closest to the two ends of the peak sequence are taken as edge peak points, and the index values ​​of the two edge peak points in the expansion coefficient value sequence are obtained respectively. The minimum value of the distance from the edge peak point to the start end and to the end end is calculated to obtain the adjustment direction coefficient.

[0084] Specifically, the adjustment direction coefficient satisfies the following relationship:

[0085] ;

[0086] In the formula, Indicates the first The first input order data corresponds to the peak sequence of the first peak. Each peak corresponds to an adjustment direction coefficient for the distance of the order data from the edge. Indicates the first The peak sequence corresponding to the input order data is the 1st peak. The sequence number of each peak in the sequence of augmentation coefficient values. Indicates the first The total number of data points for each input order. This represents the minimum value function.

[0087] That is to say, This reflects the distance between the edge peak and the starting point. It reflects the distance between the edge peak and the end.

[0088] Based on the data on one side corresponding to the adjustment direction coefficient, calculate the mean of the sequence of expansion coefficient values ​​corresponding to all data points, and multiply the mean by the expansion coefficient value of the peak value corresponding to the input order data to obtain the window adjustment coefficient;

[0089] Specifically, the window adjustment coefficient satisfies the following relationship:

[0090] ;

[0091] In the formula, Indicates the first The window adjustment factor for each input order data. This represents the mean of the expanded coefficient values ​​corresponding to all data on one side of the adjustment direction coefficient. Indicates the first The first input order data corresponds to the peak sequence of the first peak. The expansion coefficient value of each peak.

[0092] That is to say, It reflects the overall feature matching situation on the current data side. The larger the mean, the more the length needs to be expanded; the smaller the mean, the more the length needs to be shortened; the mean is close to 1, indicating that it should be kept as unchanged as possible. It reflects the feature matching status of the current peak point and is used to adjust the data length.

[0093] The product of the window adjustment coefficient and the adjustment direction coefficient is used as the length adjustment value. If the length adjustment value is less than the current data length, data is removed from the end to make the length of the removed data consistent with the length adjustment value. If the length adjustment value is greater than or equal to the current data length, data is added from the end to make the length of the added data consistent with the length adjustment value.

[0094] It should be noted that the length of the input order data is adjusted to obtain the length of the next input order data, which is then used for the secondary training of the first prediction model. The secondary training rounds are set to 1000 times, which can be adjusted by the implementer according to the specific implementation scenario to obtain the trained second prediction model. The loss function and other parameters are consistent with the parameters of the first prediction model.

[0095] In other words, the collected real-time order data is input into the prediction model to obtain the order risk assessment value for each defect type. The maximum value of the order risk assessment value is selected as the defect type of the real-time order data, and the sorting system is adjusted to complete the order sorting.

[0096] This invention also provides a lottery intelligent sorting system. For example... Figure 2 As shown, the system includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a lottery intelligent sorting method according to the first aspect of the present invention. The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, the settings and functions of which are known in the art and will not be described further here.

[0097] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for intelligent sorting of lottery tickets, characterized in that, include: Order data is obtained from the lottery order analysis system and preprocessed. The order data includes: timestamp, lottery number, lottery quantity, position data, and replenishment data. The preprocessed order data is divided into training sets, and a preset prediction model is trained to obtain the first prediction model after training. The standard data set of all defect types in the training of the first prediction model is obtained. Calculate the similarity between each input order data in the training set and standard data for multiple defect types, and obtain the best labeled data for each order data; The cumulative distance matrix between the input order data and the best standard data is constructed using the dynamic time warping algorithm. Each element in the cumulative distance matrix represents the local distance between the input order data and the best standard data at the corresponding position. Using dynamic programming, the shortest path from the starting point to the ending point in the cumulative distance matrix is ​​obtained. Based on the trajectory corresponding to the shortest path, the correspondence between the input order data and the optimal standard data is determined, and the expansion coefficient value of each data point in the input order data is calculated. Peak point detection is performed on the expansion coefficient value sequence to obtain a peak sequence, wherein the peak sequence includes peak valley points and peak points; the two peak points closest to the two ends of the peak sequence are taken as edge peak points, and the index values ​​of the two edge peak points in the expansion coefficient value sequence are obtained respectively. The minimum value of the distance between the edge peak point and the starting end and the ending end is calculated to obtain the adjustment direction coefficient. Based on the data on one side corresponding to the adjustment direction coefficient, calculate the mean of the sequence of expansion coefficient values ​​corresponding to all data points, and multiply the mean by the expansion coefficient value of the peak corresponding to the input order data to obtain the window adjustment coefficient. The product of the window adjustment coefficient and the adjustment direction coefficient is used as the length adjustment value. If the length adjustment value is less than the current data length, data is removed from the end to make the length of the removed data consistent with the length adjustment value. If the length adjustment value is greater than or equal to the current data length, data is added from the end to make the length of the added data consistent with the length adjustment value. This completes the order data length adjustment, and the adjusted order data length is used as the input data for the secondary training of the first prediction model to obtain the second prediction model. Real-time order data is input into the second prediction model to obtain the sorting risk type of the real-time order data, and the sorting system is adjusted to complete the order sorting.

2. The intelligent lottery sorting method according to claim 1, characterized in that, The preprocessing steps include: The order data is labeled according to the defect type, which includes: too many orders, too few orders, too many lottery tickets, too few lottery tickets, and normal sorting. The labeled data is then encoded to complete the preprocessing of the order data.

3. The intelligent lottery sorting method according to claim 1, characterized in that, The first prediction model includes: The first prediction model uses a CNN-LSTM network and employs a multi-class cross-entropy loss function as the loss function for the first prediction model. The encoded dataset is divided into a training set and a validation set. The training set is then divided into a matrix of order data from a preset number of time periods, which serves as the training set for the preset prediction model.

4. The intelligent lottery sorting method according to claim 1, characterized in that, The standard data set includes: During the training of the first prediction model, the order data corresponding to the lowest cross-entropy loss function value is used as the standard data for the corresponding defect type, and the standard data of all defect types are used to form a standard data set.

5. The intelligent lottery sorting method according to claim 1, characterized in that, The optimal standard data includes: The DTW algorithm is used to calculate the approximation between each input order data and each standard data in the standard data set, to obtain the corresponding DTW value sequence. The minimum DTW value in the DTW value sequence is obtained to determine the closest defect type, and the corresponding standard data is used as the best standard data for each input order data.

6. The intelligent lottery sorting method according to claim 1, characterized in that, The expansion coefficient value includes: Calculate the matching degree between each input order data and the standard data and actual data of each defect type, and calculate the difference and normalize it to obtain the expansion coefficient value between each input order data and each defect type.

7. A lottery intelligent sorting system, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the intelligent lottery sorting method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Intelligent goods identifying and sorting method and system based on computer vision

    CN116187718A

  • Intelligent sorting method for instant lottery tickets

    CN117483245A