Virtual resource transfer method, system, device, computer equipment and storage medium
Patent Information
- Application Number
- CN202211180348.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-09-27
AI Technical Summary
[0003]传统技术中,虚拟资源的转移方通常只需要提供用于实现虚拟资源转移的图像,即可实现虚拟资源的转移,然而,如果该图像被恶意盗取,则可能会造成虚拟资源的丢失,因此现有的虚拟资源转移方法安全性较低
[0044]The aforementioned virtual resource transfer method, system, apparatus, computer equipment, storage medium, and computer program product, in response to a virtual resource transfer request via a first terminal, generate an original image matching the virtual resource transfer request; receive an image encryption key from a third-party server used to manage virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryptions; send the multiple encrypted images to a second terminal; the second terminal uses the image encryption key received from the third-party server to obtain multiple decrypted images corresponding to the multiple encrypted images, and sends the multiple encrypted images and multiple decrypted images to the third-party server; the third-party server uses the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal. When the first terminal responds to a virtual resource transfer request, this application can use an image encryption key received from a third-party server to encrypt the original image multiple times to obtain multiple encrypted images. These encrypted images can then be sent to a second terminal, which can decrypt each encrypted image to obtain multiple decrypted images. Both encrypted and decrypted images are then sent to the third-party server, which uses these images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal to the second terminal executed. Compared to existing technologies where the second terminal simply receives the original image from the first terminal to transfer virtual resources, this application allows the first terminal to encrypt the original image multiple times, while the second terminal decrypts each encrypted image and verifies the encrypted and decrypted images before transferring the virtual resources. This improves the security of virtual resource transfer.
Smart Images

Figure CN115694896B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a virtual resource transfer method, system, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] With the development of data processing technology, a technology has emerged that uses image information to transfer virtual resources. The transferor of the virtual resources provides an image for the transfer, such as a QR code. After receiving the image, the recipient of the virtual resources can parse it and send a request to a third-party server that manages the virtual resources. The third-party server then completes the transfer of the virtual resources.
[0003] In traditional technologies, the transferor of virtual resources usually only needs to provide an image to achieve the transfer. However, if the image is maliciously stolen, the virtual resources may be lost. Therefore, existing virtual resource transfer methods have low security. Summary of the Invention
[0004] Therefore, it is necessary to provide a virtual resource transfer method, system, device, computer equipment, computer-readable storage medium, and computer program product that can improve the security of virtual resource transfer in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a virtual resource transfer method applied to a first terminal, the method comprising:
[0006] In response to a virtual resource transfer request, an original image matching the virtual resource transfer request is generated;
[0007] The image encryption key is received from a third-party server used to manage virtual resources. The original image is then encrypted using the image encryption key a preset number of times to obtain multiple encrypted images. The number of encrypted images is the preset number of encryption times.
[0008] The encrypted images are sent to a second terminal; the second terminal uses the image encryption key received from the third-party server to obtain multiple decrypted images corresponding to the encrypted images, and sends the encrypted images and the decrypted images to the third-party server; the third-party server uses the encrypted images and the decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result indicates that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0009] In one embodiment, the step of encrypting the original image with the image encryption key for a preset number of encryption cycles to obtain multiple encrypted images includes: encrypting the original image with the image encryption key to obtain a first encrypted image; encrypting the first encrypted image with the image encryption key to obtain a second encrypted image; using the second encrypted image as a new first encrypted image, and returning to the step of encrypting the first encrypted image with the image encryption key to obtain a second encrypted image, until the number of encryption cycles reaches the preset number of encryption cycles, and using the multiple first encrypted images as the multiple encrypted images.
[0010] In one embodiment, the encryption process includes scrambling for a preset number of iterations; the step of encrypting the original image using the image encryption key to obtain a first encrypted image includes: scrambling the original image using the image encryption key to generate a first scrambled image; updating the image encryption key based on a Game of Life model to obtain an updated encryption key; scrambling the first scrambled image using the updated encryption key to obtain a second scrambled image; using the second scrambled image as the new first scrambled image, and using the updated encryption key as the new image encryption key, and returning to execute the step of updating the image encryption key based on a Game of Life model to obtain an updated encryption key, until the number of scrambling rounds reaches the preset number of iterations, and the second scrambled image is used as the first encrypted image.
[0011] In one embodiment, the method further includes: in response to the virtual resource transfer request, obtaining first address information and first time information of the first terminal matching the virtual resource transfer request; binding the first address information and first time information to the original image, and sending the first address information and first time information to the third-party server; the third-party server is further configured to obtain second address information and second time information from the plurality of decrypted images, and using the first address information and first time information, and the second address information and second time information, obtain a second verification result for the virtual resource transfer request; if both the first verification result and the second verification result are determined to be verified as passed, transferring the virtual resources of the first terminal to the second terminal.
[0012] Secondly, this application also provides a virtual resource transfer method applied to a second terminal, the method comprising:
[0013] The system receives multiple encrypted images sent by a first terminal and an image encryption key from a third-party server used for managing virtual resources. The multiple encrypted images are obtained by the first terminal using the image encryption key received from the third-party server to encrypt the original image matching the virtual resource transfer request a preset number of times. The number of encrypted images is the preset number of encryption times.
[0014] Using the image encryption key, the multiple encrypted images are decrypted respectively to obtain multiple decrypted images corresponding to the multiple encrypted images;
[0015] The encrypted images and the decrypted images are sent to the third-party server; the third-party server uses the encrypted images and the decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result indicates that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0016] In one embodiment, the step of using the image encryption key to decrypt the plurality of encrypted images to obtain a plurality of decrypted images corresponding to the plurality of encrypted images includes: obtaining the current encrypted image; and using the image encryption key to decrypt the current encrypted image to obtain the current decrypted image corresponding to the current encrypted image.
[0017] In one embodiment, the decryption process includes a recovery scrambling process with a preset number of iterations; the step of decrypting the current encrypted image using the image encryption key to obtain the current decrypted image corresponding to the current encrypted image includes: updating the image encryption key a preset number of times based on the Game of Life model to obtain an updated encryption key; the preset update number is the preset iteration number minus one; using the current encrypted image as the current image to be decrypted, and obtaining the target encryption key corresponding to the current recovery scrambling round from the image encryption key and the updated encryption key, using the target encryption key to perform recovery scrambling on the current image to be decrypted to generate a recovered scrambling image; using the recovered scrambling image as the new current image to be decrypted, and returning to the step of obtaining the target encryption key corresponding to the current recovery scrambling round, until the number of recovery scrambling rounds reaches the preset number of iterations, and using the recovered scrambling image as the current decrypted image.
[0018] Thirdly, this application also provides a virtual resource transfer method, applied to a third-party server managing virtual resources, the method comprising:
[0019] The image encryption key is sent to a first terminal and a second terminal respectively. The first terminal is used to use the image encryption key to encrypt the original image matching the virtual resource transfer request a preset number of times to obtain multiple encrypted images, and then sends the multiple encrypted images to the second terminal. The number of encrypted images is the preset number of encryption times. The second terminal is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and then sends the multiple encrypted images and the multiple decrypted images to the third-party server.
[0020] Receive the plurality of encrypted images and the plurality of decrypted images, and use the plurality of encrypted images and the plurality of decrypted images to obtain a first verification result for the virtual resource transfer request;
[0021] If the first verification result indicates that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0022] In one embodiment, the plurality of encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. Obtaining the first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images includes: obtaining the current encrypted image of the current encryption round; the current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round; obtaining the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image; if the previous encrypted image matches the decrypted image corresponding to the current encrypted image, determining the verification result of the current encrypted image as verified; if the verification results of all current encrypted images are determined to be verified, determining the first verification result as verified.
[0023] In one embodiment, the method further includes: receiving from the first terminal first address information and first time information of the first terminal that match the virtual resource transfer request; obtaining from a plurality of decrypted images a target decrypted image corresponding to the encrypted image of the first encryption round, and obtaining second address information and second time information bound to the target decrypted image; determining a second verification result for the virtual resource transfer request as verified if the first address information matches the second address information and the first time information matches the second time information; and transferring the virtual resources of the first terminal to the second terminal if the first verification result is determined to be verified, including: transferring the virtual resources of the first terminal to the second terminal if both the first verification result and the second verification result are determined to be verified.
[0024] Fourthly, this application also provides a virtual resource transfer system, including: a first terminal, a second terminal, and a third-party server for managing virtual resources; wherein,
[0025] The third-party server is used to send the image encryption key to the first terminal and the second terminal respectively.
[0026] The first terminal is configured to respond to a virtual resource transfer request, generate an original image matching the virtual resource transfer request, and use an image encryption key received from the third-party server to encrypt the original image a preset number of times to obtain multiple encrypted images, and send the multiple encrypted images to the second terminal; the number of encrypted images is the preset number of encryption times;
[0027] The second terminal is configured to receive the plurality of encrypted images sent by the first terminal, and use the image encryption key received from the third-party server to decrypt the plurality of encrypted images respectively to obtain a plurality of decrypted images corresponding to the plurality of encrypted images, and send the plurality of encrypted images and the plurality of decrypted images to the third-party server.
[0028] The third-party server is also configured to receive the plurality of encrypted images and the plurality of decrypted images, and use the plurality of encrypted images and the plurality of decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0029] Fifthly, this application also provides a virtual resource transfer device applied to a first terminal, the device comprising:
[0030] An original image generation module is used to generate an original image that matches the virtual resource transfer request in response to the virtual resource transfer request;
[0031] An encrypted image generation module is used to receive an image encryption key from a third-party server used for managing virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryption times.
[0032] A first image sending module is used to send the plurality of encrypted images to a second terminal; the second terminal is used to obtain a plurality of decrypted images corresponding to the plurality of encrypted images using the image encryption key received from the third-party server, and send the plurality of encrypted images and the plurality of decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0033] Sixthly, this application also provides a virtual resource transfer device for use in a second terminal, the device comprising:
[0034] The first image receiving module is used to receive multiple encrypted images sent by the first terminal, and to receive image encryption keys from a third-party server for managing virtual resources; the multiple encrypted images are obtained by the first terminal using the image encryption keys received from the third-party server to encrypt the original image matching the virtual resource transfer request a preset number of times; the number of encrypted images is the preset number of encryption times.
[0035] The image decryption acquisition module is used to decrypt the multiple encrypted images using the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images respectively;
[0036] The second image sending module is used to send the plurality of encrypted images and the plurality of decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0037] Seventhly, this application also provides a virtual resource transfer device, applied to a third-party server managing virtual resources, the device comprising:
[0038] An encryption key sending module is used to send an image encryption key to a first terminal and a second terminal respectively; the first terminal is used to use the image encryption key to encrypt the original image matching the virtual resource transfer request a preset number of times to obtain multiple encrypted images, and send the multiple encrypted images to the second terminal; the number of encrypted images is the preset number of encryption times; the second terminal is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and send the multiple encrypted images and the multiple decrypted images to the third-party server;
[0039] The second image receiving module is used to receive the plurality of encrypted images and the plurality of decrypted images, and to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images;
[0040] The virtual resource transfer module is used to transfer the virtual resources of the first terminal to the second terminal when the first verification result determines that the verification is successful.
[0041] Eighthly, this application also provides a computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method as described in any one of the embodiments of the first, second, and third aspects.
[0042] Ninthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in any one of the embodiments of the first, second, and third aspects.
[0043] In a tenth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first, second, and third aspects.
[0044] The aforementioned virtual resource transfer method, system, apparatus, computer equipment, storage medium, and computer program product, in response to a virtual resource transfer request via a first terminal, generate an original image matching the virtual resource transfer request; receive an image encryption key from a third-party server used to manage virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryptions; send the multiple encrypted images to a second terminal; the second terminal uses the image encryption key received from the third-party server to obtain multiple decrypted images corresponding to the multiple encrypted images, and sends the multiple encrypted images and multiple decrypted images to the third-party server; the third-party server uses the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal. When the first terminal responds to a virtual resource transfer request, this application can use an image encryption key received from a third-party server to encrypt the original image multiple times to obtain multiple encrypted images. These encrypted images can then be sent to a second terminal, which can decrypt each encrypted image to obtain multiple decrypted images. Both encrypted and decrypted images are then sent to the third-party server, which uses these images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal to the second terminal executed. Compared to existing technologies where the second terminal simply receives the original image from the first terminal to transfer virtual resources, this application allows the first terminal to encrypt the original image multiple times, while the second terminal decrypts each encrypted image and verifies the encrypted and decrypted images before transferring the virtual resources. This improves the security of virtual resource transfer. Attached Figure Description
[0045] Figure 1 This is a diagram illustrating the application environment of a virtual resource transfer method in one embodiment;
[0046] Figure 2 This is a flowchart illustrating a virtual resource transfer method in one embodiment;
[0047] Figure 3 This is a schematic diagram illustrating the process of obtaining multiple encrypted images in one embodiment;
[0048] Figure 4 This is a schematic diagram of the process for obtaining the first encrypted image in one embodiment;
[0049] Figure 5 This is a flowchart illustrating a virtual resource transfer method in one embodiment;
[0050] Figure 6 This is a schematic diagram illustrating the process of obtaining the currently decrypted image in one embodiment;
[0051] Figure 7 This is a flowchart illustrating a virtual resource transfer method in one embodiment;
[0052] Figure 8 This is a flowchart illustrating the process of obtaining the first verification result in one embodiment;
[0053] Figure 9 This is a schematic diagram of the structure of a virtual resource transfer system in one embodiment;
[0054] Figure 10 This is a schematic diagram of the architecture of a virtual resource transfer system in an application instance.
[0055] Figure 11 This is a flowchart illustrating the virtual resource transfer method in an application example.
[0056] Figure 12 This is a flowchart illustrating an image scrambling algorithm in an application example.
[0057] Figure 13 This is a schematic diagram of the structure of the graphic code generation end in an application example;
[0058] Figure 14 This is a schematic diagram of the structure of a scanning terminal in an application example.
[0059] Figure 15 This is a flowchart illustrating the process of image code verification in an application example.
[0060] Figure 16 This is a structural block diagram of a virtual resource transfer device in one embodiment;
[0061] Figure 17 This is a structural block diagram of a virtual resource transfer device in one embodiment;
[0062] Figure 18 This is a structural block diagram of a virtual resource transfer device in one embodiment;
[0063] Figure 19 This is an internal structural diagram of a computer device in one embodiment;
[0064] Figure 20 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] The virtual resource transfer method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, the first terminal 101 and the second terminal 102 communicate with a third-party server 103 for managing virtual resources. Specifically, the third-party server 103 can provide image encryption keys to the first terminal 101 and the second terminal 102. When a user triggers a virtual resource transfer request to the first terminal 101, the first terminal 101 can respond to the request by generating a corresponding original image. Then, it can use the image encryption key to encrypt the original image multiple times, obtaining multiple encrypted images, which are then transmitted to the second terminal 102. After obtaining the multiple encrypted images, the second terminal 102 can use the image encryption key provided by the third-party server 103 to decrypt each of the multiple encrypted images, obtaining the decrypted images corresponding to each encrypted image. Then, the second terminal 102 can send the multiple encrypted images and their corresponding decrypted images to the third-party server 103. The third-party server 103 verifies the virtual resource transfer request based on the multiple encrypted images and decrypted images. If the verification is successful, the virtual resource transfer can be realized. The first terminal 101 and the second terminal 102 can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. The third-party server 103 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0067] In one embodiment, such as Figure 2 As shown, a virtual resource transfer method is provided, which is applied to... Figure 1 Taking the first terminal 101 as an example, the explanation includes the following steps:
[0068] Step S201: In response to the virtual resource transfer request, generate an original image that matches the virtual resource transfer request.
[0069] The virtual resource transfer request is triggered by the user of the first terminal 101 to transfer the virtual resources they own. The request can be triggered by the user opening the virtual resource transfer on the first terminal 101, and the first terminal 101 can transfer the virtual resources held by the user. The original image refers to an image that has not been encrypted. The original image can be a QR code, and the original image can be used to realize the transfer of virtual resources.
[0070] Specifically, when a user triggers a virtual resource transfer request through the first terminal, such as when the user opens a page for transferring virtual resources, the terminal 101 can respond to the virtual resource transfer request and generate a QR code image corresponding to the virtual resource transfer request as the original image.
[0071] Step S202: Receive an image encryption key from a third-party server 103 used to manage virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryption times.
[0072] Third-party server 103 refers to the backend server that manages virtual resources, while the image encryption key refers to the key used to encrypt the original image. This key can be an encryption matrix that is pre-set on the third-party server 103 and provided to the first terminal 101 in advance. The preset number of encryptions refers to the number of times the original image is encrypted, and the encrypted image is the image obtained after each encryption of the original image.
[0073] After generating the original image, the first terminal 101 can further encrypt the original image by a preset number of times using the image encryption key obtained from the third-party server 103, thereby obtaining the same number of encrypted images as the preset number of times of encryption. For example, the preset number of times of encryption can be 3 times. After obtaining the original image, the first terminal 101 can use the image encryption key to encrypt the original image 3 times, thereby obtaining 3 encrypted images.
[0074] Step S203: Send multiple encrypted images to the second terminal 102; The second terminal 102 is used to obtain multiple decrypted images corresponding to the multiple encrypted images using the image encryption key received from the third-party server 103, and send the multiple encrypted images and multiple decrypted images to the third-party server 103; The third-party server 103 is used to obtain a first verification result for the virtual resource transfer request using the multiple encrypted images and multiple decrypted images; If the first verification result is determined to be successful, the virtual resources of the first terminal 101 are transferred to the second terminal 102.
[0075] The second terminal 102 is a user terminal used to receive the transferred virtual resources. This second terminal 102 may be equipped with an image decryption module to decrypt the encrypted images and obtain the corresponding decrypted images. The first verification result refers to the verification result obtained by the third-party server 103 based on the aforementioned multiple encrypted and decrypted images regarding the virtual resource transfer request.
[0076] Specifically, after obtaining multiple encrypted images, the first terminal 101 can send the obtained encrypted images to the second terminal 102. For example, the second terminal 102 can obtain multiple encrypted images by scanning the multiple encrypted images. Then, the second terminal 102 can further use the image encryption key provided to the second terminal 102 by the third-party server 103 to decrypt the encrypted images respectively to obtain the decrypted image corresponding to each encrypted image. After that, the multiple encrypted images and multiple decrypted images can be sent to the third-party server 103.
[0077] After receiving multiple encrypted images and multiple decrypted images provided by the second terminal 102, the third-party server 103 can use the multiple encrypted images and multiple decrypted images to perform the first verification of the virtual resource transfer request and obtain the corresponding first verification result. If the first verification result indicates that the verification is successful, the virtual resources of the first terminal 101 can be transferred to the second terminal 102 to realize the transfer of virtual resources.
[0078] In the above virtual resource transfer method, the first terminal 101 responds to the virtual resource transfer request by generating an original image matching the virtual resource transfer request; it receives an image encryption key from a third-party server 103 that manages virtual resources, and uses the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryptions; the multiple encrypted images are sent to the second terminal 102; the second terminal 102 uses the image encryption key received from the third-party server 103 to obtain multiple decrypted images corresponding to the multiple encrypted images, and sends the multiple encrypted images and multiple decrypted images to the third-party server 103; the third-party server 103 uses the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of the first terminal 101 are transferred to the second terminal 102. When the first terminal 101 responds to a virtual resource transfer request, this application can use the image encryption key received from the third-party server 103 to encrypt the original image multiple times to obtain multiple encrypted images. Simultaneously, these multiple encrypted images can be sent to the second terminal 102. The second terminal 102 can then decrypt each of the encrypted images to obtain multiple decrypted images. Both the encrypted and decrypted images are then sent to the third-party server 103. The third-party server 103 uses these encrypted and decrypted images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal 101 to the second terminal 102 executed. Compared to the prior art where the second terminal 102 simply receives the original image from the first terminal 101 to transfer virtual resources, this application allows the first terminal 101 to encrypt the original image multiple times, while the second terminal 102 can decrypt each of the multiple encrypted images and verify them before transferring the virtual resources. This improves the security of virtual resource transfer.
[0079] In one embodiment, such as Figure 3 As shown, step S202 may further include:
[0080] Step S301: Encrypt the original image using the image encryption key to obtain the first encrypted image;
[0081] Step S302: Encrypt the first encrypted image using the image encryption key to obtain the second encrypted image.
[0082] The first encrypted image refers to the encrypted image obtained after encrypting the original image, while the second encrypted image is the encrypted image obtained after further encryption. In this embodiment, obtaining multiple encrypted images by encrypting the original image multiple times can be achieved by first encrypting the original image to obtain an encrypted image, and then further encrypting the obtained encrypted image again.
[0083] For example, the first terminal 101 can first encrypt the original image using the image encryption key to obtain the encrypted image 1 as the first encrypted image. Then, the encrypted image 1 can be encrypted again using the image encryption key to obtain the encrypted image 2 as the second encrypted image.
[0084] Step S303: Use the second encrypted image as the new first encrypted image, and return to step S302 until the number of encryption rounds reaches the preset number of encryption times, and use multiple first encrypted images as multiple encrypted images.
[0085] The number of encryption rounds refers to the number of encryption cycles corresponding to each round. After the second encrypted image, the obtained second encrypted image can be added as a new first encrypted image. That is, encrypted image 2, which is the second encrypted image, is used again as the first encrypted image, and the process returns to step S302 to encrypt encrypted image 2 using the image encryption key to obtain encrypted image 3, which is then used again as a new first encrypted image. This process continues until the number of encryption rounds reaches a preset number of encryption cycles. For example, if the preset number of encryption cycles is 3, since terminal 101 has already performed 3 encryption rounds, the multiple first encrypted images currently included, namely encrypted image 1, encrypted image 2, and encrypted image 3, can be used as multiple encrypted images. However, if the preset number of encryption cycles is 4, and terminal 101 has not yet performed 4 encryption rounds, then it is necessary to encrypt encrypted image 3 again using the image encryption key to obtain a new encrypted image 4.
[0086] In this embodiment, the original image can be encrypted using an image encryption key to obtain the first encrypted image. After obtaining the first encrypted image, the image encryption key can be used again to encrypt the first encrypted image, thereby realizing multiple encryption processes on the original image and further improving the security of the encryption process.
[0087] Furthermore, the encryption process includes scrambling operations for a preset number of iterations; such as Figure 4 As shown, step S301 may further include:
[0088] Step S401: Use the image encryption key to scramble the original image to generate the first scrambled image.
[0089] The first scrambled image refers to the scrambled image obtained after scrambling the original image. In this embodiment, an encryption process can consist of multiple scrambling processes, and the encryption key, i.e., the encryption matrix, used in each scrambling process can be different. After obtaining the original image, the first terminal 101 can first perform a first scrambling process on the original image based on the image encryption key to obtain the first scrambled image.
[0090] Step S402: Based on the Game of Life model, update the image encryption key to obtain the updated encryption key.
[0091] The Game of Life model refers to the GL model, which can be used to update the elements of an encryption matrix according to a certain set update rule. Since the image encryption key in this application is itself an encryption matrix, the Game of Life model can be used to update the matrix elements of the encryption matrix to obtain an updated encryption matrix, which can then be used as the updated encryption key.
[0092] Step S403: Use the updated encryption key to scramble the first scrambled image to obtain the second scrambled image.
[0093] The second scrambled image refers to the scrambled image obtained by scrambling the first scrambled image again. After obtaining the updated encryption key in step S402, the updated encryption key can be used to scramble the first scrambled image obtained in step S401 again to obtain a new second scrambled image.
[0094] Step S404: Use the second scrambled image as the new first scrambled image, and use the updated encryption key as the new image encryption key. Then return to execute the step of updating the image encryption key based on the Game of Life model to obtain the updated encryption key, until the number of scrambling rounds reaches the preset number of iterations, and use the second scrambled image as the first encrypted image.
[0095] After obtaining the second scrambled image, since the encryption process in this embodiment consists of multiple iterations of scrambling, if the second scrambled image obtained by the current scrambling has not yet met the preset number of iterations, it is necessary to scramble the second scrambled image again. That is, by using the obtained second scrambled image as the new first scrambled image and the updated encryption key as the new image encryption key, and at the same time using the Game of Life model to update the image encryption key again, after obtaining the updated encryption key again, the updated encryption key can be used to scramble the new first scrambled image again to obtain the second scrambled image. This process continues until the number of scrambling processes reaches the preset number of iterations, at which point the second scrambled image obtained by the last scrambling process can be used as the first encrypted image corresponding to the original image.
[0096] For example, the image encryption key received from the third-party server 103 can be encryption matrix A. If the preset iteration number of scrambling is 3, after obtaining the original image, the original image can be scrambled for the first time based on encryption matrix A to obtain scrambled image 1 as the first scrambled image. Then, the encryption matrix A can be updated using the Game of Life model to obtain encryption matrix B as the updated encryption key. Encryption matrix B is then used again to scramble scrambled image 1 to obtain scrambled image 2 as the second scrambled image. Since the number of scrambling rounds is 2 at this point, which does not meet the preset iteration number of 3, scrambled image 2 needs to be used as the new first scrambled image again, and encryption matrix B is used as the new image encryption key. Encryption matrix B is then updated again using the Game of Life model to obtain encryption matrix C. Encryption matrix C is then used to scramble scrambled image 2 again to obtain scrambled image 3 as the second scrambled image. Since the preset iteration number of scrambling rounds has been met, scrambled image 3 as the second scrambled image can be used as the first encrypted image of the original image.
[0097] Alternatively, the process of generating a second encrypted image from the first encrypted image can also be implemented as in steps S401 to S404. By replacing the original image in step S401 with the first encrypted image, the first encrypted image can be encrypted using steps S401 to S404 to obtain the second encrypted image.
[0098] In this embodiment, the encryption of the original image can be achieved by scrambling the image a preset number of times. The image is scrambled using an encryption key, and the encryption key can be updated based on the Game of Life model. This allows the encryption key used in each scrambling process to be different, further improving the security of the obtained first encrypted image.
[0099] In addition, the virtual resource transfer method may further include: in response to a virtual resource transfer request, obtaining first address information and first time information of a first terminal 101 that matches the virtual resource transfer request; binding the first address information and first time information to the original image, and sending the first address information and first time information to a third-party server 103; the third-party server 103 is further configured to obtain second address information and second time information from multiple decrypted images, and using the first address information and first time information, along with the second address information and second time information, to obtain a second verification result for the virtual resource transfer request; if both the first verification result and the second verification result are determined to be verified as passed, transferring the virtual resources of the first terminal 101 to the second terminal 102.
[0100] The first address information refers to the MAC address information corresponding to the first terminal 101 when responding to the virtual resource transfer request, while the first time information refers to the timestamp information corresponding to the first terminal 101 when responding to the virtual resource transfer request. The second address information refers to the MAC address information obtained by the third-party server 103 based on the decrypted image, while the second time information refers to the timestamp information obtained by the third-party server 103 based on the decrypted image.
[0101] In this embodiment, each time the first terminal 101 responds to a virtual resource transfer request and generates an original image, it can obtain the first address information and the first time information of the response and send them to the third-party server 103. Simultaneously, the first address information and the first time information can be bound to the original image. After the original image is encrypted and sent to the second terminal 102, the second terminal 102 can decrypt the encrypted image to obtain a decrypted image, which also necessarily corresponds to the second address information and the second time information. After obtaining the decrypted image, the third-party server 103 can further determine the second address information and the second time information. Then, it can further use the first address information and the first time information obtained from the first terminal 101 to verify the second address information and the second time information to obtain the corresponding second verification result. Thus, the third-party server 103 can further transfer the virtual resources based on the first verification result and the second verification result. That is, the step of transferring the virtual resources of the first terminal 101 to the second terminal 102 is only executed when both the first verification result and the second verification result are determined to be verified successfully.
[0102] In this embodiment, the first terminal 101 can also send the first address information and the first time information to the third-party server 103, and bind the first address information and the first time information to the original image. After the third-party server 103 obtains the second address information and the second time information based on the decrypted image, it can use the first address information and the first time information, as well as the second address information and the second time information, to obtain the second verification result, thereby further improving the security of virtual resource transfer.
[0103] In one embodiment, such as Figure 5 As shown, a virtual resource transfer method is provided, which can be applied to... Figure 1 Taking the second terminal 102 as an example, the explanation includes the following steps:
[0104] Step S501: Receive multiple encrypted images sent by the first terminal 101, and receive image encryption keys from the third-party server 103 used for managing virtual resources; the multiple encrypted images are obtained by the first terminal 101 using the image encryption keys received from the third-party server 103 to encrypt the original image matching the virtual resource transfer request a preset number of times; the number of encrypted images is the preset number of encryption times.
[0105] Specifically, the third-party server 103 can pre-send an encryption matrix, i.e., an image encryption key, for image encryption processing to both the first terminal 101 and the second terminal 102. After the first terminal 101 responds to the virtual resource transfer request and generates the original image, it can use the received image encryption key to encrypt the original image a preset number of times, thereby generating a number of encrypted images corresponding to the preset number of encryptions. These encrypted images are then sent to the second terminal 102 via scanning. The second terminal 102 can then receive the multiple encrypted images sent by the first terminal 101 and the corresponding image encryption key from the third-party server 103.
[0106] Step S502: Using the image encryption key, decrypt the multiple encrypted images respectively to obtain multiple decrypted images corresponding to the multiple encrypted images.
[0107] In this context, a decrypted image is the image obtained after decrypting an encrypted image. After receiving multiple encrypted images, the second terminal 102 can use the image encryption key obtained from the third-party server 103 to decrypt each of the encrypted images, thus obtaining a decrypted image corresponding to each encrypted image. For example, if the encrypted images received by the second terminal 102 include encrypted image 1, encrypted image 2, and encrypted image 3, the second terminal 102 can further use the image encryption key to decrypt each of the encrypted images, thus obtaining a decrypted image corresponding to each encrypted image. That is, it obtains decrypted image 1 corresponding to encrypted image 1, decrypted image 2 corresponding to encrypted image 2, and decrypted image 3 corresponding to encrypted image 3, thereby obtaining multiple decrypted images.
[0108] In step S503, multiple encrypted images and multiple decrypted images are sent to a third-party server 103; the third-party server 103 uses the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result is determined to be successful, the virtual resources of the first terminal 101 are transferred to the second terminal 102.
[0109] After obtaining multiple decrypted images, the second terminal 102 can send the multiple encrypted and decrypted images to the third-party server 103. The third-party server uses the obtained multiple encrypted and decrypted images to verify the virtual resource transfer request triggered by the first terminal 101 to obtain a first verification result. If the first verification result indicates that the verification is successful, the third-party server 103 can then execute the transfer of the virtual resources of the first terminal 101 to the second terminal 102, thereby realizing the transfer of virtual resources.
[0110] In the above virtual resource transfer method, the second terminal 102 receives multiple encrypted images sent by the first terminal 101, and receives image encryption keys from a third-party server 103 used to manage virtual resources. The multiple encrypted images are obtained by the first terminal using the image encryption keys received from the third-party server to encrypt the original image matching the virtual resource transfer request a preset number of times. The number of encrypted images is the preset number of encryption times. Using the image encryption keys, the multiple encrypted images are decrypted to obtain multiple decrypted images corresponding to each encrypted image. The multiple encrypted images and the multiple decrypted images are sent to the third-party server 103. The third-party server 103 uses the multiple encrypted images and the multiple decrypted images to obtain a first verification result for the virtual resource transfer request. If the first verification result indicates successful verification, the virtual resources of the first terminal 101 are transferred to the second terminal 102. When the first terminal 101 responds to a virtual resource transfer request, this application can use the image encryption key received from the third-party server 103 to encrypt the original image multiple times to obtain multiple encrypted images. Simultaneously, these multiple encrypted images can be sent to the second terminal 102. The second terminal 102 can then decrypt each of the encrypted images to obtain multiple decrypted images. Both the encrypted and decrypted images are then sent to the third-party server 103. The third-party server 103 uses these encrypted and decrypted images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal 101 to the second terminal 102 executed. Compared to the prior art where the second terminal 102 simply receives the original image from the first terminal 101 to transfer virtual resources, this application allows the first terminal 101 to encrypt the original image multiple times, while the second terminal 102 can decrypt each of the multiple encrypted images and verify them before transferring the virtual resources. This improves the security of virtual resource transfer.
[0111] In one embodiment, step S502 may further include: obtaining the current encrypted image; using the image encryption key to decrypt the current encrypted image to obtain the current decrypted image corresponding to the current encrypted image.
[0112] The current encrypted image refers to any one of the multiple encrypted images received by the second terminal 102, while the current decrypted image refers to the decrypted image obtained by decrypting the current encrypted image. In this embodiment, the second terminal 102 can use any one of the received multiple encrypted images as the current encrypted image and use the image encryption key to decrypt the current encrypted image, thereby obtaining the current decrypted image corresponding to the current encrypted image. Through the above method, each encrypted image can be decrypted into a decrypted image, thus realizing the decryption processing of each encrypted image.
[0113] In this embodiment, the second terminal 102 can use the image encryption key to decrypt each currently encrypted image to obtain the currently decrypted image. Through the above method, the decryption of each encrypted image is realized, further improving the accuracy of the decryption process.
[0114] Furthermore, the decryption process includes a recovery scrambling process with a preset number of iterations; such as Figure 6 As shown,
[0115] Step S601: Based on the Game of Life model, update the image encryption key a preset number of times to obtain the updated encryption key; the preset number of updates is the preset number of iterations minus one.
[0116] The preset iteration count refers to the number of times a currently encrypted image is scrambled and restored, while the preset update count refers to the number of times the image encryption key is updated. In this embodiment, the first terminal 101 encrypts the image by scrambling it using the image encryption key for the preset iteration count. Each scrambling operation uses a different encryption matrix, which is obtained by updating the image encryption key using the Game of Life model. Therefore, decrypting the encrypted image also requires the preset iteration count of scrambling and restoration. Similarly, the image encryption key needs to be updated using the Game of Life model in the same way as the scrambling operation to obtain the encryption matrix required for each scrambling and restoration operation, i.e., updating the encryption key. Since the first iteration of image encryption directly uses the image encryption key for scrambling, meaning the number of updates to the image encryption key is the preset iteration count for encryption minus one, the number of updates to the image encryption key during decryption is also the preset iteration count for decryption minus one.
[0117] After obtaining the image encryption key, the second terminal 102 can also perform a preset number of update processes on the image encryption key based on the Game of Life model, thereby obtaining the updated encryption key obtained in each update process.
[0118] Step S602: Take the current encrypted image as the current image to be decrypted, and obtain the target encryption key corresponding to the current recovery scrambling process from the image encryption key and the update encryption key. Use the target encryption key to perform recovery scrambling on the current image to be decrypted to generate a recovery scrambling image.
[0119] The image to be decrypted refers to the image that needs to be restored from scrambling. The target encryption key refers to the encryption key that is appropriate for the current scrambling round, which is between the image encryption key and the update encryption key. If the current scrambling round is the first round, the target encryption key used is the update encryption key obtained in the last round. If the current scrambling round is the last round, which is the round number corresponding to the preset iteration number, the target encryption key used is the image encryption key.
[0120] When the second terminal 102 decrypts the current encrypted image in the first round, it can first use the current encrypted image as the current image to be decrypted, and use the updated encryption key obtained in the last round as the target encryption key. Then, it can use the target encryption key to perform scrambling and restoration processing on the current image to be decrypted, thereby generating the corresponding restored and scrambled image.
[0121] Step S603: The restored scrambled image is used as the new current image to be decrypted, and the process returns to step S602 until the number of rounds of scrambling restoration reaches the preset number of iterations, at which point the restored scrambled image is used as the current image to be decrypted.
[0122] Finally, the second terminal 102 can use the obtained restored scrambled image as the current image to be decrypted again, and at the same time obtain the target encryption key corresponding to the current restoration scrambling process round, and perform restoration scrambling process again until the number of restoration scrambling processes reaches the preset number of iterations, and use the restored scrambled image obtained in the last round as the current decrypted image.
[0123] For example, with a preset iteration count of 3, after the second terminal 102 obtains the current encrypted image, it can first update the image encryption key twice based on the Game of Life model, obtaining two updated encryption keys, namely updated encryption key A and updated encryption key B. Then, it can use the updated encryption key B obtained from the last iteration to perform the first scrambling process on the current encrypted image, obtaining a scrambled image 1. At this point, the number of scrambling rounds is 1, which is less than 3. It can then use the target encryption key corresponding to the current scrambling round, which can be updated encryption key A, to perform scrambling process on scrambled image 1 again, obtaining scrambled image 2. At this point, the number of scrambling rounds is 2, which is less than 3. Therefore, it can use the target encryption key corresponding to the current scrambling round, i.e., the image encryption key, to perform scrambling process on scrambled image 2 again, obtaining scrambled image 3. Since the number of scrambling rounds has now reached 3, the second terminal 102 can use the last obtained scrambled image, i.e., scrambled image 3, as the current decrypted image.
[0124] In this embodiment, the second terminal 102 can first update the image encryption key multiple times through the Game of Life model to obtain the updated encryption key, and then use the target encryption key corresponding to each round to restore and scramble the current image to be decrypted in the corresponding round until the number of rounds of restoration and scrambling reaches the preset number of iterations. This allows the acquisition of the decrypted image to correspond to the method of generating the encrypted image, further improving the accuracy of the acquisition of the decrypted image.
[0125] In one embodiment, such as Figure 7 As shown, a virtual resource transfer method is provided, which can be applied to... Figure 1 Taking a third-party server 103 that manages virtual resources as an example, the following steps are included:
[0126] Step S701: The image encryption key is sent to the first terminal 101 and the second terminal 102 respectively. The first terminal 101 is used to use the image encryption key to encrypt the original image that matches the virtual resource transfer request for a preset number of times to obtain multiple encrypted images, and sends the multiple encrypted images to the second terminal 102. The number of encrypted images is the preset number of encryption times. The second terminal 102 is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and sends the multiple encrypted images and multiple decrypted images to the third-party server 103.
[0127] Specifically, the third-party server 103 can send an encryption matrix, i.e. an image encryption key, for image encryption processing to the first terminal 101 and the second terminal 102 respectively in advance. After the first terminal 101 responds to the virtual resource transfer request and generates the original image, it can use the received image encryption key to encrypt the original image for a preset number of times, thereby generating a number of encrypted images corresponding to the preset number of encryption times. It can also send the above-mentioned multiple encrypted images to the second terminal 102. The second terminal 102 can use the received image encryption key to decrypt the above-mentioned multiple encrypted images respectively, thereby restoring them into multiple decrypted images. After that, it returns the multiple encrypted images and multiple decrypted images to the third-party server 103.
[0128] Step S702: Receive multiple encrypted images and multiple decrypted images, and use the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request;
[0129] Step S703: If the first verification result is confirmed as successful, the virtual resources of the first terminal 101 are transferred to the second terminal 102.
[0130] The first verification result refers to the verification result obtained by verifying the virtual resource transfer request using encrypted and decrypted images. After the third-party server 103 receives multiple encrypted and decrypted images, it can use these multiple encrypted and decrypted images to verify the virtual resource transfer request and obtain the corresponding first verification result. If the first verification result is determined to be successful, the third-party server 103 can then execute the transfer of the virtual resources from the first terminal 101 to the second terminal 102, thereby realizing the transfer of virtual resources.
[0131] In the above virtual resource transfer method, the third-party server 103, which manages the virtual resources, sends the image encryption key to the first terminal 101 and the second terminal 102 respectively. The first terminal 101 uses the image encryption key to encrypt the original image matching the virtual resource transfer request a preset number of times to obtain multiple encrypted images, and sends the multiple encrypted images to the second terminal 102. The number of encrypted images is the preset number of encryption times. The second terminal 102 uses the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and sends the multiple encrypted images and multiple decrypted images to the third-party server 103. It receives the multiple encrypted images and multiple decrypted images, and uses the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request. If the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal. When the first terminal 101 responds to a virtual resource transfer request, this application can use the image encryption key received from the third-party server 103 to encrypt the original image multiple times to obtain multiple encrypted images. Simultaneously, these multiple encrypted images can be sent to the second terminal 102. The second terminal 102 can then decrypt each of the encrypted images to obtain multiple decrypted images. Both the encrypted and decrypted images are then sent to the third-party server 103. The third-party server 103 uses these encrypted and decrypted images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal 101 to the second terminal 102 executed. Compared to the prior art where the second terminal 102 simply receives the original image from the first terminal 101 to transfer virtual resources, this application allows the first terminal 101 to encrypt the original image multiple times, while the second terminal 102 can decrypt each of the multiple encrypted images and verify them before transferring the virtual resources. This improves the security of virtual resource transfer.
[0132] In one embodiment, multiple encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round; for example... Figure 8 As shown, step S702 may further include:
[0133] Step S801: Obtain the current encrypted image of the current encryption round; the current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round.
[0134] Step S802: Obtain the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image.
[0135] In this embodiment, each encrypted image obtained by the first terminal 101 corresponds to a different encryption round of the original image. The current encrypted image refers to the encrypted image obtained in any encryption round other than the first encryption. Therefore, each current encrypted image can be obtained by encrypting the previous encrypted image obtained in the previous encryption round. For example, if there are 3 encryption rounds, the obtained encrypted images can be encrypted image 1, encrypted image 2, and encrypted image 3. Encrypted image 1 is obtained by encrypting the original image, encrypted image 2 can be obtained by encrypting encrypted image 1, and encrypted image 3 can be obtained by encrypting encrypted image 2. Therefore, encrypted image 2 and encrypted image 3 can both be used as the current encrypted image. The third-party server 103 obtains the current encrypted image of the current encryption round, and can also determine the previous encrypted image that was encrypted as the current encrypted image, as well as the decrypted image obtained after decrypting the current encrypted image.
[0136] Step S803: If the previous encrypted image matches the decrypted image corresponding to the current encrypted image, the verification result of the current encrypted image is determined as verified.
[0137] Step S804: If the verification results of each encrypted image are all determined to be verified successfully, the first verification result is determined to be verified successfully.
[0138] After obtaining the previous encrypted image corresponding to the current encrypted image, and the decrypted image corresponding to the current encrypted image, the third-party server 103 can verify whether the previous encrypted image matches the decrypted image. Since the current encrypted image is obtained by encrypting the previous encrypted image, the decrypted image obtained after decryption should generally be the same as the previous encrypted image. Therefore, the terminal can compare the matching of the previous encrypted image and the decrypted image. If they match, the verification result of the current encrypted image can be determined as successful. Furthermore, through the above method, the third-party server 103 can obtain the verification results of all current encrypted images. If all verification results indicate successful verification, the third-party server 103 can determine the first verification result as successful.
[0139] For example, the encryption rounds are 3, and the resulting encrypted images can be encrypted image 1, encrypted image 2, and encrypted image 3. The corresponding decrypted images are decrypted image 1, decrypted image 2, and decrypted image 3. The third-party server 103 can then verify decrypted image 3 against encrypted image 2, and decrypted image 2 against encrypted image 1. If encrypted image 3 matches encrypted image 2, and decrypted image 2 matches encrypted image 1, then the first verification result is determined to be successful.
[0140] In this embodiment, the third-party server 103 can also verify each encrypted image separately, thereby further improving the accuracy of the determined first verification result.
[0141] In addition, the virtual resource transfer method may further include: receiving first address information and first time information of the first terminal 101 that match the virtual resource transfer request from the first terminal 101; obtaining the target decrypted image corresponding to the encrypted image of the first encryption round from multiple decrypted images, and obtaining second address information and second time information bound to the target decrypted image; if the first address information matches the second address information and the first time information matches the second time information, determining the second verification result for the virtual resource transfer request as verified; step S703 may further include: if both the first verification result and the second verification result are determined to be verified, transferring the virtual resources of the first terminal 101 to the second terminal 102.
[0142] The first address information refers to the MAC address information corresponding to the first terminal 101 when responding to the virtual resource transfer request, while the first time information refers to the timestamp information corresponding to the first terminal 101 when responding to the virtual resource transfer request. When responding to the virtual resource transfer request, the first terminal 101 can also send the first time information and the first address information to the third-party server 103. At the same time, the aforementioned first time information and first address information can also be bound to the original image.
[0143] The second address information refers to the MAC address information obtained by the third-party server 103 from the decrypted image, while the second time information refers to the timestamp information obtained by the third-party server 103 from the decrypted image. The target decrypted image is the decrypted image corresponding to the encrypted image obtained from the initial encryption process. Since the encrypted image obtained from the initial encryption process is encrypted from the original image, the target decrypted image is generally the same as the original image. Therefore, the second address information and the second time information obtained from the target decrypted image are also the same as the first address information and the first time information. Thus, the third-party server 103 can also compare the second address information with the first address information and compare the second time information with the first time information to re-verify the virtual resource transfer request. If they match, the second verification result is determined to be successful. Only if both the first and second verification results are deemed successful will the third-party server 103 transfer the virtual resources of the first terminal 101 to the second terminal 102.
[0144] In this embodiment, the first address information and the first time information provided by the first terminal 101, as well as the second address information and the second time information obtained from the decrypted image, can be used to perform a second verification on the virtual resource transfer request. Only when both the first verification result and the second verification result indicate that the verification is passed will the transfer of virtual resources be executed, which can further improve the security of virtual resource transfer.
[0145] In one embodiment, a virtual resource transfer system is also provided, such as Figure 9 As shown, it includes: a first terminal 901, a second terminal 902, and a third-party server 903 for managing virtual resources.
[0146] Among them, the third-party server 903 is a backend server used to manage virtual resources. When transferring virtual resources, it can send an encryption matrix, i.e. an image encryption key, for image encryption processing to the first terminal 901 that is transferring virtual resources and the second terminal 902 that is receiving the transferred virtual resources in advance.
[0147] After responding to the virtual resource transfer request and generating the corresponding original image, the first terminal 901 can use the received image encryption key to encrypt the original image a preset number of times, thereby generating a number of encrypted images corresponding to the preset number of encryption times, and can also send the above-mentioned multiple encrypted images to the second terminal 902.
[0148] After receiving multiple encrypted images sent by the first terminal 901, the second terminal 902 can use the received image encryption key to decrypt the multiple encrypted images respectively, thereby restoring them into multiple decrypted images. Then, the multiple encrypted images and multiple decrypted images are returned to the third-party server 903.
[0149] After receiving multiple encrypted images and multiple decrypted images provided by the second terminal, the third-party server 903 can use the multiple encrypted images and multiple decrypted images to verify the virtual resource transfer request and obtain a first verification result. If the first verification result is determined to be successful, the virtual resources of the first terminal 901 can be transferred to the second terminal 902 to realize the transfer of virtual resources.
[0150] The aforementioned virtual resource transfer system includes: a first terminal 901, a second terminal 902, and a third-party server 903 for managing virtual resources; wherein, the third-party server 903 is used to send image encryption keys to the first terminal 901 and the second terminal 902 respectively; the first terminal 901 is used to respond to a virtual resource transfer request, generate an original image matching the virtual resource transfer request, and use the image encryption key received from the third-party server 903 to encrypt the original image a preset number of times to obtain multiple encrypted images, and send the multiple encrypted images to the second terminal 902; the number of encrypted images is the preset number of encryption times; the second terminal 901... Terminal 902 is configured to receive multiple encrypted images sent by first terminal 901, and decrypt the multiple encrypted images respectively using the image encryption key received from third-party server 903 to obtain multiple decrypted images corresponding to the multiple encrypted images, and send the multiple encrypted images and multiple decrypted images to third-party server 903; third-party server 903 is also configured to receive the multiple encrypted images and multiple decrypted images, and use the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of first terminal 901 are transferred to second terminal 902. When the first terminal 901 responds to a virtual resource transfer request, this application can use the image encryption key received from the third-party server 903 to encrypt the original image multiple times to obtain multiple encrypted images. These encrypted images can then be sent to the second terminal 902. The second terminal 902 can decrypt each of these encrypted images to obtain multiple decrypted images. Both the encrypted and decrypted images are then sent to the third-party server 903. The third-party server 903 uses these encrypted and decrypted images to verify the virtual resource transfer request. Only after successful verification is the transfer of virtual resources from the first terminal 901 to the second terminal 902 executed. Compared to the prior art where the second terminal 902 simply receives the original image from the first terminal 901 to transfer virtual resources, this application allows the first terminal 901 to encrypt the original image multiple times, while the second terminal 902 can decrypt each of the multiple encrypted images and verify them before transferring the virtual resources. This improves the security of virtual resource transfer.
[0151] In one application example, a system and method for transferring virtual resources by scrambling graphic codes are also provided. This technology is based on the Conway Game of Life model of two-dimensional cellular automata, performing a two-dimensional grayscale image scrambling operation on the graphic code and performing identity recognition based on a multi-party system. When a user transfers virtual resources using a graphic code, the graphic code generator 21 performs three real-time scrambling operations on the graphic code, refreshing and displaying three random graphic codes at a fixed frame rate. The scanning terminal 22 uses a novel device to scan the graphic code, which can read the scrambled graphic code and restore it to a recognizable graphic code, successfully reading the information. This method and device can prevent the theft of user graphic codes through graphic code scrambling, dynamic graphic codes, and identity authentication. The system architecture for virtual resource transfer can be as follows: Figure 10 As shown, the specific steps of this method are as follows: Figure 11 As shown. Specifically, it includes the following processes:
[0152] (1) Image code generation terminal 21:
[0153] The graphic code generator 21 first converts the graphic code into a grayscale image of known pixel size. Based on the aforementioned cellular automata and Conway's Game of Life model, it performs a real-time scrambling operation on the graphic code to generate a scrambled image. The previously generated scrambled image is used as input to the algorithm, and the above steps are performed twice more. The three generated scrambled images are refreshed at a fixed high frame rate to form a dynamically scrambled graphic code, which is then displayed on the device application page.
[0154] The Conway Game of Life (GL) model is a matrix of M*N cells, a special rule-based model of a two-dimensional cellular automaton. In the GL model, each cell can only have two states: alive or dead, represented by 1 and 0 respectively. According to the Moore neighbor rule, each cell has eight neighbors. In each time step (also called a generation), each cell calculates its new state by determining the states of its neighboring cells and applying the rule (state transition function). Each cell uses the same update rule, and all cells update simultaneously, i.e., in parallel.
[0155] The next state transition for each cell is as follows:
[0156] ① Birth. If exactly three neighboring cells are alive at time t, then the cell that dies at time t becomes alive at time t+1.
[0157] ② Death due to overcrowding. If four or more neighbors are alive at time t, the cells that survive at time t will die at time t+1.
[0158] ③ Exposure death. If at time t there are one or no neighboring cells alive, the cell alive at time t will die at time t+1.
[0159] ④ Survival. If at time t two or three neighboring cells are alive, the cell alive at time t will remain alive at time t+1.
[0160] In this process, in each generation, GL will generate alive cells and dead cells. Alive cells will be selected to form new pixel coordinates of the scrambled image, while dead cells are ignored, which can associate the GL model with image scrambling encryption.
[0161] The scrambling algorithm used can be as shown in Figure 12 , comprising the following steps:
[0162] ① A GL model cellular automaton with a size of M×N is set to an initial random configuration A0, and is run for k generations to obtain a matrix set {A1, A2, …, Ak}.
[0163] ② Let Z represent the input image (original image), and R represent the output image (scrambled image). A1 is the first generation generated by GL, and variables row=1 and column=1 are assigned.
[0164] ③ For {(i, j)|0<i<M, 0<j<N} and A1(i, j)=1, assign the gray value of pixel Z(row, column) in the original image Z to R(i, j), and point (row, column) to the next pixel of the original image matrix in row-first order.
[0165] ④ For q=2, …, k, {(i, j)|0<i<M, 0<j<N}, Aq(i, j)=1 and An(i, j)=0 (1≤n≤q-1), that is, for cells that have never been alive before iteration q, assign the gray value of pixel Z(row, column) in the original image Z to R(i, j), and point (row, column) to the next pixel of the original image matrix in row-first order.
[0166] ⑤ After k iterations, it is very likely that there are still cells that have never been in an alive state. In this case, put the pixel values at these positions in the original image into R(i, j) in row-first order, where {(i, j)|q=1, 2,..., k and Aq(i, j)=0}, so as to fill the scrambled image.
[0167] The internal structure of the graphic code generating end 21 can be as shown in Figure 13As shown, the system includes a graphic code generation module 211, a graphic code scrambling security module 212, a graphic code information storage module 213, a virtual resource information storage module 214, a MAC address module 215, a timestamp generation module 216, and an external communication transmission module 217. The timestamp generation module 216 generates a current timestamp and transmits it to the graphic code information storage module 213. The MAC address module 215 transmits the device's MAC address to the graphic code information storage module 213. The virtual resource information storage module 214 transmits the virtual resource information required for graphic code generation to the graphic code information storage module 213. The graphic code generation module 211 receives the timestamp, MAC address, and virtual resource information from the graphic code information storage module 213 and generates a graphic code. The graphic code scrambling security module 212 receives the graphic code generated by the graphic code generation module 211 and uses an image scrambling algorithm to scramble the grayscale image of the graphic code before transmitting it to the outside world through the external communication transmission module 217.
[0168] (2) QR code scanning terminal 22:
[0169] The scanning terminal 22 reads the dynamically scrambled graphic code and can appropriately delay the scanning time to ensure that all scrambled images in the dynamically scrambled graphic code are scanned into the device. It converts the optical information into grayscale pixel information and uses the position recording matrix in the information to perform a scrambling recovery operation on the scrambled image. The device realizes the restoration operation from the scrambled image to the original image. After the restored graphic code information is correct, it is transmitted to the background server via the Internet to perform virtual resource transfer.
[0170] The internal structure of the scanning terminal 22 can be as follows Figure 14As shown, the system includes a scanning device inlet, an optical sensor, a grayscale pixel analysis module, a storage module, and a recovery / scrambling module. The graphic code is scanned by the scanning device inlet. The laser scanner emits a beam of light through a laser diode, which is then reflected by a prism and converted into an optical signal by the scanner. The optical sensor focuses the optical signal onto the photosensitive (or photoconductive) target surface of the camera tube in the order of reading. The excitation of photoelectrons or changes in photoconductivity at each point on the target surface vary with the brightness of each point in the image. When an electron beam scans the target surface, an electrical signal with an amplitude proportional to the brightness of each point in the image is generated, causing the scanning electron beam on the CRT screen to vary with the strength of the input signal, ultimately being processed and converted into an electrical signal. The electrical signal transmitted to the grayscale pixel analysis module is a high / low level analog signal, i.e., a 0 / 1 logic signal. This module uses 8-bit encoding at a level of 2^8 = 256 to convert the electrical signal module into a grayscale image pixel value matrix. The scrambled image pixel matrix and the original image position recording matrix (key) are stored in the storage module. The recovery module uses a decryption algorithm and the original image position recording matrix as a key to recover the original image, transmits it to the scanning device output, and hands it over to other devices for further processing. It is also stored in the storage module.
[0171] (3) Backend servers, including the second backend server 23 and the first backend server 24:
[0172] The backend server is used to perform dynamic graphic code verification and identity authentication to ensure that the graphic code information is not stolen. Specifically, the second backend server 23 receives the dynamic graphic code information and transmits it to the first backend server 24 through the network, whereby the first backend server 24 verifies the dynamic graphic code information.
[0173] The specific process for verifying the graphic code is as follows: Figure 15 As shown, at the graphic code generation terminal 21 with a scrambling security module, the original image Z is generated and transformed into a scrambled image E1 using a scrambling algorithm. Using scrambled image E1 as input, it is again transformed into scrambled image E2 using the same algorithm. Then, using scrambled image E2 as input, it is transformed into scrambled image E3 using the same algorithm. The three scrambled images E1, E2, and E3 are displayed at the graphic code generation terminal 21, with a dynamic rotation frame rate of 15 FPS. At the scanning terminal 22, the three scrambled images E1, E2, and E3 are restored to D1, D2, and D3 respectively using the scrambling algorithm. The new scanning terminal 22 transmits D1, D2, D3, E1, and E2 to the backend server. At the first backend server 24, D3 is compared with E2, and D2 with E1. If there are no discrepancies, virtual resource transfer is initiated.
[0174] In the above application examples, the security of virtual resource transactions can be improved by preventing the theft of user's graphic codes through graphic code scrambling, dynamic graphic codes, and identity authentication.
[0175] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0176] Based on the same inventive concept, this application also provides a virtual resource transfer apparatus for implementing the virtual resource transfer method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more virtual resource transfer apparatus embodiments provided below can be found in the limitations of the virtual resource transfer method described above, and will not be repeated here.
[0177] In one embodiment, such as Figure 16 As shown, a virtual resource transfer device is provided, applied to a first terminal, comprising: an original image generation module 1601, an encrypted image generation module 1602, and a first image sending module 1603, wherein:
[0178] The original image generation module 1601 is used to generate an original image that matches the virtual resource transfer request in response to the virtual resource transfer request;
[0179] The encrypted image generation module 1602 is used to receive an image encryption key from a third-party server used to manage virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryption times.
[0180] The first image sending module 1603 is used to send multiple encrypted images to a second terminal; the second terminal is used to obtain multiple decrypted images corresponding to the multiple encrypted images using the image encryption key received from a third-party server, and send the multiple encrypted images and multiple decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the multiple encrypted images and multiple decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0181] In one embodiment, the encrypted image generation module 1602 is further configured to encrypt the original image using an image encryption key to obtain a first encrypted image; encrypt the first encrypted image using the image encryption key to obtain a second encrypted image; use the second encrypted image as a new first encrypted image, and return to execute the step of encrypting the first encrypted image using the image encryption key to obtain a second encrypted image, until the number of encryption rounds reaches a preset number of encryption times, and use multiple first encrypted images as multiple encrypted images.
[0182] In one embodiment, the encryption process includes scrambling for a preset number of iterations; the encrypted image generation module 1602 is further configured to scramble the original image using an image encryption key to generate a first scrambled image; update the image encryption key based on the Game of Life model to obtain an updated encryption key; scramble the first scrambled image using the updated encryption key to obtain a second scrambled image; use the second scrambled image as the new first scrambled image, and use the updated encryption key as the new image encryption key, and return to execute the step of updating the image encryption key based on the Game of Life model to obtain the updated encryption key, until the number of scrambling iterations reaches the preset number, and the second scrambled image is used as the first encrypted image.
[0183] In one embodiment, the virtual resource transfer device further includes: an auxiliary verification sending module, configured to, in response to a virtual resource transfer request, obtain first address information and first time information of a first terminal matching the virtual resource transfer request; bind the first address information and first time information to an original image, and send the first address information and first time information to a third-party server; the third-party server is further configured to obtain second address information and second time information from multiple decrypted images, and use the first address information and first time information, along with the second address information and second time information, to obtain a second verification result for the virtual resource transfer request; and, if both the first verification result and the second verification result are determined to be verified as passed, transfer the virtual resources of the first terminal to the second terminal.
[0184] In one embodiment, such as Figure 17 As shown, a virtual resource transfer device is provided for use in a second terminal, comprising: a first image receiving module 1701, a decrypted image acquisition module 1702, and a second image sending module 1703, wherein:
[0185] The first image receiving module 1701 is used to receive multiple encrypted images sent by the first terminal, and to receive image encryption keys from a third-party server for managing virtual resources; the multiple encrypted images are obtained by the first terminal using the image encryption keys received from the third-party server to encrypt the original image that matches the virtual resource transfer request for a preset number of times; the number of encrypted images is the preset number of encryption times.
[0186] The image decryption acquisition module 1702 is used to decrypt multiple encrypted images using an image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images.
[0187] The second image sending module 1703 is used to send multiple encrypted images and multiple decrypted images to a third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the multiple encrypted images and multiple decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal.
[0188] In one embodiment, the image decryption acquisition module 1702 is further used to acquire the current encrypted image; and to decrypt the current encrypted image using the image encryption key to obtain the current decrypted image corresponding to the current encrypted image.
[0189] In one embodiment, the decryption process includes a recovery scrambling process with a preset number of iterations; the decryption image acquisition module 1702 is further configured to update the image encryption key a preset number of times based on the Game of Life model to obtain an updated encryption key; the preset update number is a preset iteration number minus one; the current encrypted image is used as the current image to be decrypted, and the target encryption key corresponding to the current recovery scrambling round is obtained from the image encryption key and the updated encryption key; the target encryption key is used to perform recovery scrambling on the current image to be decrypted to generate a recovered scrambling image; the recovered scrambling image is used as the new current image to be decrypted, and the step of obtaining the target encryption key corresponding to the current recovery scrambling round is returned to execute until the number of recovery scrambling rounds reaches the preset number of iterations, and the recovered scrambling image is used as the current decrypted image.
[0190] In one embodiment, such as Figure 18 As shown, a virtual resource transfer device is provided, applied to a third-party server managing virtual resources, including: an encryption key sending module 1801, a second image receiving module 1802, and a virtual resource transfer module 1803, wherein:
[0191] The encryption key sending module 1801 is used to send the image encryption key to a first terminal and a second terminal respectively; the first terminal is used to use the image encryption key to encrypt the original image matching the virtual resource transfer request for a preset number of times to obtain multiple encrypted images, and send the multiple encrypted images to the second terminal; the number of encrypted images is the preset number of encryption times; the second terminal is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and send the multiple encrypted images and multiple decrypted images to a third-party server;
[0192] The second image receiving module 1802 is used to receive multiple encrypted images and multiple decrypted images, and use the multiple encrypted images and multiple decrypted images to obtain a first verification result for the virtual resource transfer request;
[0193] The virtual resource transfer module 1803 is used to transfer the virtual resources of the first terminal to the second terminal when the first verification result is determined to be successful.
[0194] In one embodiment, multiple encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. The second image receiving module 1802 is further configured to acquire the current encrypted image of the current encryption round. The current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. The module acquires the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image. If the previous encrypted image matches the decrypted image corresponding to the current encrypted image, the verification result of the current encrypted image is determined to be verified as passed. If the verification results of each current encrypted image are determined to be verified as passed, the first verification result is determined to be verified as passed.
[0195] In one embodiment, the virtual resource transfer device further includes: an auxiliary verification receiving module, configured to receive from the first terminal first address information and first time information of the first terminal that match the virtual resource transfer request; obtain the target decrypted image corresponding to the encrypted image of the first encryption round from multiple decrypted images, and obtain second address information and second time information bound to the target decrypted image; if the first address information matches the second address information and the first time information matches the second time information, determine the second verification result for the virtual resource transfer request as verified; and the virtual resource transfer module 1803 is further configured to transfer the virtual resources of the first terminal to the second terminal if both the first verification result and the second verification result are determined to be verified.
[0196] Each module in the aforementioned virtual resource transfer device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0197] In one embodiment, a computer device is provided, which may be a first terminal and a second terminal, and its internal structure diagram may be as follows: Figure 19 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a virtual resource transfer method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0198] In one embodiment, a computer device is provided, which may be a third-party server for managing virtual resources, and its internal structure diagram may be as follows: Figure 20 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores virtual resource data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a virtual resource transfer method.
[0199] As will be understood by those skilled in the art, Figure 19 and Figure 20The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0200] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0202] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0203] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for transferring virtual resources, characterized in that, Applied to a first terminal, the method includes: In response to a virtual resource transfer request, an original image matching the virtual resource transfer request is generated; Receive the image encryption key from a third-party server used to manage virtual resources; The original image is encrypted using the image encryption key to obtain a first encrypted image; The first encrypted image is encrypted using the image encryption key to obtain the second encrypted image; The second encrypted image is used as a new first encrypted image, and the process of encrypting the first encrypted image using the image encryption key to obtain the second encrypted image is repeated until the number of encryption rounds reaches a preset number of encryptions, and multiple first encrypted images are used as multiple encrypted images. The number of encrypted images is the preset number of encryption times; wherein, the encryption process includes: performing scrambling processing on the current image to be encrypted for a preset number of iterations, and the encryption key used in each scrambling process is obtained by updating the encryption key used in the previous scrambling process based on the Game of Life model; The plurality of encrypted images are sent to a second terminal; the second terminal is used to obtain a plurality of decrypted images corresponding to the plurality of encrypted images using the image encryption key received from the third-party server, and send the plurality of encrypted images and the plurality of decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; In response to the virtual resource transfer request, the first address information and first time information of the first terminal that match the virtual resource transfer request are obtained; The first address information and the first time information are bound to the original image, and the first address information and the first time information are sent to the third-party server; the third-party server is further configured to obtain second address information and second time information from the plurality of decrypted images, and use the first address information and the first time information, together with the second address information and the second time information, to obtain a second verification result for the virtual resource transfer request; if both the first verification result and the second verification result are determined to be verified as passed, the virtual resources of the first terminal are transferred to the second terminal.
2. The method according to claim 1, characterized in that, The step of encrypting the original image using the image encryption key to obtain a first encrypted image includes: The original image is scrambled using the image encryption key to generate a first scrambled image; Based on the Game of Life model, the image encryption key is updated to obtain an updated encryption key; The first scrambled image is scrambled using the updated encryption key to obtain a second scrambled image; The second scrambled image is used as the new first scrambled image, and the updated encryption key is used as the new image encryption key. The process of updating the image encryption key based on the Game of Life model is then repeated until the number of scrambling rounds reaches the preset number of iterations. Finally, the second scrambled image is used as the first encrypted image.
3. A method for transferring virtual resources, characterized in that, Applied to a second terminal, the method includes: The system receives multiple encrypted images sent by a first terminal and an image encryption key from a third-party server used for managing virtual resources. The multiple encrypted images are obtained by the first terminal using the image encryption key received from the third-party server to encrypt the original image matching the virtual resource transfer request a preset number of times. The number of encrypted images is the preset number of encryption times. Using the image encryption key, the multiple encrypted images are decrypted respectively to obtain multiple decrypted images corresponding to the multiple encrypted images; The encrypted images and the decrypted images are sent to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the encrypted images and the decrypted images; if the first verification result indicates that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal; The step of using the image encryption key to decrypt the plurality of encrypted images to obtain a plurality of decrypted images corresponding to the plurality of encrypted images includes: Get the current encrypted image; Using the image encryption key, the current encrypted image is decrypted to obtain the current decrypted image corresponding to the current encrypted image; wherein, the decryption process includes: performing a recovery scrambling process on the current image to be decrypted with a preset number of iterations, and the key used for each recovery scrambling process is updated based on the Game of Life model to obtain the key used for the previous recovery scrambling process.
4. The method according to claim 3, characterized in that, The step of using the image encryption key to decrypt the current encrypted image to obtain the current decrypted image corresponding to the current encrypted image includes: Based on the Game of Life model, the image encryption key is updated a preset number of times to obtain an updated encryption key; the preset number of updates is the preset number of iterations minus one. The current encrypted image is used as the current image to be decrypted, and the target encryption key corresponding to the current recovery scrambling process round is obtained from the image encryption key and the updated encryption key. The target encryption key is used to perform recovery scrambling process on the current image to be decrypted to generate a recovery scrambling image. The restored scrambled image is used as the new current image to be decrypted, and the process returns to the step of obtaining the target encryption key corresponding to the current round of restoration scrambling, until the round of restoration scrambling reaches the preset number of iterations, at which point the restored scrambled image is used as the current image to be decrypted.
5. A method for transferring virtual resources, characterized in that, The method, applied to a third-party server for managing virtual resources, includes: The image encryption key is sent to a first terminal and a second terminal respectively. The first terminal is used to use the image encryption key to encrypt the original image matching the virtual resource transfer request for a preset number of times to obtain multiple encrypted images, and then sends the multiple encrypted images to the second terminal. The encryption process includes: scrambling the current image to be encrypted for a preset number of iterations, and the encryption key used for each scrambling is updated based on the Game of Life model to the encryption key used in the previous scrambling. The number of encrypted images is the preset number of encryptions. The second terminal is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and then sends the multiple encrypted images and the multiple decrypted images to the third-party server. Receive the plurality of encrypted images and the plurality of decrypted images, and use the plurality of encrypted images and the plurality of decrypted images to obtain a first verification result for the virtual resource transfer request; If the first verification result indicates that the verification is successful, the virtual resources of the first terminal will be transferred to the second terminal. The multiple encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. The step of obtaining a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images includes: Obtain the current encrypted image for the current encryption round; the current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. Obtain the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image; If the previous encrypted image matches the decrypted image corresponding to the current encrypted image, the verification result of the current encrypted image is determined to be verified successfully. If the verification results of each encrypted image are all determined to be successful, the first verification result is determined to be successful. Receive from the first terminal the first address information and the first time information of the first terminal that match the virtual resource transfer request; From multiple decrypted images, obtain the target decrypted image corresponding to the encrypted image of the first encryption round, and obtain the second address information and second time information bound to the target decrypted image; If the first address information matches the second address information and the first time information matches the second time information, the second verification result for the virtual resource transfer request will be determined as verification passed. The step of transferring the virtual resources of the first terminal to the second terminal when the first verification result indicates that the verification is successful includes: If both the first verification result and the second verification result are confirmed as successful, the virtual resources of the first terminal are transferred to the second terminal.
6. A virtual resource transfer system, characterized in that, include: The system comprises a first terminal, a second terminal, and a third-party server for managing virtual resources; among which, The third-party server is used to send the image encryption key to the first terminal and the second terminal respectively. The first terminal is configured to respond to a virtual resource transfer request, generate an original image matching the virtual resource transfer request, and use an image encryption key received from the third-party server to encrypt the original image a preset number of times to obtain multiple encrypted images, and send the multiple encrypted images to the second terminal; the number of encrypted images is the preset number of encryption times; The second terminal is configured to receive the plurality of encrypted images sent by the first terminal, and use the image encryption key received from the third-party server to decrypt the plurality of encrypted images respectively to obtain a plurality of decrypted images corresponding to the plurality of encrypted images, and send the plurality of encrypted images and the plurality of decrypted images to the third-party server. The third-party server is also configured to receive the plurality of encrypted images and the plurality of decrypted images, and use the plurality of encrypted images and the plurality of decrypted images to obtain a first verification result for the virtual resource transfer request; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal; The first terminal is specifically used to encrypt the original image using the image encryption key to obtain a first encrypted image; The first encrypted image is encrypted using the image encryption key to obtain the second encrypted image; The second encrypted image is used as the new first encrypted image, and the process of encrypting the first encrypted image using the image encryption key to obtain the second encrypted image is repeated until the number of encryption rounds reaches the preset number of encryption rounds. Multiple first encrypted images are used as the multiple encrypted images. The encryption process includes: performing a scrambling process on the current image to be encrypted for a preset number of iterations, and the encryption key used for each scrambling process is updated based on the Game of Life model to obtain the encryption key used for the previous scrambling process. The second terminal is specifically used to acquire the current encrypted image; Using the image encryption key, the current encrypted image is decrypted to obtain the current decrypted image corresponding to the current encrypted image; wherein, the decryption process includes: performing a recovery scrambling process on the current image to be decrypted with a preset number of iterations, and the key used for each recovery scrambling process is updated based on the Game of Life model to obtain the key used for the previous recovery scrambling process; The multiple encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round; the third-party server is specifically used to obtain the current encrypted image of the current encryption round; the current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round of the current encryption round. Obtain the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image; If the previous encrypted image matches the decrypted image corresponding to the current encrypted image, the verification result of the current encrypted image is determined to be verified successfully. If the verification results of each encrypted image are all determined to be successful, the first verification result is determined to be successful. The first terminal is further configured to, in response to the virtual resource transfer request, obtain first address information and first time information of the first terminal that match the virtual resource transfer request; The first address information and the first time information are bound to the original image, and the first address information and the first time information are sent to the third-party server; The third-party server is further configured to obtain second address information and second time information from the plurality of decrypted images, and use the first address information and first time information, along with the second address information and second time information, to obtain a second verification result for the virtual resource transfer request; if both the first verification result and the second verification result are determined to be verified as passed, the virtual resources of the first terminal are transferred to the second terminal.
7. A virtual resource transfer device, characterized in that, Applied to a first terminal, the device includes: An original image generation module is used to generate an original image that matches the virtual resource transfer request in response to the virtual resource transfer request; An encrypted image generation module is used to receive an image encryption key from a third-party server used for managing virtual resources, and use the image encryption key to encrypt the original image a preset number of times to obtain multiple encrypted images; the number of encrypted images is the preset number of encryption times. A first image sending module is used to send the plurality of encrypted images to a second terminal; the second terminal is used to obtain a plurality of decrypted images corresponding to the plurality of encrypted images using the image encryption key received from the third-party server, and send the plurality of encrypted images and the plurality of decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal; The encrypted image generation module is specifically used to encrypt the original image using the image encryption key to obtain a first encrypted image; The first encrypted image is encrypted using the image encryption key to obtain a second encrypted image; the second encrypted image is used as a new first encrypted image, and the process of encrypting the first encrypted image using the image encryption key to obtain a second encrypted image is repeated until the number of encryption rounds reaches the preset number of encryption rounds, and multiple first encrypted images are used as the multiple encrypted images; wherein, the encryption process includes: performing scrambling processing on the current image to be encrypted for a preset number of iterations, and the encryption key used for each scrambling process is updated based on the Game of Life model to obtain the encryption key used for the previous scrambling process; An auxiliary verification sending module is used to respond to the virtual resource transfer request and obtain the first address information and first time information of the first terminal that match the virtual resource transfer request; The first address information and the first time information are bound to the original image, and the first address information and the first time information are sent to the third-party server; the third-party server is further configured to obtain second address information and second time information from the plurality of decrypted images, and use the first address information and the first time information, together with the second address information and the second time information, to obtain a second verification result for the virtual resource transfer request; if both the first verification result and the second verification result are determined to be verified as passed, the virtual resources of the first terminal are transferred to the second terminal.
8. A virtual resource transfer device, characterized in that, Applied to a second terminal, the device includes: The first image receiving module is used to receive multiple encrypted images sent by the first terminal, and to receive image encryption keys from a third-party server for managing virtual resources; the multiple encrypted images are obtained by the first terminal using the image encryption keys received from the third-party server to encrypt the original image matching the virtual resource transfer request a preset number of times; the number of encrypted images is the preset number of encryption times. The image decryption acquisition module is used to decrypt the multiple encrypted images using the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images respectively; The second image sending module is used to send the plurality of encrypted images and the plurality of decrypted images to the third-party server; the third-party server is used to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; if the first verification result determines that the verification is successful, the virtual resources of the first terminal are transferred to the second terminal; The decrypted image acquisition module is specifically used to acquire the currently encrypted image; Using the image encryption key, the current encrypted image is decrypted to obtain the current decrypted image corresponding to the current encrypted image; wherein, the decryption process includes: performing a recovery scrambling process on the current image to be decrypted with a preset number of iterations, and the key used for each recovery scrambling process is updated based on the Game of Life model to obtain the key used for the previous recovery scrambling process.
9. A virtual resource transfer device, characterized in that, A third-party server used for managing virtual resources, the apparatus comprising: An encryption key sending module is used to send an image encryption key to a first terminal and a second terminal respectively. The first terminal is used to use the image encryption key to encrypt the original image matching the virtual resource transfer request for a preset number of times to obtain multiple encrypted images, and then send the multiple encrypted images to the second terminal. The number of encrypted images is the preset number of encryption times. The encryption process includes: performing a scrambling process on the current image to be encrypted for a preset number of iterations, and the encryption key used in each scrambling process is updated based on the Game of Life model to obtain the encryption key used in the previous scrambling process. The second terminal is used to use the image encryption key to obtain multiple decrypted images corresponding to the multiple encrypted images, and then send the multiple encrypted images and the multiple decrypted images to the third-party server. The second image receiving module is used to receive the plurality of encrypted images and the plurality of decrypted images, and to obtain a first verification result for the virtual resource transfer request using the plurality of encrypted images and the plurality of decrypted images; The virtual resource transfer module is used to transfer the virtual resources of the first terminal to the second terminal when the first verification result is determined to be successful. The multiple encrypted images correspond to different encryption rounds, and each encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. The second image receiving module is specifically used to acquire the current encrypted image of the current encryption round; the current encrypted image is obtained by encrypting the previous encrypted image obtained in the previous encryption round. Obtain the previous encrypted image corresponding to the current encrypted image and the decrypted image corresponding to the current encrypted image; If the previous encrypted image matches the decrypted image corresponding to the current encrypted image, the verification result of the current encrypted image is determined to be verified successfully. If the verification results of each encrypted image are all determined to be successful, the first verification result is determined to be successful. An auxiliary verification receiving module is used to receive from the first terminal the first address information and the first time information of the first terminal that match the virtual resource transfer request; From multiple decrypted images, obtain the target decrypted image corresponding to the encrypted image of the first encryption round, and obtain the second address information and second time information bound to the target decrypted image; If the first address information matches the second address information and the first time information matches the second time information, the second verification result for the virtual resource transfer request will be determined as verification passed. The virtual resource transfer module is specifically used to transfer the virtual resources of the first terminal to the second terminal when both the first verification result and the second verification result are determined to be verified as passed.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Resource transfer method and device, computer equipment and storage medium
CN114283008A