Information display method and device for lottery-drawing turntable
By processing the award description information of the lottery turntable in the background management system, the front-end application only obtains the rotary background and pointer pictures, and crops and loads the prize pictures based on the description information, solving the problems of slow loading speed and high traffic consumption of the lottery turntable, realizing the A more efficient loading process.
Patent Information
- Application Number
- CN202411037375.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-06
AI Technical Summary
The existing raffle turntables loaded when loading contains a large number of awards, resulting in front-end applications requiring a large number of images to consume a lot of traffic and reduce loading speed.
By storing turntable pictures and award description information in the background management system, the front-end application only obtains the turntable background and pointer pictures from the file server, and trims and processes them based on the award description information, determines the center angle and arrangement order of the award pictures to load and display Turntable background, awards and pointer pictures.
Effectively reduces the traffic required by front-end applications to load the lottery turntable, improves loading efficiency, and simplifies the process of updating the lottery turntable, reducing labor costs.
Smart Images

Figure CN119088994A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for displaying information on a lottery wheel. Background Art
[0002] With the continuous development of Internet technology, many offline marketing activities have moved online. In order to enhance the user's interactive experience, many small games have been launched to promote activities. Among them, the wheel lottery interaction is the most common marketing strategy.
[0003] At present, the background image of the lucky draw wheel, multiple prize images and pointer images corresponding to the lucky draw wheel are usually stored in the file server in advance. When the front-end application needs to load the lucky draw wheel, the front-end application requests the background image of the lucky draw wheel, multiple prize images and pointer images corresponding to the lucky draw wheel from the file server. The more prizes the lucky draw wheel contains, the more prize images corresponding to the lucky draw wheel, and the more images the front-end application needs to request from the file server, resulting in more traffic consumed by the front-end application to load the lucky draw wheel; and requesting a large number of images from the file server will also cause the front-end application to load the lucky draw wheel more slowly. Summary of the invention
[0004] The embodiments of the present application provide a method and device for displaying information of a lottery wheel, the main purpose of which is to reduce the traffic consumed by the front-end application to load the lottery wheel when the lottery wheel contains a large number of prizes, thereby improving the efficiency of the front-end application to load the lottery wheel.
[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, the present application provides a method for displaying information on a lottery wheel, the method being applied to a front-end application, the method comprising:
[0007] Obtaining a turntable image and a pointer image from a file server according to a request to load a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes;
[0008] Request the backend management system for award description information corresponding to each award;
[0009] Crop the turntable image according to the multiple award description information to obtain a turntable background image and multiple award images;
[0010] Determine the center angle and arrangement order corresponding to each of the award pictures;
[0011] The turntable background image, the multiple award images and the pointer image are loaded and displayed according to the central angle and arrangement order corresponding to each award image.
[0012] In a second aspect, the present application further provides a device for displaying information on a lottery wheel, the device being applied to a front-end application, the device comprising:
[0013] An acquisition unit, configured to acquire a turntable image and a pointer image from a file server according to a request for loading a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes;
[0014] A request unit, used to request award description information corresponding to each award from the background management system;
[0015] A cropping unit, used for cropping the turntable image according to the plurality of award description information to obtain a turntable background image and a plurality of award images;
[0016] A determination unit, used to determine the center angle and arrangement order corresponding to each of the award pictures;
[0017] A loading unit is used to load and display the turntable background image, multiple award images and the pointer image according to the central angle and arrangement order corresponding to each award image.
[0018] In a third aspect, an embodiment of the present application provides a storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the information display method of the lottery wheel described in the first aspect.
[0019] In a fourth aspect, an embodiment of the present application provides an information display device for a lottery wheel, the device comprising a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the information display method for the lottery wheel described in the first aspect is executed.
[0020] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:
[0021] The present application provides a method and device for displaying information of a lottery turntable. The present application enables the staff on the backend management system side to upload the turntable image, pointer image and prize description information corresponding to each prize contained in the turntable image corresponding to the lottery turntable to the backend management system, and the backend management system stores the turntable image and pointer image corresponding to the lottery turntable in the file server, and stores the prize description information corresponding to each prize in the local storage space. When the user clicks the link corresponding to the lottery page in the process of using the front-end application, the front-end application obtains the turntable image and pointer image corresponding to the lottery turntable contained in the lottery page from the file server according to the request to load the lottery page, and requests the prize description information corresponding to each prize from the backend management system, and crops the turntable image according to the multiple prize description information to obtain the turntable background image and multiple prize images; after determining the center angle and arrangement order corresponding to each prize image, the lottery page is loaded, and in the process of loading the lottery page, the turntable background image, multiple prize images and pointer image are loaded and displayed according to the center angle and arrangement order corresponding to each prize image, thereby realizing the loading of the lottery turntable in the lottery page. Because, in the present application, the front-end application only needs to obtain the turntable image and pointer image containing the turntable background and multiple prizes from the file server, and obtain the award description information corresponding to each award from the background management system, and then the lottery turntable can be loaded in the lottery page based on the turntable image, pointer image and multiple award description information, that is, only two pictures need to be obtained from the file server to load the lottery turntable. Compared with the prior art, the present application can effectively reduce the traffic consumed by the front-end application to load the lottery turntable, and improve the efficiency of the front-end application in loading the lottery turntable.
[0022] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0024] Figure 1 A flow chart of a method for displaying information on a lottery wheel provided in an embodiment of the present application is shown;
[0025] Figure 2 A schematic diagram of a turntable picture provided in an embodiment of the present application is shown;
[0026] Figure 3 A flow chart of another method for displaying information on a lottery wheel provided in an embodiment of the present application is shown;
[0027] Figure 4 A block diagram showing a composition of an information display device for a lottery wheel provided in an embodiment of the present application is shown;
[0028] Figure 5 A block diagram showing the composition of another lottery wheel information display device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0030] In addition, the words “first”, “second” and the like used in the present application do not indicate any order, quantity or importance, but are only used to distinguish different parts.
[0031] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0032] At present, the turntable background image, multiple prize images and pointer images corresponding to the lottery turntable are usually stored in the file server in advance. When the front-end application needs to load the lottery turntable, the front-end application requests the turntable background image, multiple prize images and pointer images corresponding to the lottery turntable from the file server.
[0033] However, since the more prizes a lottery wheel contains, the more prize images corresponding to the lottery wheel will be. Therefore, when the lottery wheel needs to be loaded, the front-end application needs to request more images from the file server. For example, lottery wheel A contains 10 prizes: prize a, prize b, prize c..., then there are 10 prize images corresponding to lottery wheel A. When lottery wheel A needs to be loaded, the front-end application needs to request 10 prize images from the file server. Lottery wheel B contains 12 prizes: prize a, prize b, prize c..., then there are 12 prize images corresponding to lottery wheel B. When lottery wheel B needs to be loaded, the front-end application needs to request 12 prize images from the file server, resulting in more traffic consumed by the front-end application to load the lottery wheel. In addition, it takes a long time for the front-end application to request a large number of images from the file server, which will cause the front-end application to load the lottery wheel at a slower speed.
[0034] Therefore, when the lucky draw wheel contains a large number of prizes, in order to reduce the traffic consumed by the front-end application to load the lucky draw wheel and improve the efficiency of the front-end application loading the lucky draw wheel, the embodiment of the present application provides a lucky draw wheel information display method, which is applied to the front-end application, such as Figure 1 As shown, the method includes:
[0035] 101. Obtain a turntable image and a pointer image from a file server according to a request for loading a lottery page.
[0036] Among them, the lottery picture and pointer picture are the pictures corresponding to the lottery wheel that needs to be loaded in the lottery page. The wheel picture includes the wheel background and multiple awards, such as Figure 2 As shown, the turntable image includes a turntable background and 8 awards (Award A, Award B, Award C...), and the area where each award is located is fan-shaped; among them, Figure 2 This is merely an illustrative example. The embodiment of the present application does not specifically limit the number of multiple prizes included in the turntable image, and does not specifically limit the pattern content corresponding to each prize in the turntable image.
[0037] In the embodiment of the present application, the execution entity in each step is a front-end application running in the target terminal device, wherein the front-end application may be but is not limited to: a browser, a shopping application, a food delivery application, etc., an application with interactive requirements for a wheel lottery, and the target terminal device may be but is not limited to: a computer, a smart phone, a tablet computer, etc.
[0038] After the UI design staff completes the design of the lottery page, they will send the turntable image and pointer image corresponding to the lottery turntable that needs to be loaded in the lottery page to the staff on the backend management system side; after receiving the turntable image and pointer image, the staff on the backend management side needs to analyze the turntable image to determine the center angle corresponding to each prize contained in the turntable image, the index corresponding to each prize, the winning probability corresponding to each prize, etc., to obtain the prize description information corresponding to each prize, and upload the turntable image, pointer image and prize description information corresponding to the lottery turntable to the backend management system, where, for any prize, the center angle corresponding to the prize is the center angle corresponding to the sector area where the prize is located in the turntable image, and for any prize, the index corresponding to the prize can indicate its arrangement order in the turntable image, so as to obtain the prize description information corresponding to each prize. Figure 2 Taking the shown turntable picture as an example, the index corresponding to prize a is 1, the index corresponding to prize b is 2, the index corresponding to prize c is 3... the index corresponding to prize h is 8, the arrangement order of prize a in the turntable picture is 1, the arrangement order of prize b in the turntable picture is 2...; after receiving the turntable picture, pointer picture and prize description information corresponding to the lottery turntable, the backend management system will store the turntable picture and pointer picture corresponding to the lottery turntable in the file server, and store the prize description information corresponding to each prize in the local storage space or database.
[0039] When the user uses the front-end application, when the user clicks on the link corresponding to the lottery page, the front-end application will receive a request to load the lottery page. At this time, the front-end application needs to obtain the turntable image and pointer image corresponding to the lottery turntable contained in the lottery page from the file server according to the request to load the lottery page.
[0040] 102. Request the award description information corresponding to each award from the background management system.
[0041] After the front-end application obtains the wheel image and pointer image corresponding to the lottery wheel from the file server according to the request to load the lottery page, it will request the prize description information corresponding to each prize contained in the wheel image from the back-end management system.
[0042] 103. Crop the turntable image according to the multiple award description information to obtain a turntable background image and multiple award images.
[0043] After the front-end application obtains the turntable image, pointer image and the award description information corresponding to each award contained in the turntable image, it can crop the turntable image according to the award description information corresponding to each award (i.e. the center angle and index corresponding to the award), and crop the turntable image into a turntable background image and multiple award images.
[0044] Specifically, in this step, the front-end application may use the clip-path attribute in the CSS (Cascading Style Sheets) language to implement the clipping process of the turntable image according to the multiple award description information, but is not limited thereto.
[0045] 104. Determine the center angle and arrangement order corresponding to each award picture.
[0046] After the front-end application cuts the turntable image into the turntable background image and multiple award images, it needs to determine the center angle and arrangement order corresponding to each award image.
[0047] Specifically, in this step, for any award picture, the center angle corresponding to the award picture can be determined by any one of the following two methods, but not limited to: (1) According to the center angle of the award corresponding to the award picture, the center angle corresponding to the award picture is determined. For example, if the center angle of the award corresponding to the award picture is 30 degrees, the arrangement order corresponding to the award picture is determined to be 30 degrees. If the index of the award corresponding to the award picture is 60 degrees, the arrangement order corresponding to the award picture is determined to be 60 degrees, and so on; (2) Since the award picture is fan-shaped, the center angle corresponding to the award picture can be calculated according to the radius and arc length corresponding to the award picture. For any award picture, the center angle corresponding to the award picture can be determined by any one of the following methods, but not limited to: According to the index of the award corresponding to the award picture, the arrangement order corresponding to the award picture is determined. For example, if the index of the award corresponding to the award picture is 1, the arrangement order corresponding to the award picture is determined to be 1. If the index of the award corresponding to the award picture is 5, the arrangement order corresponding to the award picture is determined to be 5, and so on.
[0048] 105. Load and display the turntable background image, multiple award images and pointer images according to the central angle and arrangement order corresponding to each award image.
[0049] After determining the center angle and arrangement order corresponding to each prize image, the front-end application can load the lottery page. In the process of loading the lottery page, the distribution of multiple prize images in the turntable background image is determined according to the center angle and arrangement order corresponding to each prize image. Then, according to the distribution of multiple prize images in the turntable background image, the turntable background image, multiple prize images and pointer images are loaded and displayed, thereby realizing the loading of the lottery turntable in the lottery page.
[0050] It should be noted that, in the actual application process, when the UI design staff updates the lottery turntable (for example, increase or decrease the number of prizes in the lottery turntable, change the content of a prize in the lottery turntable, etc.), the UI design staff only needs to send the updated turntable image to the staff on the backend management system side, and the staff on the backend management side will re-analyze the updated turntable image to determine the prize description information corresponding to each prize in the updated turntable image, and upload the updated turntable image and the prize description information corresponding to each prize to the backend management system, and the backend management system will use the updated turntable image to replace the historical turntable image stored in the file server, and use the updated prize description information corresponding to each prize to update the locally stored historical prize description information. When the user clicks on the link corresponding to the lottery page, the front-end application executes the method described in steps 101-105 above, and the updated lottery turntable can be loaded on the lottery page. Compared with the prior art, when updating the lottery wheel, the staff needs to update a large amount of logic code of the front-end application to enable the front-end application to load the updated lottery wheel. In the embodiment of the present application, the front-end application can load the updated lottery wheel without modifying the logic code of the front-end application, thereby saving a lot of labor costs.
[0051] The embodiment of the present application provides a method for displaying information of a lottery turntable. The embodiment of the present application enables the staff on the backend management system side to upload the turntable image, pointer image and prize description information corresponding to each prize contained in the turntable image corresponding to the lottery turntable to the backend management system, and the backend management system stores the turntable image and pointer image corresponding to the lottery turntable in the file server, and stores the prize description information corresponding to each prize in the local storage space. When the user clicks the link corresponding to the lottery page in the process of using the front-end application, the front-end application obtains the turntable image and pointer image corresponding to the lottery turntable contained in the lottery page from the file server according to the request to load the lottery page, and requests the prize description information corresponding to each prize from the backend management system, and crops the turntable image according to the multiple prize description information to obtain the turntable background image and multiple prize images; after determining the center angle and arrangement order corresponding to each prize image, the lottery page is loaded, and in the process of loading the lottery page, the turntable background image, multiple prize images and pointer image are loaded and displayed according to the center angle and arrangement order corresponding to each prize image, thereby realizing the loading of the lottery turntable in the lottery page. Because, in the embodiment of the present application, the front-end application only needs to obtain the turntable image and pointer image containing the turntable background and multiple prizes from the file server, and obtain the award description information corresponding to each award from the background management system, and then the lottery turntable can be loaded in the lottery page based on the turntable image, pointer image and multiple award description information, that is, only two images need to be obtained from the file server to load the lottery turntable. Compared with the prior art, the embodiment of the present application can effectively reduce the traffic consumed by the front-end application to load the lottery turntable, and improve the efficiency of the front-end application in loading the lottery turntable.
[0052] To explain in more detail below, the present application embodiment provides another method for displaying information on a lottery wheel, as follows: Figure 3 As shown, the method includes:
[0053] 201. Obtain a turntable image and a pointer image from a file server according to a request for loading a lottery page.
[0054] Among them, regarding step 201, obtaining the turntable image and the pointer image at the file server according to the request to load the lottery page, please refer to Figure 1 The description of the corresponding parts will not be repeated here in the embodiments of the present application.
[0055] 202. Request the background management system for award description information corresponding to each award.
[0056] Regarding step 202, requesting the background management system for award description information corresponding to each award, please refer to Figure 1The description of the corresponding parts will not be repeated here in the embodiments of the present application.
[0057] 203. Crop the turntable image according to the multiple award description information to obtain a turntable background image and multiple award images.
[0058] After obtaining the turntable image, the pointer image, and the award description information corresponding to each award contained in the turntable image, the front-end application can crop the turntable image according to the award description information corresponding to each award (i.e., the center angle and index corresponding to the award), and crop the turntable image into a turntable background image and multiple award images. The following will explain in detail how the front-end application crops the turntable image according to multiple award description information to obtain the turntable background image and multiple award images.
[0059] For any award, the award description information corresponding to the award includes the center angle corresponding to the award and the index corresponding to the award.
[0060] First, the sum of the central angles corresponding to the multiple awards is calculated based on the central angle corresponding to each award recorded in the multiple award description information. Second, it is determined whether the sum of the central angles corresponding to the multiple awards is equal to 360 degrees.
[0061] When it is determined that the sum of the central angles corresponding to multiple awards is equal to 360 degrees, the turntable image is divided according to the central angle and index corresponding to each award to obtain multiple first sector areas. The specific process may be: a rectangular coordinate system is established with the center of the turntable image as the origin, starting with the positive direction of the y-axis of the rectangular coordinate system, and in a clockwise direction, the first first sector area is first divided on the turntable image according to the central angle corresponding to the award with index 1, and the second first sector area is then divided on the turntable image according to the central angle corresponding to the award with index 2... The first first sector area and the second first sector area are divided. The fan-shaped areas are adjacent, the second first fan-shaped area is adjacent to the third first fan-shaped area…; determine whether each first fan-shaped area completely overlaps with the area where the corresponding award is located, that is, determine whether the area where the award with index 1 is located completely overlaps with the first divided first fan-shaped area, determine whether the area where the award with index 2 is located completely overlaps with the second divided first fan-shaped area…; when it is determined that each first fan-shaped area completely overlaps with the area where the corresponding award is located, the turntable image is cropped according to multiple first fan-shaped areas to obtain a turntable background image and multiple award images.
[0062] When it is determined that the sum of the central angles corresponding to multiple awards is not equal to 360 degrees, or any first sector area does not completely overlap with the area where the corresponding award is located, image recognition processing is performed on the turntable image to obtain an image recognition result corresponding to the turntable image, wherein the areas where the various awards in the turntable image are located can be determined based on the image recognition result corresponding to the turntable image; the turntable image is divided according to the image recognition result to obtain multiple second sector areas; it is determined whether each second sector area completely overlaps with the area where the corresponding award is located, that is, it is determined whether the area where the award with index 1 is located completely overlaps with the corresponding second sector area, and it is determined whether the area where the award with index 2 is located completely overlaps with the corresponding second sector area...; if each second sector area completely overlaps with the area where the corresponding award is located, the turntable image is cropped according to the multiple second sector areas to obtain a turntable background image and multiple award images.
[0063] When it is determined that any second sector area does not completely overlap with the area where the corresponding prize is located, the front-end application needs to output and display a preset error message to prompt the user that there is a problem loading the lottery page and that the lottery wheel cannot be used for the lottery temporarily; and an error message needs to be sent to the backend management system so that the staff on the backend management system side can be informed that there are problems with the multiple prize description information corresponding to the lottery picture and that the multiple prize description information needs to be corrected.
[0064] Through the above method, it can be ensured that when there is no problem with the multiple prize description information corresponding to the lottery picture, the front-end application can accurately crop the turntable picture according to the multiple prize description information; when there is a problem with the multiple prize description information corresponding to the lottery picture, the turntable picture is cropped through certain remedial measures; and when the turntable picture cannot be accurately cropped by remedial measures, an error is reported to remind the staff on the backend management system side to correct the multiple prize description information in time, so as to improve the user experience of users using the lottery turntable to draw prizes.
[0065] 204. Determine the center angle and arrangement order corresponding to each award picture.
[0066] It should be noted that when in step 203, the front-end application crops the turntable image according to multiple first fan-shaped areas, the front-end application can use any one of the methods (1) and (2) mentioned in the above step 103 to determine the center angle corresponding to each award image; when in step 204, the front-end application crops the turntable image according to multiple second fan-shaped areas, the front-end application can use the method (2) mentioned in the above step 103 to determine the center angle corresponding to each award image.
[0067] 205. Load and display the turntable background image, multiple award images and pointer images according to the central angle and arrangement order corresponding to each award image.
[0068] After determining the center angle and arrangement order corresponding to each prize image, the front-end application can load the lottery page, and in the process of loading the lottery page, load the display turntable background image, multiple prize images, and pointer images according to the center angle and arrangement order corresponding to each prize image. The following will explain in detail how the front-end application loads the display turntable background image, multiple prize images, and pointer images according to the center angle and arrangement order corresponding to each prize image.
[0069] First, create a container tag div corresponding to each award image; second, add each award image to its corresponding container tag div; third, determine the center angle of each container tag div according to the center angle of each award image, and determine the arrangement order of each container tag div according to the arrangement order of each award image, that is, for any award image, determine the center angle of the award image as the center angle of the container tag div corresponding to the award image, and determine the arrangement order of the award image as the arrangement order of the container tag div corresponding to the award image; third, deploy multiple container tag divs on the turntable background image according to the center angle and arrangement order of each container tag div, and deploy the pointer image at the preset position of the turntable background image; finally, load and display the turntable background image, multiple container tag divs and pointer image.
[0070] Specifically, in this step, the front-end application can use the transform-origin attribute in the CSS language to deploy multiple container tag divs on the turntable background image according to the central angle and arrangement order corresponding to each container tag div, but is not limited to this.
[0071] Furthermore, in an embodiment of the present application, before loading and displaying the turntable background image, multiple container tag divs and pointer image, the front-end application also needs to determine the winning rotation angle corresponding to each container tag div based on the central angle corresponding to each container tag div, the arrangement order and the pointer direction corresponding to the pointer image, wherein, for any container tag div, when the front-end application controls the rotation of multiple container tag divs according to the winning rotation angle corresponding to the container tag div, after the rotation stops, the pointer in the pointer image will point to the container tag div.
[0072] Specifically, in this step, the front-end application can use the rotation function rotate() in the transform attribute of the CSS language to determine the winning rotation angle corresponding to each container tag div according to the center angle corresponding to each container tag div, the arrangement order and the pointer direction corresponding to the pointer image, but is not limited to this.
[0073] 206. After receiving the lottery drawing instruction, control the lottery turntable to draw the lottery.
[0074] After the front-end application loads the lottery page and the lottery turntable, the user can click the lottery button to draw the lottery. After the user clicks the lottery button, the front-end application can receive the lottery instruction. At this time, the front-end application needs to control the lottery turntable to draw the lottery. The specific process is: first, determine the winning container tag div; second, control multiple container tag divs to rotate according to the winning rotation angle corresponding to the winning container tag div, so that when the multiple container tag divs stop rotating, the pointer in the pointer image points to the winning container tag.
[0075] Specifically, in this step, the front-end application can use the transition attribute transition in the CSS language and the rotation function rotate() in the transform attribute to control the rotation of multiple container tag divs according to the winning rotation angle corresponding to the winning container tag div, but is not limited to this.
[0076] Specifically, in this step, for any prize, the prize description information corresponding to the prize also includes the winning probability corresponding to the prize. The front-end application can determine the winning container tag div in any of the following two ways: (1) First, determine the winning probability corresponding to each container tag div according to the winning probability corresponding to each prize, that is, for any prize, determine the winning probability corresponding to the prize as the winning probability of the prize picture corresponding to the prize, and then determine the winning probability corresponding to the prize picture as the winning probability of the container tag div corresponding to the prize picture; secondly, determine the winning container tag according to the preset algorithm and the winning probability corresponding to each container tag div (2) First, send a lottery calculation request to the background management system, so that the background management system determines the winning prize according to the preset algorithm and the winning probability corresponding to each prize, and feeds back the index corresponding to the winning prize; secondly, receive the index corresponding to the winning prize fed back by the background management system; finally, determine the winning container tag div according to the index corresponding to the winning prize, that is, determine the container tag div corresponding to the index of the winning prize as the winning container tag div.
[0077] Specifically, in this step, the specific process of the front-end application controlling the rotation of multiple container tag divs according to the winning rotation angle corresponding to the winning container tag div is as follows: first, obtaining a preset rotation angular velocity or a preset rotation duration; secondly, controlling the rotation of multiple container tag divs according to the preset rotation speed and the winning rotation angle corresponding to the winning container tag div, that is, controlling the rotation of multiple container tag divs by the winning rotation angle according to the preset rotation speed, for example, the preset rotation speed is 1 rad / s, and the winning rotation angle is 760 degrees clockwise, then each container tag div is controlled to rotate 760 degrees clockwise at a rotation speed of 1 rad / s; controlling the rotation of multiple container tag divs according to the preset rotation duration and the winning rotation angle corresponding to the winning container tag div, that is, controlling the rotation of multiple container tag divs by the winning rotation angle according to the preset rotation duration, for example, the preset rotation duration is 5s, and the winning rotation angle is 780 degrees clockwise, then each container tag div is controlled to rotate 780 degrees clockwise according to a rotation duration of 5s.
[0078] Furthermore, in an embodiment of the present application, while the lottery wheel is rotating, the front-end application can also monitor the lottery wheel. When multiple container label divs stop rotating and the pointer in the pointer image points to the winning container label div, the front-end application can output a prompt message to remind the user that he or she has won the prize corresponding to the winning container label div, and after the user closes the prompt message, the multiple easy label divs are controlled to restore to an initial state according to the center angle corresponding to each container label div, so that the user can draw the lottery next time.
[0079] Furthermore, as a response to the above Figure 1 and Figure 3 In order to realize the method shown in the figure, another embodiment of the present application further provides an information display device for a lottery wheel, which is applied to a front-end application. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. This device is used to reduce the traffic consumed by the front-end application to load the lottery wheel, and improve the efficiency of the front-end application to load the lottery wheel. Specifically, Figure 4 As shown, the device comprises:
[0080] The acquisition unit 31 is used to acquire a turntable image and a pointer image from a file server according to a request for loading a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes;
[0081] A request unit 32, configured to request the acquisition unit 31 to acquire the prize description information corresponding to each prize included in the turntable image from the background management system;
[0082] A cropping unit 33 is used to crop the turntable image obtained by the obtaining unit 31 according to the multiple award description information requested by the requesting unit 32, so as to obtain a turntable background image and multiple award images;
[0083] A determination unit 34, used to determine the center angle and arrangement order corresponding to each of the award pictures cropped by the cropping unit 33;
[0084] The loading unit 35 is used to load and display the turntable background image, multiple award images and the pointer image according to the central angle and arrangement order corresponding to each award image determined by the determining unit 34.
[0085] Further, such as Figure 5 As shown, the award description information corresponding to the award includes the central angle corresponding to the award and the index corresponding to the award; the clipping unit 33 includes:
[0086] A judging module 331 is used to judge whether the sum of the central angles corresponding to the multiple awards is equal to 360 degrees;
[0087] The first cropping module 332 is used for, when the judgment module 331 determines that the sum of the central angles corresponding to the multiple awards is equal to 360 degrees, dividing the turntable image according to the central angle and index corresponding to each award to obtain multiple first sector-shaped areas; judging whether each of the first sector-shaped areas completely overlaps with the area where the award is located; if each of the first sector-shaped areas completely overlaps with the area where the award is located, cropping the turntable image according to the multiple first sector-shaped areas to obtain a turntable background image and multiple award images;
[0088] The second cropping module 333 is used to perform image recognition processing on the turntable image to obtain an image recognition result corresponding to the turntable image when the judgment module 331 determines that the sum of the central angles corresponding to the multiple awards is not equal to 360 degrees, or the first cropping module 332 determines that any of the first fan-shaped areas does not completely overlap with the area where the corresponding award is located; divide the turntable image according to the image recognition result to obtain multiple second fan-shaped areas; determine whether each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located; if each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located, crop the turntable image according to the multiple second fan-shaped areas to obtain a turntable background image and multiple award images.
[0089] Further, such as Figure 5 As shown, the cutting unit 33 also includes:
[0090] The error reporting module 334 is used to output and display a preset error message when the second cropping module 333 determines that any of the second fan-shaped areas does not completely overlap with the area where the corresponding award is located; and to send an error message to the background management system so that the staff on the background management system side can be informed that there are problems with multiple award description information and that corrections are required.
[0091] Further, such as Figure 5 As shown, the loading unit 35 includes:
[0092] A creation module 351 is used to create a container label corresponding to each award picture;
[0093] An adding module 352, used to add each of the award pictures to its corresponding container label;
[0094] A first determining module 353 is used to determine the center angle corresponding to each of the container labels according to the center angle corresponding to each of the award pictures, and to determine the arrangement order corresponding to each of the container labels according to the arrangement order corresponding to each of the award pictures;
[0095] A deployment module 354 is used to deploy a plurality of the container labels on the turntable background image according to the central angle and arrangement order corresponding to each of the container labels determined by the first determination module 353; and to deploy the pointer image at a preset position of the turntable background image;
[0096] The loading module 355 is used to load and display the turntable background image, the plurality of container labels and the pointer image.
[0097] Further, such as Figure 5 As shown, the loading unit 35 also includes:
[0098] The second determination module 356 is used to determine the winning rotation angle corresponding to each container label according to the central angle corresponding to each container label, the arrangement order and the pointer direction corresponding to the pointer image before the loading module 355 loads and displays the turntable background image, the multiple container labels and the pointer image.
[0099] Further, such as Figure 5 As shown, the loading unit 35 also includes:
[0100] A third determination module 357 is used to determine a winning container label after the loading module 355 loads and displays the turntable background image, the plurality of container labels and the pointer image, and after receiving a lottery instruction;
[0101] The control module 358 is used to control the plurality of container tags to rotate according to the winning rotation angle corresponding to the winning container tag determined by the third determination module 357, so that when the plurality of container tags stop rotating, the pointer in the pointer image points to the winning container tag.
[0102] Further, such as Figure 5 As shown, the control module 358 is specifically used to obtain a preset rotation angular velocity or a preset rotation duration; control the plurality of container tags to rotate according to the preset rotation speed and the winning rotation angle corresponding to the winning container tag; or control the plurality of container tags to rotate according to the preset rotation duration and the winning rotation angle corresponding to the winning container tag.
[0103] The embodiment of the present application provides a method and device for displaying information of a lottery turntable. The embodiment of the present application enables the staff on the backend management system side to upload the turntable image, pointer image and prize description information corresponding to each prize contained in the turntable image corresponding to the lottery turntable to the backend management system, and the backend management system stores the turntable image and pointer image corresponding to the lottery turntable in the file server, and stores the prize description information corresponding to each prize in the local storage space. When the user clicks the link corresponding to the lottery page in the process of using the front-end application, the front-end application obtains the turntable image and pointer image corresponding to the lottery turntable contained in the lottery page from the file server according to the request to load the lottery page, and requests the prize description information corresponding to each prize from the backend management system, and crops the turntable image according to the multiple prize description information to obtain the turntable background image and multiple prize images; after determining the center angle and arrangement order corresponding to each prize image, the lottery page is loaded, and in the process of loading the lottery page, the turntable background image, multiple prize images and pointer image are loaded and displayed according to the center angle and arrangement order corresponding to each prize image, thereby realizing the loading of the lottery turntable in the lottery page. Because, in the embodiment of the present application, the front-end application only needs to obtain the turntable image and pointer image containing the turntable background and multiple prizes from the file server, and obtain the award description information corresponding to each award from the background management system, and then the lottery turntable can be loaded in the lottery page based on the turntable image, pointer image and multiple award description information, that is, only two images need to be obtained from the file server to load the lottery turntable. Compared with the prior art, the embodiment of the present application can effectively reduce the traffic consumed by the front-end application to load the lottery turntable, and improve the efficiency of the front-end application in loading the lottery turntable.
[0104] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, a device where the storage medium is located is controlled to execute the above-mentioned lottery wheel information display method.
[0105] The storage medium may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0106] An embodiment of the present application also provides an information display device for a lottery wheel, the device comprising a storage medium; and one or more processors, the storage medium is coupled to the processor, the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the above-mentioned information display method for the lottery wheel is executed.
[0107] The embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented:
[0108] Obtaining a turntable image and a pointer image from a file server according to a request to load a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes;
[0109] Request the backend management system for award description information corresponding to each award;
[0110] Crop the turntable image according to the multiple award description information to obtain a turntable background image and multiple award images;
[0111] Determine the center angle and arrangement order corresponding to each of the award pictures;
[0112] The turntable background image, the multiple award images and the pointer image are loaded and displayed according to the central angle and arrangement order corresponding to each award image.
[0113] Further, the award description information corresponding to the award includes the central angle corresponding to the award and the index corresponding to the award; the step of cropping the turntable image according to the plurality of award description information to obtain the turntable background image and the plurality of award images includes:
[0114] Determine whether the sum of the central angles corresponding to the multiple awards is equal to 360 degrees;
[0115] If the sum of the central angles corresponding to the multiple awards is equal to 360 degrees, the turntable image is divided according to the central angle and index corresponding to each award to obtain multiple first sector-shaped areas; it is determined whether each of the first sector-shaped areas completely overlaps with the area where the award is located; if each of the first sector-shaped areas completely overlaps with the area where the award is located, the turntable image is cropped according to the multiple first sector-shaped areas to obtain a turntable background image and multiple award images;
[0116] If the sum of the central angles corresponding to the multiple awards is not equal to 360 degrees, or any of the first fan-shaped areas does not completely overlap with the area where the corresponding award is located, the turntable image is subjected to image recognition processing to obtain an image recognition result corresponding to the turntable image; the turntable image is divided according to the image recognition result to obtain multiple second fan-shaped areas; and it is determined whether each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located; if each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located, the turntable image is cropped according to the multiple second fan-shaped areas to obtain a turntable background image and multiple award images.
[0117] Furthermore, the method further comprises:
[0118] If any of the second sector-shaped areas does not completely overlap with the area where the corresponding award is located, a preset error message is output and displayed;
[0119] An error message is sent to the backend management system so that the staff of the backend management system can be informed that there are problems with the multiple award description information and corrections are required.
[0120] Furthermore, the step of loading and displaying the turntable background image, the plurality of award images and the pointer image according to the central angle and arrangement order corresponding to each award image includes:
[0121] Create a container label corresponding to each of the award images;
[0122] Add each of the award images to its corresponding container label respectively;
[0123] Determine the center angle corresponding to each of the container labels according to the center angle corresponding to each of the award pictures, and determine the arrangement order corresponding to each of the container labels according to the arrangement order corresponding to each of the award pictures;
[0124] Arrange the plurality of container labels on the turntable background image according to the central angle and arrangement order corresponding to each container label;
[0125] Deploy the pointer image at a preset position of the turntable background image;
[0126] The turntable background image, the plurality of container labels and the pointer image are loaded and displayed.
[0127] Furthermore, before loading and displaying the turntable background image, the plurality of container labels and the pointer image, the method further includes:
[0128] The winning rotation angle corresponding to each container label is determined according to the center angle corresponding to each container label, the arrangement order and the pointer direction corresponding to the pointer image.
[0129] Furthermore, after loading and displaying the turntable background image, the plurality of container labels and the pointer image, the method further includes:
[0130] After receiving the lottery instruction, determining the winning container label;
[0131] The plurality of container tags are controlled to rotate according to the winning rotation angle corresponding to the winning container tag, so that when the plurality of container tags stop rotating, the pointer in the pointer picture points to the winning container tag.
[0132] Furthermore, the controlling the plurality of container labels to rotate according to the winning rotation angle corresponding to the winning container label includes:
[0133] Get the preset rotation angular velocity or preset rotation duration;
[0134] The plurality of container tags are controlled to rotate according to the preset rotation speed and the winning rotation angle corresponding to the winning container tag; or the plurality of container tags are controlled to rotate according to the preset rotation duration and the winning rotation angle corresponding to the winning container tag.
[0135] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing program code that initializes the following method steps: obtaining a turntable image and a pointer image at a file server in accordance with a request to load a lottery page, wherein the turntable image includes a turntable background and multiple prizes; requesting award description information corresponding to each of the awards from a background management system; cropping the turntable image in accordance with the multiple award description information to obtain a turntable background image and multiple award images; determining the center angle and arrangement order corresponding to each of the award images; and loading and displaying the turntable background image, multiple award images, and the pointer image in accordance with the center angle and arrangement order corresponding to each of the award images.
[0136] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0137] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0138] 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.
[0139] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0140] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0141] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0142] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0143] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0145] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for displaying information on a lottery wheel, characterized in that: The method is applied to a front-end application, and the method comprises: Obtaining a turntable image and a pointer image from a file server according to a request to load a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes; Request the backend management system for award description information corresponding to each award; Crop the turntable image according to the multiple award description information to obtain a turntable background image and multiple award images; Determine the center angle and arrangement order corresponding to each of the award pictures; The turntable background image, the multiple award images and the pointer image are loaded and displayed according to the central angle and arrangement order corresponding to each award image.
2. The method according to claim 1, characterized in that The award description information corresponding to the award includes the center angle corresponding to the award and the index corresponding to the award; the turntable image is cropped according to the multiple award description information to obtain the turntable background image and multiple award images, including: Determine whether the sum of the central angles corresponding to the multiple awards is equal to 360 degrees; If the sum of the central angles corresponding to the multiple awards is equal to 360 degrees, the turntable image is divided according to the central angle and index corresponding to each award to obtain multiple first sector-shaped areas; it is determined whether each of the first sector-shaped areas completely overlaps with the area where the award is located; if each of the first sector-shaped areas completely overlaps with the area where the award is located, the turntable image is cropped according to the multiple first sector-shaped areas to obtain a turntable background image and multiple award images; If the sum of the central angles corresponding to the multiple awards is not equal to 360 degrees, or any of the first fan-shaped areas does not completely overlap with the area where the corresponding award is located, the turntable image is subjected to image recognition processing to obtain an image recognition result corresponding to the turntable image; the turntable image is divided according to the image recognition result to obtain multiple second fan-shaped areas; and it is determined whether each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located; if each of the second fan-shaped areas completely overlaps with the area where the corresponding award is located, the turntable image is cropped according to the multiple second fan-shaped areas to obtain a turntable background image and multiple award images.
3. The method according to claim 2, characterized in that The method further comprises: If any of the second sector-shaped areas does not completely overlap with the area where the corresponding award is located, a preset error message is output and displayed; An error message is sent to the backend management system so that the staff of the backend management system can be informed that there are problems with the multiple award description information and corrections are required.
4. The method according to claim 1, characterized in that: The step of loading and displaying the turntable background image, the plurality of award images and the pointer image according to the central angle and arrangement order corresponding to each award image comprises: Create a container label corresponding to each of the award images; Add each of the award images to its corresponding container label respectively; Determine the center angle corresponding to each of the container labels according to the center angle corresponding to each of the award pictures, and determine the arrangement order corresponding to each of the container labels according to the arrangement order corresponding to each of the award pictures; Arrange the plurality of container labels on the turntable background image according to the central angle and arrangement order corresponding to each container label; Deploy the pointer image at a preset position of the turntable background image; The turntable background image, the plurality of container labels and the pointer image are loaded and displayed.
5. The method according to claim 4, characterized in that Before loading and displaying the turntable background image, the plurality of container labels and the pointer image, the method further includes: The winning rotation angle corresponding to each container label is determined according to the center angle corresponding to each container label, the arrangement order and the pointer direction corresponding to the pointer image.
6. The method according to claim 5, characterized in that After loading and displaying the turntable background image, the plurality of container labels and the pointer image, the method further includes: After receiving the lottery instruction, determining the winning container label; The plurality of container tags are controlled to rotate according to the winning rotation angle corresponding to the winning container tag, so that when the plurality of container tags stop rotating, the pointer in the pointer picture points to the winning container tag.
7. The method according to claim 6, characterized in that The step of controlling the plurality of container labels to rotate according to the winning rotation angle corresponding to the winning container label comprises: Get the preset rotation angular velocity or preset rotation duration; The plurality of container tags are controlled to rotate according to the preset rotation speed and the winning rotation angle corresponding to the winning container tag; or the plurality of container tags are controlled to rotate according to the preset rotation duration and the winning rotation angle corresponding to the winning container tag.
8. A lottery wheel information display device, characterized in that: The device is applied to a front-end application program, and the device comprises: An acquisition unit, configured to acquire a turntable image and a pointer image from a file server according to a request for loading a lottery page, wherein the turntable image includes a turntable background and a plurality of prizes; A request unit, used to request award description information corresponding to each award from the background management system; A cropping unit, used for cropping the turntable image according to the plurality of award description information to obtain a turntable background image and a plurality of award images; A determination unit, used to determine the center angle and arrangement order corresponding to each of the award pictures; A loading unit is used to load and display the turntable background image, multiple award images and the pointer image according to the central angle and arrangement order corresponding to each award image.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the information display method of the lottery wheel according to any one of claims 1 to 7.
10. A lottery wheel information display device, characterized in that: The device includes a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the information display method of the lottery wheel described in any one of claims 1 to 7 is executed.
