Random event creation method, verification method, device, storage medium, and terminal
The method improves the verification of random event authenticity by confidentiality processing and generating random events using pre-agreed algorithms, addressing the challenge of fraud in software applications.
Patent Information
- Application Number
- JP2024004653
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-19
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-01-16
AI Technical Summary
Users and operation platforms in software applications with random events face difficulties in verifying the authenticity of random events, as existing methods lack transparency and are susceptible to fraud or manipulation.
A method involving confidentiality processing of a first random number using a pre-agreed algorithm, generating a third random number based on the first and second random numbers, and deriving a random event from the sequence, with the first random number being disclosed to the user and becoming invalid post-disclosure, allowing users to verify the authenticity of the random event.
Enhances user convenience in verifying the integrity of random events by ensuring the first random number's confidentiality and enabling comparison with the confidentiality processing result, thus detecting potential tampering.
Smart Images

Figure 2025097872000001_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of computers, and in particular, to a method for generating a random event, a verification method and apparatus, a storage medium, and a terminal.
Background Art
[0002] In many software applications, it is related to random events that interact with users, such as lottery draws for players in games, lottery draws for viewers in network live broadcasts, etc. In a specific implementation, operation platforms such as games and network live broadcasts generally use random numbers to generate corresponding random events. For example, in one application scenario, after a game user defeats a monster, the game maker randomly awards the user some bonuses. As the game business model evolves, the phenomenon of increasing game revenue through randomness is becoming increasingly common. A typical example is the so-called "gacha game". In such a game, a user can use a certain amount of resources (such as points or in-game currency, etc.) to draw items in the game and can obtain rare items in the game with a certain probability each time an item is drawn.
[0003] Taking the gacha game as an example, since the item draw result itself depends on probability, all users pray for good luck, but may also encounter bad luck. Users have doubts about whether there is fraud or cheating in the item draw system. Also, in order to maintain the user's enthusiasm for item draws, the game maker wants to prove that it has not manipulated the item draw results. Therefore, both users and game makers hope that it can be proved that there is no cheating in the gacha system.
[0004] Currently, for games that generate random numbers on the server side, game developers generally prove the absence of cheating in the following several ways. As Method 1, they prove the absence of cheating by publishing the source code of the game server. As Method 2, game developers prove the absence of cheating by publishing the lottery probability in accordance with regulatory requirements. As Method 3, they prove the absence of cheating by using blockchain technology.
[0005] However, in the case of Method 1, users have no way of knowing whether the code actually executed on the server has been modified secretly. Therefore, even with the method of publishing the source code, users cannot be convinced. In the case of Method 2, when the user group wants to investigate and confirm whether the lottery probability of the game matches the published probability, they can only compare the frequency of obtaining rare items with the published probability by recording a large number of lottery records. Obviously, such a probability estimation method based on frequency cannot accurately determine whether the "lottery probability" matches the published probability. Moreover, such a method is difficult to rule out the possibility that game developers deliberately contaminate the statistical results and manipulate the statistical results. Also, for individual users, since the sample size is generally small, it is difficult to significantly verify the lottery probability. In the case of Method 3, because blockchain technology is complex, it is difficult to guarantee performance and reliability when related algorithms are applied to the game field. Also, such algorithms are generally complex and difficult to understand, and users lack relevant knowledge of blockchain, so it is difficult to gain the acceptance of the user group.
Summary of the Invention
Problems to be Solved by the Invention
[0006] As described above, currently, in some software application interactions based on random events, users and the operation platform cannot easily prove whether the random events have been rigged.
[0007] The technical problem solved by the embodiments of the present invention is that in some software application interactions due to conventional random events, neither the user nor the operation platform can easily prove whether the random event has been rigged.
Means for Solving the Problem
[0008] To solve the above technical problem, an embodiment of the present invention provides a method for generating a random event, which includes the steps of: performing confidentiality processing on a first random number using a confidentiality processing algorithm agreed upon in advance with a user based on the first random number, and providing the confidentiality processing result to the user, wherein the first random number maintains confidentiality for the user, is disclosed to the user in response to the user's public request, and is arranged to become invalid after being disclosed to the user; obtaining a second random number provided by the user; generating a third random number based on the first random number and the second random number using an algorithm agreed upon in advance with the user, generating a random number sequence using the third random number as a random seed, and generating a random event derived from the random number sequence.
[0009] Preferably, the step of providing the confidentiality processing result to the user includes any one of the following methods: displaying the confidentiality processing result to the user; mapping the confidentiality processing result to an element sequence based on a first mapping agreed upon in advance with the user, and displaying the element sequence to the user, wherein a plurality of elements in the element sequence are derived from a set of predetermined symbols.
[0010] Preferably, the element sequence corresponding to the confidentiality processing result is obtained by combining a plurality of elements from the set of symbols.
[0011] Preferably, the second random number is obtained by any one of the following methods: mapping an element selected by the user from the element sequence according to a second mapping agreed upon by the user to obtain the second random number; and a method in which the user arbitrarily inputs the second random number.
[0012] Preferably, the step of obtaining the second random number by mapping an element selected by the user from the element sequence according to a second mapping agreed upon by the user includes the step of obtaining the second random number by mapping an element sequence obtained by arranging the elements selected by the user from the element sequence according to a second mapping agreed upon by the user.
[0013] Preferably, the device used by the user is instructed to store the confidentiality processing result and the second random number.
[0014] Preferably, the method for generating the random event further includes the step of performing an anti-tampering processing operation on the stored confidentiality processing result and the second random number in response to a memory operation of the user.
[0015] Preferably, before obtaining the second random number provided by the user, the method further includes the step of receiving confirmation information of the user for the confidentiality processing result.
[0016] An embodiment of the present invention further provides a method for verifying a random event, including steps of: in response to a user's verification operation, sending a public request to an operation platform, where the public request requests the operation platform to publish a first random number; receiving the first random number; obtaining a second random number, and generating a third random number based on the first random number and the second random number by using an algorithm pre-agreed with the operation platform, generating a random number sequence with the third random number as a random seed, and verifying whether a random event derived from the random number sequence is the same as a random event actually generated by the operation platform.
[0017] An embodiment of the present invention further provides a random event generation device, including: a confidentiality unit that performs confidentiality processing on a first random number based on a confidentiality processing algorithm pre-agreed with a user by using the first random number, and provides a confidentiality processing result to the user, where the first random number maintains confidentiality for the user, is publicly disclosed to the user in response to the user's public request, and is arranged to become invalid after being publicly disclosed to the user; an acquisition unit that acquires a second random number provided by the user; and a random event generation unit that generates a third random number based on the first random number and the second random number by using an algorithm pre-agreed with the user, generates a random number sequence with the third random number as a random seed, and generates a random event derived from the random number sequence.
[0018] An embodiment of the present invention further provides a verification device for random events, including a transmission unit that responds to a user's verification operation and sends a public request to an operation platform, where the public request requests the operation platform to publish a first random number; a reception unit that receives the first random number; and a verification unit that obtains a second random number, generates a third random number based on the first random number and the second random number using an algorithm pre-agreed with the operation platform, generates a random number sequence using the third random number as a random seed, and verifies whether a random event derived from the random number sequence is the same as a random event actually generated by the operation platform.
[0019] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, where when the computer program is executed by a processor, it performs the steps of the above method for generating a random event or the steps of the above method for verifying a random event.
[0020] An embodiment of the present invention further provides a terminal including a memory and a processor, where the memory stores a computer program executable by the processor, and when the processor executes the computer program, it performs the steps of the above method for generating a random event or the steps of the above method for verifying a random event.
Advantages of the Invention
[0021] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects. Using an algorithm agreed upon in advance with the user, generate a third random number based on the first random number and the second random number, generate a random number sequence using the third random number as a random seed, and further generate a random event derived from the random number sequence. Perform confidentiality processing on the first random number using a confidentiality processing algorithm agreed upon in advance with the user, and provide the user with the confidentiality processing result. The first random number can be made public to the user in response to the user's request, and after being made public, it is arranged to become invalid. In this way, the user requests to make the first random number public according to a public request. After knowing the first random number, the user performs confidentiality processing on the first random number based on the confidentiality processing algorithm agreed upon in advance, and compares the consistency between the confidentiality processing result obtained by the user and the publicly disclosed confidentiality processing result to verify whether the first random number has been replaced. Further, verify the authenticity of the third random number as a random seed based on the first random number and the second random number, and verify whether the random event derived from the random number sequence generated using the third random number as a random seed is the same as the random event actually generated by the operation platform, thereby verifying the authenticity of the random event and realizing the verification of whether the generated random event has been tampered with. By generating random events in this way, the convenience for the user to verify whether the random event has been tampered with can be improved.
Brief Description of the Drawings
[0022]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Embodiments for Carrying Out the Invention
[0023] As described above, currently, in some software application interactions by random events, it may be difficult for users and operation platforms to easily prove whether a random event has been rigged.
[0024] To solve the above problems, in an embodiment of the present invention, the first random number can be made public to the user in response to the user's request, and after being made public, it is arranged to become invalid. In this way, the user can request to make the first random number public by a public request. After knowing the first random number, the user performs confidentiality processing on the first random number based on a pre-agreed confidentiality processing algorithm, and compares the consistency between the confidentiality processing result obtained by the user and the publicly disclosed confidentiality processing result to verify whether the first random number has been replaced. Furthermore, based on the first random number and the second random number, the authenticity of the third random number as a random seed is verified, and by verifying whether the random event derived from the random number sequence generated using the third random number as a random seed is the same as the random event actually generated by the operation platform, the authenticity of the random event is verified, thereby realizing the verification of whether the generated random event has been rigged. Generating random events in this way can improve the convenience for users to verify whether random events have been rigged.
[0025] To make the above objects, features, and beneficial effects of the embodiments of the present invention clearer, the specific embodiments of the present invention will be described in detail below in conjunction with the drawings.
[0026] Embodiments of the present invention provide a method for generating random events, and the generation method is applicable to an operation platform of an interactive software application. Specifically, in an interactive software application, usually, an operation platform and a plurality of devices network-connected to the operation platform are involved, and users are connected to the operation platform through their respective devices to realize various functions such as games and network live broadcasts. The operation platform is various servers on which service-side programs are arranged, and the devices used by users may be computers, smartphones, tablets, game consoles, etc., on which client programs are executed, and the client programs and service-side programs interact with each other and cooperate to realize various interactive services and functions.
[0027] Referring to FIG. 1, the random event generation method of this embodiment includes the following steps 11 to 13.
[0028] Step 11: Based on the first random number, perform confidentiality processing on the first random number using a confidentiality processing algorithm agreed upon in advance with the user, and provide the confidentiality processing result to the user. The first random number maintains confidentiality for the user, is publicly disclosed to the user in response to the user's public request, and is arranged to become invalid after being publicly disclosed to the user.
[0029] Step 12: Obtain a second random number provided by the user.
[0030] Step 13: Using the algorithm agreed upon in advance with the user, generate a third random number based on the first random number and the second random number, generate a random number sequence using the third random number as a random seed, and generate a random event derived from the random number sequence.
[0031] As can be seen from the above, the first random number can be made public to the user in response to the user's request, and after being made public, it is arranged to become invalid. In this way, the user requests to make the first random number public due to a public request. After knowing the first random number, the user performs confidentiality processing on the first random number based on the pre-agreed confidentiality processing algorithm, and compares the consistency between the confidentiality processing result obtained by the user and the publicly disclosed confidentiality processing result to verify whether the first random number has been replaced. Furthermore, verify the authenticity of the third random number as a random seed based on the first random number and the second random number, and verify whether the random event derived from the random number sequence generated using the third random number as a random seed is the same as the random event actually generated by the operation platform, thereby verifying the authenticity of the random event, and realizing the verification of whether the generated random event has been tampered with. By generating random events in this way, the convenience for the user to verify whether the random event has been tampered with can be improved.
[0032] In the specific implementation of Step 11, the first random number is provided by the operation platform. The operation platform may be the operation platform of a game maker, the operation platform of a live streaming company, etc. The user may be a player of the game, or a viewer of the live stream and a participant in other types of random events, etc.
[0033] The operation platform can reach an agreement with users on relevant algorithms so as to publicly disclose the algorithms (such as confidentiality processing algorithms, random seed generation algorithms, random event derivation algorithms, etc.) used to generate random events. The operation platform may reach an agreement with users on relevant algorithms so as to publicly disclose the relevant code for generating random events. Here, the operation platform may also reach an agreement with users on relevant algorithms in other ways not described here.
[0034] In a specific implementation, the confidentiality processing algorithm in step 11 meets the following conditions. As condition 1, it is difficult to find another different first random number for the confidentiality processing results of two first random numbers to be the same after confidentiality processing. That is, it has the characteristic of collision attack resistance. As condition 2, it is difficult to obtain the first random number by inverse inference based only on the confidentiality processing result. That is, it has the characteristic of preimage attack resistance.
[0035] In some embodiments, the confidentiality processing algorithm includes a cryptographic hash function. The cryptographic hash function may be, for example, the SHA256 function, the SM3 function, the SHA3 function, etc. In this case, the confidentiality processing result is a hash value obtained by performing a hash calculation on the first random number using the cryptographic hash function.
[0036] In some other embodiments, the confidentiality processing algorithm may include a digital signature function.
[0037] In the process of generating random events, the operation platform provides the user with the confidentiality processing result of the first random number, that is, it discloses the confidentiality processing result to the user, but the first random number maintains confidentiality for the user. When the user is required to disclose the first random number due to a disclosure request, the user discloses the first random number. After the first random number is disclosed to the user, it becomes invalid. In the subsequent generation of random events, the invalidated first random number is not used. Subsequently, when generating random events again, a new first random number is generated again.
[0038] In a specific implementation, the confidentiality processing result can be provided to the user in any one of the following methods.
[0039] In some non-limiting embodiments, the confidentiality processing result is displayed to the user. That is, the original form of the confidentiality processing result is displayed to the user. For example, the confidentiality processing result can be displayed on the user interface.
[0040] In some other non-limiting embodiments, using a first mapping agreed upon in advance with the user, the confidentiality processing result is mapped to an element sequence, and the element sequence is displayed to the user. A plurality of elements in the element sequence are derived from a set of predetermined symbols. Elements in the set of predetermined symbols are at least one of characters, words, pictures, emoticons, etc. The set of predetermined symbols is agreed upon in advance with the user.
[0041] In some embodiments, the element sequence corresponding to the confidentiality processing result is obtained by combining a plurality of elements from the set of symbols.
[0042] For example, using the encoding method of the Combinatorial Number System (CNS), the confidentiality processing result is mapped to an element sequence. The full English name of the Combinatorial Number System may also be combinatorial representation of integers or combinadic. Further, the confidentiality processing result is mapped to an element sequence by other predetermined mapping methods such as string concatenation.
[0043] In some non-limiting embodiments, before step 12, the user's confirmation information for the confidentiality processing result is received. That is, the confidentiality processing result has been confirmed by the user. In other words, the first random number has been confirmed by the user. In this way, the user's doubts about the operation platform using the first random number beneficial to itself can be further eliminated.
[0044] In a specific implementation, the user operates the device used to send a request to the operation platform to exchange the confidentiality processing result. For example, the user interface is provided with an "exchange" operation button for exchanging the confidentiality processing result. When the user triggers the "exchange" button, a request to exchange the confidentiality processing result is sent to the operation platform. When receiving a request to exchange the confidentiality processing result, the operation platform generates a new first random number again and provides the user with the confidentiality processing result corresponding to the new first random number. In this case, the confidentiality processing result corresponding to the new first random number is displayed on the user interface.
[0045] In step 12, the second random number provided by the user can be generated in various ways, which will be described below with examples.
[0046] In some embodiments, according to the second mapping agreed upon by the user, the second random number is obtained by mapping the element selected by the user from the element sequence.
[0047] The user selects some or all of the elements from the elements of the element sequence corresponding to the confidentiality processing result. According to the second mapping agreed upon by the user, the second random number is obtained by mapping the element sequence obtained by arranging the elements selected by the user from the element sequence.
[0048] In some embodiments, the second mapping includes an encoding method using a Factorial Number System (FNS). The English name of the Factorial Number System may also be factoradic.
[0049] In a specific implementation, when the user selects an element from the elements of the element sequence corresponding to the confidentiality processing result, the user can perform at least one operation on the element, such as sorting, inserting, deleting, picking, converting, etc. The conversion can include one or more of rotation, mirroring, discoloration, replacement, etc. In this way, by providing a plurality of predetermined operations on the elements, the randomness of the generation of the second random number is ensured, and the operation platform can easily control and save the operation cost.
[0050] The user can operate the elements in the element sequence corresponding to the confidentiality processing result in an interaction manner such as clicking, dragging, or pressing a key. After completing the operation on the elements in the element sequence, record the element sequence after the operation, and map the element sequence after the operation according to a predetermined second mapping to obtain the second random number. The length of the element sequence after the operation may be the same as or different from the length of the element sequence corresponding to the confidentiality processing result.
[0051] In some other embodiments, the second random number is arbitrarily input by the user. The content input by the user may be characters, pictures, words, etc. In this case, the second random number may not depend on the element sequence corresponding to the confidentiality processing result. In this way, the randomness of the second random number provided by the user is further improved, avoiding being predicted in advance by the operation platform, and further reducing the probability of fraud by the operation platform.
[0052] In some non-limiting embodiments, sensitive information detection is performed on the second random number provided by the user. When the sensitive information detection result indicates that the second random number contains sensitive information, the user is reminded to provide a new second random number. The second random number containing sensitive information may be discarded.
[0053] Sensitive information detection for the second random number can be realized by a preset sensitive thesaurus or a sensitive information detection machine learning model, etc. According to different types of the second random number, the specific detection method is different and can be selected according to actual needs.
[0054] In some non-limiting embodiments, the second random number can be displayed. For example, the second random number is displayed on the user interface. Of course, depending on the display arrangement of the second random number by the user, the second random number may not be displayed.
[0055] Furthermore, instruct the device used by the user to store the confidentiality processing result and the second random number. By storing the confidentiality processing result and the second random number, it facilitates the user's subsequent inquiries. The device used by the user may be instructed to store the confidentiality processing result and the second random number in the form of a screenshot. The device used by the user may be instructed to store the confidentiality processing result and the second random number in the form of screen recording. Furthermore, the device used by the user may be instructed to capture the confidentiality processing result and the second random number and store them in text form.
[0056] The device used by the user may, in response to an instruction from the operation platform, store the confidentiality processing result and the second random number in the device used by the user. The device used by the user may further, in response to the user's storage operation, store the confidentiality processing result and the second random number in the device used by the user.
[0057] Furthermore, in response to the user's storage operation, the operation platform performs an anti-tampering processing operation on the stored confidentiality processing result and the second random number. The anti-tampering processing operation includes at least one of electronic watermark technology processing or digital signature technology processing on the stored confidentiality processing result and the second random number. For example, by adding an electronic watermark or digital signature to the confidentiality processing result and the second random number, malicious tampering by the user with the confidentiality processing result and the second random number can be effectively prevented.
[0058] To facilitate the understanding of those skilled in the art of the generation method of the second random number, several examples are used for explanation below.
[0059] Example 1 The elements in a set of predetermined symbols are emoticons. The emoticons can include basic emoticons and rotated emoticons after rotating a predetermined angle, for example, 90 degrees, 180 degrees, 270 degrees or other angles, based on the basic emoticons. That is, the set of predetermined symbols is a set consisting of a plurality of emoticons.
[0060] Using the encoding method of the CNS, the confidentiality processing result of the first random number is mapped to an element sequence with a length of n and displayed on the user interface. n is a positive integer. Referring to FIG. 2, taking n equal to 16 as an example, the element sequence x1, x2... x obtained by mapping the confidentiality processing result 16 is displayed in matrix form. In fact, it is not limited to displaying the element sequence obtained by mapping the confidentiality processing result in matrix form, and other appropriate methods may be adopted, which are not described here.
[0061] The user may drag the emoticons in the element sequence corresponding to the confidentiality processing result displayed on the user interface to re-sort them, or rotate the emoticons displayed on the user interface according to a predetermined rotation angle. After the user's operation is completed, the sequence on the user interface is y1, y2... y 16 and y1, y2... y are mapped to the second random number using the encoding method of the FNS 16
[0062] Example 2 The elements in the set of predetermined symbols are numbers. Hereinafter, taking the set of predetermined symbols as a set consisting of hexadecimal numbers as an example, an explanation will be given.
[0063] Calculate the SHA256 hash value of the confidentiality processing result, map the confidentiality processing result to an element sequence by taking the first n digits, and display it on the user interface. The length of the element sequence corresponding to the confidentiality processing result is n. Referring to FIG. 3, taking n = 9 as an example. The user interface includes a left display frame 31 and a right display frame 32. The element sequence x1, x2... x9 corresponding to the confidentiality processing result is displayed in the right display frame 32.
[0064] The user selects some or all of the elements from the element sequence x1, x2... x9 in the right display frame 32, and the selected elements are displayed in the left display frame 31. The elements x1, x2... x9 in the right display frame 32 can be repeatedly selected. Referring to FIG. 4, for example, the elements selected by the user are x9, x9, x8, and x1.
[0065] After the user's operation is completed, the element sequence in the left display frame 31 after the operation is y1, y2... y m is used, and the element sequence y1, y2... y m is mapped to a second random number. m is a positive integer. For example, by calculating the hash value of the element sequence y1, y2... y m , the element sequence y1, y2... y m is mapped to a second random number.
[0066] Example 3 The elements in a set of predetermined symbols are a combination of numbers and letters. For example, the elements in a set of predetermined symbols are a set consisting of 0 to 9 which are decimal numbers and 26 English letters. A trivial mapping is used to map the confidentiality processing result corresponding to the first random number. A trivial mapping is also called an identity mapping, which is a mapping from a set to itself, and for any element, the result after mapping is the same as the original element. That is, the original form of the confidentiality processing result itself is displayed. Referring to FIG. 5, for example, the confidentiality processing result is displayed in the first display frame 51, and the value of the confidentiality processing result a' is xxxxxx. The user inputs numbers or letters in the second display frame 52. After the user inputs, if the sequence input in the second display frame after the operation is y1, y2... y m , then y1, y2... y m is mapped to a second random number. For example, y1, y2... y m is mapped to a second random number by combining the characters as a character string.
[0067] Example 4 The elements in a set of predetermined symbols are characters, words, pictures, emoticons, etc. The confidentiality processing result is mapped to an element sequence using the CNS encoding method, and the element sequence x1, x2... x nThe elements in are derived from a set of predetermined symbols. The element sequence x1, x2... x n is displayed on the user interface. As shown in Example 1, the user may re-sort the elements in the element sequence x1, x2... x n As shown in Example 2, the user may further select some or all of the elements from the element sequence x1, x2... x n After the user operates on the element sequence x1, x2... x n the element sequence y1, y2... y m is obtained. Map y1, y2... y m to a second random number using the encoding method of FNS.
[0068] Denote the number of elements in the set of symbols as p, where p is a positive integer. If n elements are taken from the set of symbols to form combinations, the total number of ways is [Number 1], so a mapping is constructed by a method such as CNS encoding.
[0069]
Number
[0070] For the case of y1... y n obtained by arranging a specific combination of x1... x m the number of such arrangement methods is [Number 2], so a mapping of the second random number is obtained by constructing it by a method such as FNS encoding.
[0071]
Number
[0072] When n = m, if y1... y m is recorded, the confidentiality processing result of the first random number and the second random number can be recorded simultaneously. This is because the confidentiality processing result can be decoded from the included combination information, and the second random number can be decoded from the included array information.
[0073] For example, if the agreed set of symbols is {A, B, C, D, E} and n = m = 3, the total number of ways to pick 3 elements from the set of symbols to form combinations is [Number 3] = 10. Therefore, construct a mapping from the confidentiality processing result to the element sequence according to the lexicographical order. That is, the confidentiality processing result 0 corresponds to the element sequence ABC, the confidentiality processing result 1 corresponds to the element sequence ABD, the confidentiality processing result 2 corresponds to the element sequence ABE, the confidentiality processing result 3 corresponds to the element sequence ACD, the confidentiality processing result 4 corresponds to the element sequence ACE, the confidentiality processing result 5 corresponds to the element sequence ADE, the confidentiality processing result 6 corresponds to the element sequence BCD, the confidentiality processing result 7 corresponds to the element sequence BCE, the confidentiality processing result 8 corresponds to BDE, and the confidentiality processing result 9 corresponds to the element sequence CDE.
[0074]
Number
[0075] For each combination taken out, the number of its arrangement methods is [Number 4] = 6. Therefore, construct a mapping from the element sequence y1y2y3 to the second random number according to the lexicographical order. For example, for the combination ABC, construct the following mapping. That is, the element sequence ABC corresponds to the second random number 0, the element sequence ACB corresponds to the second random number 1, the element sequence BAC corresponds to the second random number 2, the element sequence BCA corresponds to the second random number 3, the element sequence CAB corresponds to the second random number 4, and the element sequence CBA corresponds to the second random number 5. Another example, for the combination ABE, construct the following mapping. That is, the element sequence ABE corresponds to the second random number 0, the element sequence AEB corresponds to the second random number 1, the element sequence BAE corresponds to the second random number 2, the element sequence BEA corresponds to the second random number 3, the element sequence EAB corresponds to the second random number 4, and the element sequence EBA corresponds to the second random number 5.
[0076]
Number
[0077] If y1y2y3 is CAB, the confidentiality processing result can be decoded to 0 and the second random number can be decoded to 4. If y1y2y3 is AEB, the confidentiality processing result can be decoded to 2 and the second random number can be decoded to 1.
[0078] In a specific implementation of step 13, the random seed generation algorithm for generating the third random number can include any one of a key derivation function (KDF), an exclusive OR function, a string concatenation function, etc.
[0079] In a specific implementation of step 13, using the algorithm agreed upon by the user, a random number sequence can be generated with the third random number as the random seed. The generated random number sequence can be one or more. Each random number sequence corresponds to a random event respectively. The generated random event can be determined based on the mapping between the random number sequence and the random event. For the specific algorithm for deriving a random event from a random number sequence, it can be selected according to actual needs and is not limited here.
[0080] In the process of generating a random number sequence with the third random number as the random seed, by referring to external state information such as a timestamp or using the state information inside the software application to adjust the one or more generated random number sequences, the generated random event can be adjusted. In this way, it can be realized that the random events generated due to different times when the user triggers the generation of random events are different. Or, due to different states inside the software application, the generated random events are different, and the randomness of the generation of random events can be further improved. The state information inside the software application can be, for example, the state information inside the game.
[0081] Note that the random numbers in the embodiments of the present invention, for example, the first random number, the second random number, and the third random number, are not limited to numbers in the narrow sense, and may be data in a computer, such as a character string, a bit string, etc.
[0082] The embodiments of the present invention further provide a method for verifying random events, and the method for verifying random events is applicable to the devices used by users. In an interactive software application, usually, an operation platform and a plurality of devices network-connected to the operation platform are involved. The user is connected to the operation platform by each device to realize various functions such as games and network live broadcasts. The operation platform may be various servers on which service-side programs are arranged. The devices used by users may be computers, smartphones, tablets, game consoles, etc., on which a client program is executed. The client program and the service-side program interact with each other and cooperate to realize various interactive services and functions. The client program may be a third-party program or a program developed by the operation platform. Referring to FIG. 6, the method for verifying random events includes the following steps 61 to 63.
[0083] Step 61: In response to the user's verification operation, send a public request to the operation platform, and the public request requests the operation platform to publish a first random number.
[0084] Step 62: Receive the first random number.
[0085] Step 63: Obtain a second random number, generate a third random number based on the first random number and the second random number using an algorithm agreed upon in advance with the operation platform, generate a random number sequence using the third random number as a random seed, and verify whether a random event derived from the random number sequence is the same as a random event actually generated by the operation platform.
[0086] In a specific implementation, for the specific steps in which the operation platform actually generates a random event, reference may be made to the descriptions in Steps 11 to 13 provided in the above embodiments, and here, the specific generation process of the random event will not be described.
[0087] In a specific implementation, in Step 61, the user interface is provided with a random event verification entry, and the user performs a verification operation on the random event actually generated by the operation platform through the random event verification entry. The random event verification entry may be a button, a link, or various other appropriate forms such as input boxes for the first random number and the second random number.
[0088] When the user's verification operation is detected, in response to the user's verification operation, a public request is sent to the operation platform. After receiving the public request, the operation platform provides the first random number to the user. The device used by the user can store the first random number. For example, the first random number is stored in a screen recording method, a screen shot method, or a text method.
[0089] Furthermore, the stored first random number has undergone an anti-tampering processing operation. The anti-tampering processing operation can include at least one of an electronic watermark technology process or a digital signature technology process for the stored first random number.
[0090] In step 63, the first random number may be input by the user, obtained from the operation platform, or even obtained by acquiring the first random number stored in the device used by the user. The second random number may be input by the user, or obtained by acquiring the confidentiality processing result stored in the device used by the user and the second random number.
[0091] In some embodiments, after receiving the first random number published by the operation platform, perform confidentiality processing on the first random number using the confidentiality processing algorithm agreed upon in advance with the operation platform, and determine whether the confidentiality processing result by the confidentiality processing is the same as the confidentiality processing result actually provided by the operation platform. The confidentiality processing result actually provided by the operation platform may be the confidentiality processing result stored in the device used by the user. When the confidentiality processing result by the confidentiality processing is the same as the confidentiality processing result actually provided by the operation platform, the operation platform does not exchange the first random number in a fraudulent manner. When the confidentiality processing result by the confidentiality processing is different from the confidentiality processing result actually provided by the operation platform, there is a fraudulent act of exchanging the first random number on the operation platform.
[0092] Furthermore, when an anti-tampering processing operation is performed on the first random number, the confidentiality processing result, and the second random number, verify whether the anti-tampering processing is damaged by verifying the integrity of the anti-tampering processing for the first random number, the confidentiality processing result, and the second random number. When the anti-tampering processing is damaged, output a prompt indicating that the anti-tampering processing is damaged. Also, the user may be reminded to input the first random number and the second random number again.
[0093] In some non-limiting embodiments, when the first random number is different from the first random number actually provided by the operation platform, and / or the second random number is different from the second random number actually provided by the operation platform, output a prompt indicating that the random numbers do not match.
[0094] In some non-limiting embodiments, if the third random number obtained by calculation based on the first random number and the second random number is different from the third random number actually provided by the operation platform, a presentation indicating that the third random number has been tampered with is output.
[0095] In a specific implementation of step 63, if the random event derived from the random number sequence is the same as the random event actually generated by the operation platform, it is determined that the operation platform is not engaged in tampering. That is, there is no cannibalization phenomenon in the random event actually generated by the operation platform. Also, if the random event derived from the random number sequence is different from the random event actually generated by the operation platform, it is determined that there is suspicion of tampering with the operation platform. Furthermore, a presentation indicating that the random event has been tampered with is output.
[0096] Note that although the game is used as an example in each of the above embodiments, the technical solution of this embodiment is not limited to the game, and can also be applied to various software applications related to interactive random events, such as network live distribution.
[0097] An embodiment of the present invention further provides a random event generation device. Referring to FIG. 7, the random event generation device 70 includes a confidentiality unit 71 that performs confidentiality processing on the first random number using a confidentiality processing algorithm agreed upon in advance with the user based on the first random number and provides the confidentiality processing result to the user, wherein the first random number is arranged to maintain confidentiality for the user, be publicly disclosed to the user in response to the user's public disclosure request, and become invalid after being publicly disclosed to the user; an acquisition unit 72 that acquires the second random number provided by the user; Using an algorithm agreed upon in advance with the user, a third random number is generated based on the first random number and the second random number, a random number sequence is generated using the third random number as a random seed, and a random event generation unit 73 that generates a random event derived from the random number sequence.
[0098] In a specific implementation, the above random event generation device 70 can implement the above random event generation method, and the random event generation device 70 includes units for implementing each step in the above random event generation method. For the specific operating principle and operating method of the random event generation device 70, reference may be made to the description of the random event generation method in the above embodiment, which will not be described here.
[0099] An embodiment of the present invention further provides a random event verification device. Referring to FIG. 8, the random event verification device 80 includes A transmission unit 81 that responds to a user's verification operation and sends a public request to the operation platform, where the public request requests the operation platform to publicly disclose a first random number. A receiving unit 82 that receives the first random number. Obtains a second random number, generates a third random number based on the first random number and the second random number using an algorithm agreed upon in advance with the operation platform, generates a random number sequence using the third random number as a random seed, and verifies whether the random event derived from the random number sequence is the same as the random event actually generated by the operation platform. The verification unit 83.
[0100] In a specific implementation, the above-described random event verification device 80 can implement the above-described random event verification method, and the random event verification device 80 includes units for implementing each step in the above-described random event verification method. For the specific operation principle and operation method of the random event verification device 80, reference may be made to the description of the random event verification method in the above embodiments, which will not be described here.
[0101] Embodiments of the present invention further provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it executes the steps of the random event generation method provided by any one of the above embodiments of the present invention, or the steps of the random event verification method provided by any one of the above embodiments.
[0102] The computer-readable storage medium may include a non-volatile memory or a non-transitory memory, and may also include an optical disk, a mechanical hard disk, a solid-state hard disk, etc.
[0103] Embodiments of the present invention further provide a terminal including a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, it executes the steps of the random event generation method provided by any one of the above embodiments, or the steps of the random event verification method provided by any one of the above embodiments.
[0104] The memory and the processor are coupled, and the memory may be located inside or outside the terminal. The memory and the processor may be connected by a communication bus.
[0105] The terminal includes, but is not limited to, terminal devices such as smartphones, computers, tablets, game consoles, etc., and may also be a server, a cloud platform, etc.
[0106] The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other arbitrary combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, a process or function according to those described in the embodiments of this application is generated in whole or in part. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer program may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner.
[0107] In each embodiment of the present invention, each functional unit may be integrated into one processing unit, each unit may be physically contained individually, or two or more units may be integrated into one unit. The above integrated units may be realized in the form of hardware, or may be realized in the form of a combination of hardware and software functional units. For example, for each device and product applied to or integrated into a chip, each module / unit included therein is realized in the form of hardware such as a circuit, or at least a part of the module / unit is realized in the form of a software program, and the software program is executed by a processor integrated inside the chip, and the remaining (if any) part of the module / unit is realized in the form of hardware such as a circuit. For each device and product applied to or integrated into a chip module, each module / unit included therein is realized in the form of hardware such as a circuit, and different modules / units are located in the same component (such as a chip, a circuit module, etc.) of the chip module, or different components, or at least a part of the module / unit is realized in the form of a software program, and the software program is executed by a processor integrated inside the chip module, and the remaining (if any) part of the module / unit is realized in the form of hardware such as a circuit. For each device and product applied to or integrated into a terminal, each module / unit included therein is realized in the form of hardware such as a circuit, and different modules / units are located in the same component (such as a chip, a circuit module, etc.) or different components inside the terminal, or at least a part of the module / unit is realized in the form of a software program, and the software program is executed by a processor integrated inside the terminal, and the remaining (if any) part of the module / unit is realized in the form of hardware such as a circuit.
[0108] The descriptions of the first, second, third, etc. in the embodiments of this application are for exemplifying and differentiating the objects to be described, and there is no order, nor do they indicate any special restrictions on the number of devices in the embodiments of this application, and they cannot constitute restrictions on the embodiments of this application.
[0109] Here, in this embodiment, the numbers of each step do not limit the execution order of each step.
[0110] As can be understood by those skilled in the art, all or some of the steps in each method of the above embodiments can be completed by using a program to instruct related hardware, and the program is stored in any one of the computer-readable storage media, and the storage media includes ROM, RAM, magnetic disk, optical disk, etc.
[0111] Although the present invention is disclosed as above, the present invention is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention is based on the scope limited by the claims.
Description of Reference Signs
[0112] 51 First display frame 52 Second display frame 70 Generation device 71 Confidentiality unit 72 Acquisition unit 73 Random event generation unit 80 Verification device 81 Transmission unit 82 Reception unit 83 Verification unit
Claims
1. 1. A method for generating random events, comprising: A step of performing confidentiality processing on the first random number using a confidentiality processing algorithm pre-agreed with a user based on the first random number, and providing the confidentiality processing result to the user, wherein the first random number maintains confidentiality for the user, is disclosed to the user in response to a disclosure request from the user, and is arranged to be invalid after being disclosed to the user; obtaining a second random number provided by the user; generating a third random number based on the first random number and the second random number using an algorithm previously agreed upon with the user, generating a random number sequence using the third random number as a random seed, and generating a random event derived from the random number sequence; A method for generating random events, comprising:
2. The step of providing the user with a confidentiality processing result includes: a manner of displaying the confidentiality processing result to the user; A method of mapping the confidentiality processing result to a sequence of elements based on a first mapping previously agreed upon with the user, and displaying the sequence of elements to the user, wherein a number of elements in the sequence of elements are derived from a set of predetermined symbols; 2. The method for generating random events according to claim 1, further comprising:
3. the element sequence corresponding to the confidentiality processing result is obtained by combining a plurality of elements from the set of symbols; The method for generating random events according to claim 2 .
4. The second random number is a method of obtaining the second random number by mapping an element selected by the user from the sequence of elements according to a second mapping agreed upon with the user; A method in which the user arbitrarily inputs the second random number; 4. The method for generating random events according to claim 2 or 3, characterized in that the method is obtained by any one of the following:
5. obtaining the second random number by mapping an element selected by the user from the sequence of elements according to a second mapping agreed with the user, obtaining the second random number by mapping an element sequence obtained by arranging elements selected by the user from the element sequence according to a second mapping agreed upon with the user; The method for generating random events according to claim 4, further comprising:
6. instructing a device used by the user to store the confidentiality processing result and the second random number; The method for generating random events according to any one of claims 1, 2, 3 and 5, further comprising:
7. performing a tamper-proof processing operation on the stored confidentiality processing result and the second random number in response to a user's storage operation; The method of claim 6 further comprising:
8. prior to obtaining a second random number provided by the user; receiving a confirmation from the user of the confidentiality processing result; The method of claim 1 , further comprising:
9. A method for verifying a random event, comprising: In response to the user's verification operation, sending a disclosure request to an operating platform, the disclosure request requesting the operating platform to disclose a first random number; receiving the first random number; Obtaining a second random number, generating a third random number based on the first random number and the second random number using an algorithm pre-agreed with the operating platform, generating a random number sequence using the third random number as a random seed, and verifying whether the random event derived from the random number sequence is the same as the random event actually generated by the operating platform; A method for verifying a random event, comprising:
10. A random event generating device, comprising: a confidentiality unit that performs confidentiality processing on the first random number using a confidentiality processing algorithm pre-agreed with a user based on the first random number, and provides the user with a confidentiality processing result, the confidentiality unit being configured to maintain confidentiality for the first random number with respect to the user, to disclose the first random number to the user in response to a disclosure request from the user, and to become invalid after being disclosed to the user; an acquiring unit for acquiring a second random number provided by the user; a random event generating unit that generates a third random number based on the first random number and the second random number using an algorithm previously agreed upon with the user, generates a random number sequence using the third random number as a random seed, and generates a random event derived from the random number sequence; A random event generating device comprising:
11. A random event verification device, comprising: A sending unit for sending a disclosure request to an operating platform in response to a user's verification operation, the disclosure request requesting the operating platform to disclose a first random number; a receiving unit for receiving the first random number; a verification unit for obtaining a second random number, generating a third random number based on the first random number and the second random number using an algorithm pre-agreed with the operating platform, generating a random number sequence using the third random number as a random seed, and verifying whether a random event derived from the random number sequence is the same as a random event actually generated by the operating platform; A random event verification device comprising:
12. A computer-readable storage medium having a computer program stored thereon, When the computer program is executed by a processor, the computer program performs the steps of the random event generation method according to any one of claims 1 to 8 or the steps of the random event verification method according to claim 9. A computer-readable storage medium comprising:
13. A terminal including a memory and a processor, The memory stores a computer program executable by the processor; When the processor executes the computer program, the processor executes steps of the random event generation method according to any one of claims 1 to 8 or steps of the random event verification method according to claim 9. A terminal characterized by: