A lottery winning query method and device based on deep learning
Through deep learning technology, the lottery pictures are preprocessed and identified, which solves the problems of untimely and unclear details of lottery winning inquiries, realizes automated query and management, meets the diverse needs of lottery players, and improves the convenience of lottery shopping experience and management efficiency.
Patent Information
- Application Number
- CN202410972058.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The prior art lottery winning inquiries are not timely and the details are unclear, which makes it difficult to meet the needs of lottery players for customized and diversified daily management of lottery, especially for the elderly and disabled, and lacks effective management and analysis functions.
Using the lottery winning query method based on deep learning, the lottery images are preprocessed and identified, and the lottery information is recognized using MobileNetV3-yolo, CNN, RNN and CTC models to determine the winning situation, and provide detailed winning information automatically push to achieve automation Query and manage.
It realizes the rapid identification and detailed query of lottery information, solves the problems of inconvenience in obtaining information and untimely inquiry, provides in-depth analysis and management functions of winning history, meets the customized needs of lottery players, and improves the convenience of lottery purchasing experience. and scalability.
Smart Images

Figure CN118503466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer science and deep learning, and in particular to a lottery winning query method and device based on deep learning. Background Art
[0002] Currently, lottery players use the following three methods to check whether their physical lottery tickets have won the prize: manually checking according to the official lottery results; taking the original lottery ticket to a lottery sales outlet and scanning the lottery ticket through a dedicated lottery terminal; or using the official APP application of the lottery center to scan the QR code on the lottery ticket.
[0003] However, all three methods mentioned above have problems such as untimely winning inquiries and unclear winning details. For example, the calculation method of the winning amount, the level of the winning prize, the total number of winning bets (such as multiple bets) and the actual selected numbers (such as the details of the numbers in single or multiple bets) are not reported, which makes lottery players not have a clear understanding of the winning situation and lack a comprehensive understanding of the winning results. In addition, for the first method, there are also problems such as inconvenience in obtaining the lottery results, inconvenience in manually checking the winning information, and some people are prone to mistaking the winning information. For the second method, since there is no effective way to record the contact information of lottery players, physical stores or lottery centers cannot actively notify lottery players of the winning situation. Lottery players need to carry paper lottery tickets for inquiries, and there are also commuting problems, which consumes a lot of time and energy of lottery players, especially for the elderly and disabled. At the same time, the lottery voucher may be lost, damaged or replaced. As for the third approach, since the QR code on the lottery ticket has been encrypted, it must rely on the official system to be recognized, which limits the promotion of APP applications to a certain extent; at the same time, the current official APP application does not have service functions such as automatic notification, and lacks convenience; the lack of effective management methods makes it impossible for lottery players to effectively manage their lottery history records; the lack of in-depth analysis of lottery players' winning history makes it impossible for lottery players to intuitively understand their winning situation; the lack of analysis of winning trends and patterns makes it impossible to effectively formulate lottery purchasing strategies.
[0004] Therefore, although lottery players can obtain lottery winning information by scanning the lottery QR code information through regular offline store ticket verification machines or official APPs, it is difficult to meet the lottery players' customized and diversified needs in daily lottery management. Summary of the invention
[0005] The present invention provides a lottery winning query method and device based on deep learning, which are used to solve the problems existing in the prior art, such as untimely winning query, unclear winning details and difficulty in meeting the customized and diversified needs of lottery players in daily lottery management.
[0006] In a first aspect, the present invention provides a lottery winning query method based on deep learning, comprising:
[0007] Performing a first preprocessing on the lottery ticket image to obtain a corrected lottery ticket image, wherein the first preprocessing includes performing a correction processing on the lottery ticket image;
[0008] Input the modified lottery image into a trained recognition model to obtain first lottery information, wherein the recognition model includes MobileNetV3-yolo, CNN, RNN and CTC, and the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple and additional and betting content;
[0009] checking the first lottery information based on the corrected lottery image, and making adjustments if there is an error in the first lottery information;
[0010] Determining whether the first lottery information is a prize draw;
[0011] If the lottery has not been drawn, classifying the first lottery information as lottery information to be queried;
[0012] If the lottery has been drawn, judging whether the first lottery information has won the lottery based on historical lottery results and winning rules, wherein the historical lottery results include the obtained lottery results of all existing lottery types, and the winning rules include the official winning rules of all existing lottery types;
[0013] If a prize is won, the first lottery information is classified as winning lottery information, and winning information of the first lottery information is analyzed and sent, wherein the winning information includes winning numbers, prize levels, and winning amounts;
[0014] If the lottery ticket does not win, the first lottery ticket information is classified as non-winning lottery ticket information.
[0015] In the above scheme, lottery players only need to provide lottery pictures to quickly identify lottery information, realize automatic lottery winning query, provide detailed winning information and automatically push winning information, which solves the problems of inconvenience for lottery players to obtain information, untimely winning query and unclear winning details. At the same time, the deep learning model can extract more representative and universal features through learning data, so that the recognition model has better generalization ability and can adapt to lottery pictures of different styles and quality; the deep learning model can adaptively adjust the model parameters according to the characteristics and distribution of the data, so as to adapt to changes in different languages, fonts, sizes, etc.; the deep learning model has advantages in processing diverse data and can better cope with the diversity of text and numbers in lottery pictures, including changes in size, color, rotation, etc.; the structure and parameters of the deep learning model can be flexibly adjusted and expanded as needed, and can be optimized for specific recognition tasks, making the recognition model more customizable and scalable.
[0016] Optionally, the training method of the recognition model includes:
[0017] For each lottery type, a plurality of second lottery information are randomly generated and filled with blank lottery pictures to generate a first fake lottery picture set, wherein the blank lottery picture is obtained by selecting a real lottery picture from the first real lottery picture set and removing the second lottery information, and the second lottery information includes the first lottery information except the lottery type;
[0018] Performing a second preprocessing on the first fake lottery picture set to obtain a second fake lottery picture set, wherein the second preprocessing includes performing complex processing on the first fake lottery picture set;
[0019] Performing the first preprocessing on the first real lottery picture set to obtain a second real lottery picture set;
[0020] Respectively marking the first lottery information of the second fake lottery picture set and the second real lottery picture set to generate marking data;
[0021] The recognition model is trained based on the second fake lottery picture set and its annotated data and the second real lottery picture set and its annotated data.
[0022] In the above scheme, using empty lottery pictures to generate the first fake lottery picture set and performing a second preprocessing on the first fake lottery picture set can increase the complexity of the training samples and the accuracy of model recognition; at the same time, the recognition model learns a large number of lottery pictures through the training process, thereby improving the accuracy and speed of recognizing lottery information.
[0023] Optionally, the first preprocessing, the randomly generating a plurality of second lottery information and filling in blank lottery pictures to generate a first fake lottery picture set, and the second preprocessing are implemented based on OpenCV.
[0024] In the above solution, the overall quality of lottery pictures is improved by using OpenCV to provide mature and rich image processing and computer vision algorithms.
[0025] Optionally, also include:
[0026] Obtaining the lottery results of the day, wherein the lottery results of the day include the lottery results of all lottery types drawn on the day;
[0027] When the lottery information to be queried exists, judging whether each lottery information to be queried has won a prize based on the lottery result of the day and the winning rules;
[0028] If the prize is won, the winning lottery information to be queried is classified as winning lottery information, and the winning information of the winning lottery information to be queried is analyzed and sent;
[0029] If no prize is won, the non-winning lottery information to be queried will be classified as non-winning lottery information.
[0030] In the above scheme, the automatic acquisition of the lottery results of the day and the automatic winning query of the lottery information to be queried are realized.
[0031] Optionally, the lottery results for the day are crawled from a reliable source by a web crawler.
[0032] In a second aspect, the present invention provides a lottery winning query device based on deep learning, comprising:
[0033] An acquisition module is used to acquire lottery pictures, where the lottery pictures are acquired by photographing or from a photo album;
[0034] The identification module is used to identify the first lottery information, including:
[0035] Performing a first preprocessing on the lottery image to obtain a revised lottery image, wherein the first preprocessing includes performing a revision process on the lottery image; inputting the revised lottery image into a trained recognition model to obtain the first lottery information, wherein the recognition model includes MobileNetV3-yolo, CNN, RNN and CTC, and the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple and additional and betting content; checking the first lottery information based on the revised lottery image, and adjusting the first lottery information if there is an error;
[0036] A query module, used to query whether the first lottery information has won a prize, including:
[0037] For the first lottery information: determine whether the first lottery information is a prize draw; if not, classify the first lottery information as lottery information to be queried; if it is a prize draw, determine whether the first lottery information is a prize winner based on historical prize draw results and prize-winning rules, the historical prize draw results include prize draw results of all existing lottery types that have been obtained, and the prize-winning rules include official prize-winning rules of all existing lottery types; if a prize is won, classify the first lottery information as prize-winning lottery information, analyze the prize-winning information of the first lottery information, the prize-winning information includes the winning number, prize level and prize amount; if a prize is not won, classify the first lottery information as non-winning lottery information;
[0038] For the lottery information to be queried: obtaining the lottery result of the day, the lottery result of the day includes the lottery results of all lottery types drawn on the day; when the lottery information to be queried exists, judging whether each lottery information to be queried has won a prize based on the lottery result of the day and the winning rules; if it has won a prize, classifying the winning lottery information to be queried as the winning lottery information, and analyzing the winning information of the winning lottery information to be queried; if it has not won a prize, classifying the unwinning lottery information to be queried as the unwinning lottery information;
[0039] A storage module, used to store the historical lottery results, the lottery results of the day, the first lottery information, the revised lottery picture and the winning information, wherein the first lottery information is stored in the form of structured data;
[0040] The notification module is used to send the winning information.
[0041] Optionally, also include:
[0042] Management module, used to manage the historical first lottery information and historical winning information;
[0043] The analysis module is used to collect statistics and analyze historical winning information and the historical lottery results, and provide lottery purchase suggestions.
[0044] In the above solution, electronic management of paper lottery tickets is realized, the problem of difficult management of historical lottery tickets is solved, and personalized number selection suggestions can be provided through statistics and analysis.
[0045] Optionally, also include:
[0046] The outlet module is used to manage the information of lottery sales outlets, evaluate the lottery sales outlets and share the evaluations.
[0047] In the above scheme, the management of sales outlets provides lottery players with a smart and convenient lottery purchasing experience.
[0048] In a third aspect, the present invention provides a computing device, comprising:
[0049] A memory for storing program instructions;
[0050] The processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.
[0051] In a fourth aspect, the present invention provides a computer-readable non-volatile storage medium, characterized in that it includes computer-readable instructions, and when a computer reads and executes the computer-readable instructions, the computer executes any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A flowchart of a lottery winning query method based on deep learning provided by an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of a lottery ticket provided by an embodiment of the present invention;
[0055] Figure 3 A schematic diagram of an empty lottery ticket provided by an embodiment of the present invention;
[0056] Figure 4 A flowchart of another lottery winning query method based on deep learning provided by an embodiment of the present invention;
[0057] Figure 5 A schematic diagram of the structure of a lottery winning query device based on deep learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] It should be noted that the terms "first", "second" etc. involved in the documents of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in a sequence other than the content illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0060] Figure 1 The present invention provides a flowchart of a lottery winning query method based on deep learning, which includes:
[0061] S101, performing a first preprocessing on the lottery ticket image to obtain a corrected lottery ticket image.
[0062] Specifically, the first preprocessing includes correcting the lottery ticket image, and the first preprocessing will improve the accuracy of lottery ticket image recognition.
[0063] In one example, the first preprocessing includes at least one of correction, fill light, Gaussian noise removal and Gaussian blur removal. Correction includes straightening, resizing and cropping.
[0064] In one example, the first preprocessing is implemented based on OpenCV.
[0065] S102, inputting the corrected lottery ticket image into the trained recognition model to obtain the first lottery ticket information.
[0066] Specifically, the recognition models include MobileNetV3-yolo, CNN, RNN and CTC, among which:
[0067] MobileNetV3-yolo and CNN normalize the height and width of lottery pictures to 48 and 192;
[0068] Since it is necessary to identify the text information in the lottery picture, CNN can be used to extract features from the input lottery picture, locate the area where the text information is located, and obtain the feature map;
[0069] Since lottery pictures usually contain multiple lines of text information, it is necessary to identify the sequence data of each line in the lottery picture. RNN can be used to identify and integrate the sequence to obtain the character sequence feature map;
[0070] Since the recognized text information needs to be further semantically interpreted in order to identify the first lottery information, etc., CTC can be used to map the character sequence feature map to the final Label sequence. Label is the identifier corresponding to the feature character sequence, that is, a pointer to the feature character sequence. When recognizing the image content, the content of the corresponding feature character sequence will be found according to the Label.
[0071] Specifically, the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple, and additional betting content.
[0072] Take the lottery type lottery as an example. Figure 2 The main information of the lottery ticket is shown in detail, including lottery type 1, lottery issue number 2, prize draw date 3, prize redemption serial number 4, prize redemption password 5, lottery random code 6, betting method 7, betting multiples and additional 8, betting amount 9 and betting content 10.
[0073] In one example, the training method of the recognition model includes:
[0074] For each lottery type, multiple second lottery information are randomly generated and filled with empty lottery pictures to generate a first fake lottery picture set. The empty lottery picture is obtained by selecting a real lottery picture from the first real lottery picture set and removing the second lottery information. The second lottery information includes the first lottery information except the lottery type. When filling in, the original font, coordinates, length and width of the empty lottery picture need to be considered. Taking the lottery type as an example, Figure 3 A blank lottery picture is shown, wherein, in order to improve the authenticity of the first fake lottery picture set, the second lottery information removed from the blank lottery picture also includes an attached Figure 2 The prize redemption serial number 4, prize redemption password 5, lottery random code 6 and bet amount 9;
[0075] The second preprocessing is performed on the first fake lottery picture set to obtain the second fake lottery picture set, the second preprocessing includes performing complex processing on the first fake lottery picture set. In one example, the second preprocessing includes at least one of random flipping, random cropping, random rotation, Gamma brightness conversion, random salt and pepper noise, random Gaussian noise, random Gaussian blur and color jitter. The first fake lottery picture set is generated by using an empty lottery picture and the second preprocessing is performed on the first fake lottery picture set, which can increase the complexity of the training samples and the accuracy of the model recognition. It is difficult to meet the complexity requirements of the sample training if only real lottery pictures are relied on;
[0076] Performing a first preprocessing on the first real lottery picture set to obtain a second real lottery picture set, wherein the first preprocessing can achieve better labeling and recognition effects on the first real lottery picture set;
[0077] The first lottery information of the second fake lottery picture set and the second real lottery picture set are respectively labeled to generate labeled data. The labeling can be achieved through labeling tools. Commonly used labeling tools include Label Studio, LabelImg, Labelme, VGG Image Annotator and RectLabel. Among them, Label Studio is a semi-automatic labeling tool. Based on Label Studio, the labeling position can be manually selected and the labeling information can be input, and the labeling data can be automatically exported in batches. After the lottery pictures are input into Label Studio, the lottery pictures can be classified at the pixel level, and segmentation masks can be automatically generated. Then, the generated masks are fine-tuned to obtain accurate semantic segmentation annotations and the coordinates of the lower left corner and upper right corner of the rectangular box where the lottery information is located;
[0078] The recognition model is trained based on the second fake lottery picture set and its annotated data and the second real lottery picture set and its annotated data.
[0079] The recognition model learned a large number of lottery pictures through the training process, which improved the accuracy and speed of recognizing lottery information.
[0080] In one example, a plurality of second lottery information are randomly generated and blank lottery pictures are filled in respectively to generate a first fake lottery picture set and the second preprocessing is implemented based on OpenCV.
[0081] S103, checking the first lottery information based on the corrected lottery image, and making adjustments if there is an error in the first lottery information.
[0082] By checking and adjusting the first lottery information, the accuracy and reliability of the first lottery information can be ensured.
[0083] S104, determining whether the first lottery information is a prize draw.
[0084] In one example, whether a prize is drawn is determined based on a prize drawing date in the first lottery information.
[0085] S105: If the lottery has not been drawn, classify the first lottery information as lottery information to be queried.
[0086] S106: If the lottery has been drawn, determine whether the first lottery information has won the lottery based on historical lottery results and winning rules.
[0087] Specifically, the historical lottery results include the lottery results of all existing lottery types that have been obtained, and the winning rules include the official winning rules of all existing lottery types. The lottery results include the lottery issue number, lottery date, and lottery number.
[0088] Taking the lottery as an example, all betting combinations are calculated according to the betting method 7 and the betting content 10, and whether the prize is won is determined based on the historical lottery results, the winning rules and all the betting combinations.
[0089] S107, if the lottery is won, classify the first lottery information as winning lottery information, analyze and send the winning information of the first lottery information.
[0090] Specifically, the winning information includes the winning number, prize level and winning amount.
[0091] Taking the lottery as an example, based on the historical lottery results, winning rules and all betting combinations, the winning number and prize level will be obtained when judging whether the prize is won. The winning amount will be calculated by combining the betting multiplier and the additional 8. Lottery players can learn about their winning situation in a timely manner based on the winning information they receive.
[0092] In one example, the winning information also includes betting method, betting multiples, and additional betting content.
[0093] S108: If the lottery ticket does not win, the first lottery ticket information is classified as non-winning lottery ticket information.
[0094] Furthermore, if Figure 4 As shown, a lottery winning query method based on deep learning provided by an embodiment of the present invention also includes:
[0095] S201, obtaining the lottery results of the day.
[0096] Specifically, the lottery results of the day include the lottery results of all lottery types drawn on the day.
[0097] In one example, the lottery results for the day are retrieved from reliable sources using a web crawler that uses three selectors: regular expressions, XPath, and CSS. Reliable sources include official lottery websites or other trustworthy sources.
[0098] S202: When there is lottery information to be queried, determine whether each lottery information to be queried has won the prize based on the lottery result and winning rules of the day.
[0099] It should be noted that there may be multiple lottery information to be queried.
[0100] S203, if the prize is won, classify the winning lottery information to be queried as the winning lottery information, analyze and send the winning information of the winning lottery information to be queried.
[0101] S204: If the lottery ticket does not win, the lottery ticket information to be queried that does not win the lottery is classified as non-winning lottery ticket information.
[0102] In the above scheme, the automatic acquisition of the lottery results of the day and the automatic winning query of the lottery information to be queried are realized.
[0103] Based on the same technical concept, Figure 5 A structural schematic diagram of a lottery winning query device based on deep learning provided in this embodiment is shown, including an acquisition module, an identification module, a query module, a storage module, and a notification module.
[0104] The acquisition module is used to acquire lottery pictures, which are acquired by shooting or from a photo album.
[0105] The identification module is used to identify the first lottery information, including:
[0106] A first preprocessing is performed on the lottery image to obtain a corrected lottery image, wherein the first preprocessing includes correcting the lottery image; the corrected lottery image is input into a trained recognition model to obtain first lottery information, wherein the recognition model includes MobileNetV3-yolo, CNN, RNN and CTC, and the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple and additional and betting content; the first lottery information is checked based on the corrected lottery image, and adjustments are made when errors are found in the first lottery information.
[0107] In one example, adjusting the first lottery information may be achieved by manually adjusting or reacquiring a lottery image.
[0108] The query module is used to query whether the first lottery information has won the prize, including:
[0109] For the first lottery information: determine whether the first lottery information is a prize draw; if not, classify the first lottery information as lottery information to be queried; if it is a prize draw, determine whether the first lottery information is a prize winner based on historical prize draw results and winning rules, the historical prize draw results include the prize draw results of all existing lottery types that have been obtained, and the winning rules include the official winning rules of all existing lottery types; if it is a prize winner, classify the first lottery information as a prize winner lottery information, analyze the winning information of the first lottery information, the winning information includes the winning number, prize level and winning amount; if it is not a prize winner, classify the first lottery information as a non-winning lottery information;
[0110] For the lottery information to be queried: obtain the lottery results of the day, which include the lottery results of all lottery types drawn on the day; when there is lottery information to be queried, determine whether each lottery information to be queried has won the prize based on the lottery results of the day and the winning rules; if it has won the prize, classify the winning lottery information to be queried as the winning lottery information, and analyze the winning information of the winning lottery information to be queried; if it has not won the prize, classify the non-winning lottery information to be queried as the non-winning lottery information.
[0111] The storage module is used to store historical lottery results, current lottery results, first lottery information, revised lottery pictures and winning information, and the first lottery information is stored in the form of structured data.
[0112] In one example, the structured data is presented in the form of a table, and the table header includes lottery type, lottery issue number, lottery draw date, betting method, betting multiple, and additional and betting content.
[0113] The notification module is used to send winning information.
[0114] Furthermore, the lottery winning query device based on deep learning provided in this embodiment also includes a management module and an analysis module.
[0115] The management module is used for the historical first lottery information and historical winning information. The management module provides search, sorting and filtering functions, so that lottery players can view and manage their lottery purchase records and winning records at any time. Lottery players can also delete expired lottery information according to the validity period of the lottery.
[0116] The analysis module is used to collect statistics and analyze historical winning information and historical lottery results, and provide lottery purchase suggestions. The analysis module allows lottery players to view statistical charts and heat maps of historical winning information and historical lottery results, analyze the winning frequency and distribution of different numbers, help lottery players understand the winning trends and patterns of the lottery, and provide lottery players with lottery purchase suggestions.
[0117] Furthermore, the lottery winning query device based on deep learning provided in this embodiment also includes a network module.
[0118] The outlet module is used to manage the information of lottery sales outlets, evaluate lottery sales outlets, and share evaluations. The information of sales outlets includes location, business hours, and contact information. Lottery players can judge the service level of sales outlets based on the evaluations to improve their experience.
[0119] In one example, a lottery winning query device based on deep learning provided by an embodiment of the present invention is implemented in the form of an APP. The lottery picture is taken through the scan function in the APP. It is necessary to ensure that the lottery is in the scanning box and is clearly visible before taking a photo. The APP provides a lottery information verification interface. After the user takes the photo, the lottery information verification interface will display the first lottery information. The user can confirm whether the first lottery information is correct. If it is incorrect, you can choose to make manual adjustments or take a new photo. When sending the winning information, the APP first sends the winning information to the message release queue, and then sends it to the lottery player's receiving device through various methods such as SMS, WeChat, email, APP message prompts, lottery announcements or lottery purchase advertisements.
[0120] The user's personal privacy is protected in the form of an APP. There is no need to send the user's lottery information to the management center to prevent the leakage of personal lottery information. The edge computing capabilities and user terminal computing power are fully utilized to identify lottery information, reduce the computing power share of the management center, and solve the problem of insufficient computing power on the server side.
[0121] Based on the same technical concept, an embodiment of the present invention provides a computing device, including:
[0122] A memory for storing program instructions;
[0123] The processor is used to call the program instructions stored in the memory and execute the above method according to the obtained program.
[0124] Based on the same technical concept, an embodiment of the present invention provides a computer-readable non-volatile storage medium, including computer-readable instructions. When a computer reads and executes the computer-readable instructions, the computer executes the above method.
[0125] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0128] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0129] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A lottery winning query method based on deep learning, characterized in that: Implemented in the form of APP, including: Performing a first preprocessing on the lottery ticket image to obtain a corrected lottery ticket image, wherein the first preprocessing includes performing a correction processing on the lottery ticket image; Input the modified lottery image into a trained recognition model to obtain first lottery information, wherein the recognition model includes MobileNetV3-yolo, CNN, RNN and CTC, wherein the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple and additional and betting content, wherein the MobileNetV3-yolo and the CNN are used for normalizing height and width, the CNN is used for feature extraction, the RNN is used for sequence recognition, and the CTC is used for semantic interpretation; checking the first lottery information based on the corrected lottery image, and making adjustments if there is an error in the first lottery information; Determining whether the first lottery information is a prize draw; If the lottery has not been drawn, classifying the first lottery information as lottery information to be queried; If the lottery has been drawn, judging whether the first lottery information has won the lottery based on historical lottery results and winning rules, wherein the historical lottery results include the obtained lottery results of all existing lottery types, and the winning rules include the official winning rules of all existing lottery types; If a prize is won, the first lottery information is classified as winning lottery information, and winning information of the first lottery information is analyzed and sent, wherein the winning information includes winning numbers, prize levels, and winning amounts; If no prize is won, classifying the first lottery information as non-winning lottery information; The training method of the recognition model includes: For each lottery type, a plurality of second lottery information are randomly generated and filled with blank lottery pictures to generate a first fake lottery picture set, wherein the blank lottery picture is obtained by selecting a real lottery picture from the first real lottery picture set and removing the second lottery information, and the second lottery information includes the first lottery information except the lottery type; Performing a second preprocessing on the first fake lottery picture set to obtain a second fake lottery picture set, wherein the second preprocessing includes performing complex processing on the first fake lottery picture set; Performing the first preprocessing on the first real lottery picture set to obtain a second real lottery picture set; Respectively marking the first lottery information of the second fake lottery picture set and the second real lottery picture set to generate marking data; The recognition model is trained based on the second fake lottery picture set and its annotated data and the second real lottery picture set and its annotated data.
2. The method according to claim 1, characterized in that: The first preprocessing, the randomly generating multiple second lottery information and filling in blank lottery pictures to generate a first fake lottery picture set, and the second preprocessing are implemented based on OpenCV.
3. The method according to claim 1, characterized in that: Also includes: Obtaining the lottery results of the day, wherein the lottery results of the day include the lottery results of all lottery types drawn on the day; When the lottery information to be queried exists, judging whether each lottery information to be queried has won a prize based on the lottery result of the day and the winning rules; If the prize is won, the winning lottery information to be queried is classified as winning lottery information, and the winning information of the winning lottery information to be queried is analyzed and sent; If there is no prize winning, the non-winning lottery information to be queried will be classified as non-winning lottery information.
4. The method according to claim 3, characterized in that: The lottery results for the day are crawled from reliable sources via a web crawler.
5. A lottery winning query device based on deep learning, characterized in that: Implemented in the form of APP, including: An acquisition module is used to acquire lottery pictures, where the lottery pictures are acquired by photographing or from a photo album; The identification module is used to identify the first lottery information, including: Performing a first preprocessing on the lottery image to obtain a corrected lottery image, wherein the first preprocessing includes performing a correction process on the lottery image; inputting the corrected lottery image into a trained recognition model to obtain the first lottery information, wherein the recognition model includes MobileNetV3-yolo, CNN, RNN and CTC, wherein the first lottery information includes lottery type, lottery issue number, lottery opening date, betting method, betting multiple and additional and betting content, wherein the MobileNetV3-yolo and the CNN are used for normalizing height and width, the CNN is used for feature extraction, the RNN is used for sequence recognition, and the CTC is used for semantic interpretation; checking the first lottery information based on the corrected lottery image, and making adjustments when there is an error in the first lottery information; The training method of the recognition model includes: For each lottery type, a plurality of second lottery information are randomly generated and filled with blank lottery pictures to generate a first fake lottery picture set, wherein the blank lottery picture is obtained by selecting a real lottery picture from the first real lottery picture set and removing the second lottery information, and the second lottery information includes the first lottery information except the lottery type; Performing a second preprocessing on the first fake lottery picture set to obtain a second fake lottery picture set, wherein the second preprocessing includes performing complex processing on the first fake lottery picture set; Performing the first preprocessing on the first real lottery picture set to obtain a second real lottery picture set; Respectively marking the first lottery information of the second fake lottery picture set and the second real lottery picture set to generate marking data; Training the recognition model based on the second fake lottery picture set and its annotated data and the second real lottery picture set and its annotated data; A query module, used to query whether the first lottery information has won a prize, including: For the first lottery information: determine whether the first lottery information is a prize draw; if not, classify the first lottery information as lottery information to be queried; if it is a prize draw, determine whether the first lottery information is a prize winner based on historical prize draw results and prize-winning rules, the historical prize draw results include prize draw results of all existing lottery types that have been obtained, and the prize-winning rules include official prize-winning rules of all existing lottery types; if a prize is won, classify the first lottery information as prize-winning lottery information, analyze the prize-winning information of the first lottery information, the prize-winning information includes the winning number, prize level and prize amount; if a prize is not won, classify the first lottery information as non-winning lottery information; For the lottery information to be queried: obtaining the lottery result of the day, the lottery result of the day includes the lottery results of all lottery types drawn on the day; when the lottery information to be queried exists, judging whether each lottery information to be queried has won a prize based on the lottery result of the day and the winning rules; if it has won a prize, classifying the winning lottery information to be queried as the winning lottery information, and analyzing the winning information of the winning lottery information to be queried; if it has not won a prize, classifying the unwinning lottery information to be queried as the unwinning lottery information; A storage module, used to store the historical lottery results, the lottery results of the day, the first lottery information, the revised lottery picture and the winning information, wherein the first lottery information is stored in the form of structured data; The notification module is used to send the winning information.
6. The device according to claim 5, characterized in that: Also includes: Management module, used to manage the historical first lottery information and historical winning information; The analysis module is used to collect statistics and analyze historical winning information and the historical lottery results, and provide lottery purchase suggestions.
7. The device according to claim 5, characterized in that Also includes: The outlet module is used to manage the information of lottery sales outlets, evaluate the lottery sales outlets and share the evaluations.
8. A computing device, characterized in that include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 4 according to the obtained program.
9. A computer-readable non-volatile storage medium, characterized in that: The method comprises computer-readable instructions, and when a computer reads and executes the computer-readable instructions, the computer executes the method according to any one of claims 1 to 4.
