Digital collectible generation method, device, equipment, medium and program product
Patent Information
- Application Number
- CN202210860074.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-07-20
AI Technical Summary
[0062]本申请实施例中,当存在生成数字藏品的需求时,可获取元素配置文件,该元素配置文件记录有N个图层的元素的元素属性信息,每个图层对应一个元素属性信息集合;然后,可先从元素配置文件中的各个元素属性信息集合中,分别进行随机选取处理,并根据确定的各个图层的随机元素属性信息,随机生成大部分不重复的藏品组合;其次,从元素配置文件中的各个元素属性信息集合中,确定各个图层的穷举元素属性信息,并根据各个图层的穷举元素属性信息,穷举生成剩余的不重复的藏品组合;最后,基于藏品组合生成数字藏品。上述方案中,支持采用随机选取元素生成大部分不重复的藏品组合,再采用穷举选取元素生成小部分不重复的藏品组合,通过随机和穷举结合的方式生成藏品组合,可避免生成重复的藏品组合导致数字藏品生成失败,从而提升生成数字藏品的成功率,实现高效生成数字藏品。
Smart Images

Figure CN117475030B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for generating digital collectibles, a device for generating digital collectibles, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] Digital collectibles are digital products uniquely identified using blockchain technology. Specifically, digital collectibles are digital products stored on a blockchain network, each with a unique blockchain number, making each digital collectible on the blockchain unique. Compared to physical collectibles, digital collectibles are highly sought after due to their advantages such as portability, ease of dissemination, and permanent preservation.
[0003] Therefore, how to efficiently generate digital collectibles and improve the success rate of digital collectible generation has become a hot research topic in digital collectibles. Summary of the Invention
[0004] This application provides a method, apparatus, device, medium, and program product for generating digital collectibles, which can improve the success rate of generating digital collectibles and ensure that each digital collectible is unique.
[0005] On one hand, embodiments of this application provide a method for generating digital collectibles, the method comprising:
[0006] Retrieve the element configuration file. The element configuration file records the element attribute information of elements in N layers. Each layer corresponds to a set of element attribute information. Each set of element attribute information includes element attribute information of multiple elements; N is an integer greater than 1.
[0007] From the set of element attribute information in the element configuration file, random selection is performed to determine the random element attribute information of each layer, and the first collection combination set is generated based on the random element attribute information of each layer.
[0008] From the set of element attribute information in the element configuration file, determine the exhaustive element attribute information of each layer, and generate the second collection set based on the exhaustive element attribute information of each layer.
[0009] Based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, the digital collection corresponding to each collection set is generated.
[0010] Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
[0011] On the other hand, embodiments of this application provide a digital collection generation apparatus, the apparatus comprising:
[0012] The acquisition unit is used to acquire the element configuration file. The element configuration file records the element attribute information of elements in N layers. Each layer corresponds to an element attribute information set, and each element attribute information set includes element attribute information of multiple elements; N is an integer greater than 1.
[0013] The processing unit is used to randomly select from the set of element attribute information in the element configuration file, determine the random element attribute information of each layer, and generate the first collection combination set based on the random element attribute information of each layer.
[0014] The processing unit is also used to determine the exhaustive element attribute information of each layer from the set of element attribute information in the element configuration file, and generate a second collection combination set based on the exhaustive element attribute information of each layer.
[0015] The processing unit is also used to generate digital collectibles corresponding to each collectible combination based on the element attribute information of the elements contained in each collectible combination in the first collectible combination set and the second collectible combination set.
[0016] Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
[0017] In one implementation, the element configuration file includes N function tables, each function table corresponding to a layer; the processing unit, when retrieving the element configuration file, specifically performs the following:
[0018] Obtain a candidate element set, which includes element attribute information of one or more elements, as well as the layer to which each element belongs;
[0019] Add the element attribute information of elements belonging to the same layer to the corresponding function table of the layer in the element configuration file to generate the element configuration file;
[0020] Each function table in the element configuration file records a set of element attribute information for the corresponding layer.
[0021] In one implementation, each function table corresponds to an element pool, and the element attribute information includes the total number of times the element is allowed to be selected; the processing unit is also used for:
[0022] The information is read and processed for each function table in the element configuration file to obtain the element attribute information of each element recorded in each function table;
[0023] Based on the total number of times each element is selected, the element attribute information of the elements selected a total of a certain number of times is added to the element pool corresponding to the corresponding function table, thus obtaining the element pool corresponding to each function table.
[0024] In one implementation, the element configuration file also records a randomly selected threshold.
[0025] The processing unit is used to randomly select from the element attribute information sets in the element configuration file to determine the random element attribute information of each layer, and generate a first collection set based on the random element attribute information of each layer; when determining the exhaustive element attribute information of each layer from the element attribute information sets in the element configuration file and generating a second collection set based on the exhaustive element attribute information of each layer, it is specifically used for:
[0026] Random selection is performed from each element pool to determine the random element attribute information of each layer, and the first collection set is generated based on the random element attribute information of each layer.
[0027] When the number of collection combinations contained in the first collection set exceeds the random selection threshold, exhaustive element attribute information of each layer is determined from each element pool, and a second collection set is generated based on the exhaustive element attribute information of each layer.
[0028] In one implementation, the processing unit is used to randomly select elements from each element pool, determine the random element attribute information of each layer, and generate the first collection set based on the random element attribute information of each layer. Specifically, it is used for:
[0029] According to the random selection rules, the element attribute information of an element is randomly selected from each element pool. The element attribute information of the randomly selected element is used as the random element attribute information. The element attribute information includes the element name.
[0030] Based on the layer level of the layer to which each randomly selected element belongs, the element names of the randomly selected elements are sorted and combined to generate the first candidate collection combination.
[0031] Match the first candidate collection with the existing collection collections in the first collection collection set;
[0032] If there is no match, the first candidate collection combination is added to the first collection combination set, and each element pool is updated based on the first candidate collection combination.
[0033] Repeat the above steps until the number of collection combinations included in the first collection set is greater than the random selection threshold, thus obtaining the first collection set.
[0034] In one implementation, when the processing unit updates each element pool based on the first candidate collection combination, it specifically performs the following:
[0035] In each element pool, delete the element attribute information of each element contained in the first candidate collection combination.
[0036] In one implementation, the element attribute information includes the total number of times the element is allowed to be selected; when the processing unit determines the exhaustive element attribute information of each layer from the various element attribute information sets in the element configuration file, it is specifically used for:
[0037] Based on the element names contained in each collection set in the first collection set, determine the number of times each element in the element attribute information set has been selected.
[0038] When there are elements in a layer whose selected count is less than the corresponding total selected count, the element attribute information of the elements whose selected count is less than the corresponding total selected count is determined as the exhaustive element attribute information of the layer.
[0039] In one implementation, the element attribute information includes the element name. When the processing unit generates the second collection set based on the exhaustive element attribute information of each layer, it is specifically used for:
[0040] According to the exhaustive selection rules, the element names contained in the exhaustive element attribute information of each layer are arranged and combined to generate one or more second candidate collection combinations.
[0041] Match one or more second candidate collections with the collections included in the first collection set;
[0042] If there is a second candidate collection that does not match the collection collection in the first collection collection set, then the mismatched second candidate collection is added to the second collection collection set to obtain the second collection collection set.
[0043] In one implementation, the element attribute information includes the element image; the first collection set and the second collection set belong to a collection file, and any collection set in the collection file is represented as the target collection set;
[0044] The processing unit is used to generate digital collectibles corresponding to each collectible combination based on the element attribute information of the elements contained in each collectible combination in the first and second collectible combination sets. Specifically, it is used for:
[0045] Read the element name of one or more reference elements contained in the target collection portfolio;
[0046] Based on the element names of one or more reference elements, obtain the element images of each reference element in the one or more reference elements;
[0047] Based on the layer level of each reference element, the element images of each reference element are superimposed sequentially to generate the target digital collection corresponding to the target collection combination.
[0048] In one implementation, the processing unit is further used for:
[0049] Using a process pool approach, and based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, digital collections corresponding to each collection set are generated.
[0050] In one implementation, the processing unit is further used for:
[0051] Perform a hash operation on the digital collectibles corresponding to each collection combination in the collection file to obtain the hash value of each digital collectible;
[0052] Replace the corresponding collection combination in the collection file with the hash value of each digital collection;
[0053] If all collection combinations in the collection file are replaced with the hash values of the corresponding digital collections, then the collection file is added to the blockchain.
[0054] In one implementation, the collection file also includes element attribute information for each element contained in each collection combination. The element attribute information includes element probabilities, which indicate the scarcity level of the elements. The processing unit is further configured to:
[0055] If the collection file is successfully uploaded to the blockchain and there is a digital collectible transaction request, a prompt message will be output on the transaction request end.
[0056] The notification information includes the element probabilities of each element contained in the digital collectible to be traded.
[0057] On the other hand, this application provides an electronic device, which includes:
[0058] A processor is used to load and execute computer programs;
[0059] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating digital collectibles.
[0060] On the other hand, this application provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed by the method for generating the digital collection described above.
[0061] On the other hand, this application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned method for generating digital collectibles.
[0062] In this embodiment, when there is a need to generate digital collectibles, an element configuration file can be obtained. This configuration file records the element attribute information of elements in N layers, with each layer corresponding to a set of element attribute information. First, random selection is performed from each set of element attribute information in the configuration file, and based on the determined random element attribute information of each layer, a majority of unique collectible combinations are randomly generated. Second, exhaustive element attribute information for each layer is determined from each set of element attribute information in the configuration file, and the remaining unique collectible combinations are exhaustively generated based on this exhaustive element attribute information. Finally, digital collectibles are generated based on these combinations. This scheme supports generating a majority of unique collectible combinations through random element selection, followed by generating a small subset of unique collectible combinations through exhaustive element selection. By combining random and exhaustive methods, the generation of collectible combinations avoids the failure to generate duplicate combinations, thereby improving the success rate of digital collectible generation and achieving efficient digital collectible generation. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1a A schematic diagram of a blockchain provided in an exemplary embodiment of this application is shown;
[0065] Figure 1b This illustration shows a schematic diagram of an image generation method using layer overlay provided in an exemplary embodiment of this application;
[0066] Figure 1c This illustration shows a schematic diagram of multiple elements belonging to the same layer, provided in an exemplary embodiment of this application;
[0067] Figure 2 This illustration shows an architectural diagram of a digital collection generation system provided in an exemplary embodiment of this application;
[0068] Figure 3 A flowchart illustrating a method for generating digital collectibles according to an exemplary embodiment of this application is shown.
[0069] Figure 4 This illustration shows a schematic diagram of an element configuration file for multiple topics provided in an exemplary embodiment of this application;
[0070] Figure 5 This illustration shows a flowchart of generating an element configuration file corresponding to a target topic, provided by an exemplary embodiment of this application.
[0071] Figure 6a This illustration shows a schematic diagram of a function table sheet1 in an element configuration file provided in an exemplary embodiment of this application;
[0072] Figure 6b This illustration shows a schematic diagram of a function table sheet2 in an element configuration file provided in an exemplary embodiment of this application;
[0073] Figure 7 This illustration shows a schematic diagram of generating a collection portfolio based on an element configuration file, according to an exemplary embodiment of this application.
[0074] Figure 8 This illustration shows a schematic diagram of reading an element configuration file to obtain an element pool corresponding to each function table, provided by an exemplary embodiment of this application.
[0075] Figure 9 This illustration shows a schematic diagram of generating a first collection set according to a random selection rule, provided by an exemplary embodiment of this application;
[0076] Figure 10 This illustration shows a schematic diagram of a collection file provided in an exemplary embodiment of this application;
[0077] Figure 11 This illustration shows a schematic diagram of a target element determination process provided by an exemplary embodiment of this application;
[0078] Figure 12 A flowchart illustrating another method for generating digital collectibles provided in an exemplary embodiment of this application is shown.
[0079] Figure 13 This illustration shows a schematic diagram of a method for generating target digital collectibles from overlay element images, provided in an exemplary embodiment of this application.
[0080] Figure 14 This illustration shows a schematic diagram of updating a collection file using the hash value of a digital collection, provided by an exemplary embodiment of this application.
[0081] Figure 15 This illustration shows a schematic diagram of outputting prompt information at the transaction request end, provided by an exemplary embodiment of this application.
[0082] Figure 16 A schematic diagram of the structure of a digital collection generation apparatus provided in an exemplary embodiment of this application is shown;
[0083] Figure 17 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0084] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0085] This application provides a scheme for generating digital collectibles. The basic terms and concepts involved in this scheme are briefly explained below:
[0086] (1) Digital collectibles refer to digital products that are uniquely identified using blockchain technology. Simply put, digital collectibles involve placing a product (or item, commodity, etc.) on the blockchain, digitizing it, and making it a unique, indivisible, and rare digital product. The forms of products that can be made into digital collectibles may include, but are not limited to: digital images (or digital pictures), audio and video, 3D (3-dimensional) models, electronic tickets, and digital souvenirs, etc. This application does not limit the form of the products made into digital collectibles; this is only a description of the specific form.
[0087] Specifically, when there is a need to put digital collectibles on the blockchain, blockchain technology can be used to encrypt the digital products (i.e., digital collectibles) digitally. Each digital collectible then possesses a unique digital certificate (or serial number, blockchain number, etc.) that serves as proof of ownership. This digital certificate is then stored on the blockchain to achieve the on-chain registration of the digital collectible. Digital collectibles stored on the blockchain possess characteristics such as immutability and non-copyability, giving them unique value compared to physical collectibles. For example, the digital certificate corresponding to a digital collectible can be stored on the blockchain, ensuring that the digital collectible is permanently preserved and cannot be tampered with or copied as long as the blockchain exists. Furthermore, the digital form of digital collectibles on the blockchain facilitates their portability and dissemination by the owner.
[0088] (2) Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. By storing digital collectibles on the blockchain, distributed data storage of digital collections can be achieved, ensuring that digital collectibles are immutable and uncopyable, thus guaranteeing their uniqueness. An exemplary schematic diagram of a blockchain can be found... Figure 1a ,like Figure 1a As shown, a blockchain is a data chain composed of multiple linked blockchains. The first block in a blockchain is called the genesis block. The genesis block includes a block header and a block body. The block header stores input information feature values, version number, timestamp, and difficulty value. The block body stores the input information; for example, when a digital collectible is uploaded to the blockchain, specifically when a digital certificate for a digital collectible is uploaded, the digital collectible is stored in the block body of the blockchain block. The next block after the genesis block takes the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature values of the current block, the block header feature values of the parent block, version number, timestamp, and difficulty value, and so on. This ensures that the block data stored in each block of the blockchain is related to the block data stored in the parent block, guaranteeing the security of the input information in the blocks.
[0089] As described above, the product form that can be cast into digital collectibles can include, but is not limited to, digital images, audio and video, or 3D models. For ease of explanation, this application embodiment takes the product form of the product cast into digital collectibles as a digital image (or simply an image), that is, a digital collectible as a digital collectible image, to introduce the generation scheme of digital collectibles. Any image can be composed of one or more superimposed elements. Specifically, if the layers to which the elements belong are at different levels, then the element images corresponding to each element can be superimposed according to the layer level order, such as from high to low or from low to high, to generate an image; where layer level 1 can be called layer 1, layer level 2 can be called layer 2, and so on.
[0090] like Figure 1b As shown, assuming the elements to be combined include: element 1, element 2, and element 3, and element 1 belongs to layer 1, element 2 belongs to layer 2, and element 3 belongs to layer 3; then, in order of increasing layer level, the element images of the higher layer level elements are superimposed on the element images of the lower layer level elements, such as superimposing element image 1012 of element 2 on element image 1011 of element 1, and then superimposing element image 1013 of element 3 on element image 1012 of element 2, thereby constructing image 102.
[0091] In practical applications of constructing digital artifact images based on elements, the types of elements belonging to the same layer, and the number of each type, are quite diverse; for example... Figure 1c The "penguin" element shown can be of various types depending on its style, and each style can have multiple penguin elements. This abundance of element types and quantities makes it particularly important to efficiently construct digital collectibles based on these elements, thereby increasing the success rate of digital collectible generation. Therefore, this application provides a digital collectible generation scheme, the implementation principle of which roughly includes:
[0092] ① If the target object (such as any object) has the need to generate digital collectibles, the target object can create an element configuration file. The created element configuration file records the element attribute information of N layers. Each layer corresponds to a set of element attribute information, and each set of element attribute information includes the element attribute information of multiple elements.
[0093] ② The collection generation tool reads the element configuration file and randomly selects elements from each set of element attribute information in the configuration file to determine the random element attribute information for each layer. Specifically, it randomly selects an element from each set of element attribute information and uses the attribute information of the randomly selected element as the random element attribute information. Then, it generates most of the collection combinations based on the random element attribute information of each layer. Next, it determines the exhaustive element attribute information for each layer from each set of element attribute information in the element configuration file. Specifically, it uses the attribute information of the elements that were not selected in each set of element attribute information as the exhaustive element attribute information. Based on the exhaustive element attribute information of each layer, it generates the remaining non-repeating collection combinations. Finally, it outputs all collection combinations and the element attribute information of the elements contained in each collection combination to a collection file.
[0094] ③ Read the collection file, and considering that each collection combination in the collection file consists of multiple elements, and each element is on a different layer, the different elements contained in the collection combination can be superimposed layer by layer to synthesize the corresponding digital collection (or digital collection image) according to the layer level order.
[0095] ④ Finally, perform a hash operation on the content of each digital collectible to obtain the hash value of each digital collectible, and update the collection file with the hash value; the updated collection file awaits to be uploaded to the blockchain.
[0096] In the above scheme, most of the unique collection combinations are generated by randomly selecting elements, and then a small number of collection combinations are generated by exhaustively selecting elements. This method of combining randomness and exhaustive selection to generate collection combinations can avoid the failure of digital collection generation due to the generation of duplicate collection combinations, improve the success rate of digital collection generation, achieve efficient digital collection generation, and ensure that each digital collection generated is unique, meeting the generation needs of various complex digital collections.
[0097] It should be noted that when the embodiments of this application are applied to specific products or technologies, such as when the target object adds element images (or other information) to the element configuration file, permission or consent from the holder of the element image is required; and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, such as the type of digital collectibles cast must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0098] The digital collectible generation scheme proposed in this application is deployed in a digital collectible generation tool (or simply a collectible generation tool). When digital collectibles need to be generated, calling this digital collectible generation tool can automatically generate a massive number of digital collectibles, improving the intelligence of digital collectible generation. The digital collectible generation tool can run as a system-level program (or plug-in) on an electronic device; or, the digital collectible generation tool can run as an application-level program in any application, and can be called by any application to generate digital collectibles. For ease of explanation, the following will use an electronic device as the execution subject, specifically the digital collectible generation tool running on an electronic device, as an example to introduce the digital collectible generation scheme provided in this application.
[0099] The following categories are included: ① Electronic devices, including but not limited to: smartphones (such as Android phones, iOS phones, etc.), tablets, personal computers, portable personal computers, mobile internet devices (MIDs), smart TVs, in-vehicle devices, head-mounted devices, and other touch-screen smart devices. ② Applications running on electronic devices, including but not limited to: ① Applications installed and running on a terminal; terminals include but are not limited to: PCs (Personal Computers), PDAs (Tablet Computers), mobile phones, wearable devices, smart in-vehicle devices, and other smart devices. ② Installation-free applications, i.e., applications that can be used without downloading and installation; these applications are commonly known as mini-programs, which typically run as subroutines in the client. ③ Web applications opened through a browser; etc. This application does not limit the type of electronic device or the type of application; this is only a description of the specific application.
[0100] As described above, the generated digital collectibles will ultimately be stored on the blockchain within the blockchain network. Therefore, the electronic device provided in this embodiment can be a node device within the blockchain network. In this case, after generating the digital collectibles, the electronic device can directly execute operations such as bidding on blocks to put the digital collectibles on the blockchain. Alternatively, the electronic device provided in this embodiment can be another device independent of the blockchain network. In this case, after generating the digital collectibles, the electronic device can send the digital collectibles to a node device in the blockchain network so that the digital collectibles can be put on the blockchain through that node device.
[0101] The following is in conjunction with the appendix Figure 2 Taking electronic devices as an example, which are independent of the blockchain network, the article introduces the general process of generating digital collectibles using electronic devices and uploading them to the blockchain. Figure 2As shown, if a target entity has a need to generate digital collectibles, it can create an element configuration file and launch the digital collectible generation tool on its electronic device to process the configuration file and generate one or more digital collectibles. Then, the electronic device transmits the generated digital collectibles to node devices in the blockchain network. Finally, the node device receiving the digital collectibles, after reaching a consensus on the digital collectibles, stores them on its maintained blockchain, thus achieving the on-chain recording of the digital collectibles.
[0102] Practice has shown that the digital collectible generation scheme provided in this application has significant advantages in generating digital collectibles. The advantages of this application's embodiments are illustrated below by comparing this application's scheme with existing mainstream digital collectible generation schemes:
[0103] Current mainstream digital collectible generation schemes can be divided into two categories: exhaustive selection of elements and random selection of elements. Exhaustive selection involves brute-force exploration of all possible combinations of elements, regardless of the number of elements in each combination. This approach can lead to failure when the number of elements varies, as not all combinations will exist. Random selection involves randomly selecting elements to synthesize a digital collectible, re-selecting elements to generate a new one if an existing one is encountered. This approach can result in duplicate combinations when the number of possible combinations is limited, leading to failure and no solution. For example, if the remaining elements are the same as the first and last digital collectible, it's impossible to create different combinations. Both purely random and purely brute-force methods are prone to failure and are limited by the number of elements, resulting in a low success rate for digital collectible generation.
[0104] The digital collectible generation scheme provided in this application has two main advantages. First, it first generates a majority of unique collectible combinations by randomly selecting elements, and then generates a small subset of collectible combinations by exhaustively selecting the remaining elements. This combination of randomness and exhaustive search improves upon the problem of limited permutations and combinations, which can easily lead to duplicate combinations through random generation. This avoids failures in digital collectible generation, ensures a high success rate, and improves the overall success rate of digital collectible generation. Second, the digital collectible generation scheme also considers the scarcity of elements, enabling it to meet the generation needs of various complex digital collectibles and enhancing its versatility.
[0105] Based on the digital collectible generation scheme described above, this application proposes a more detailed method for generating digital collectibles. The generation method proposed in this application will be described in detail below with reference to the accompanying drawings.
[0106] Figure 3 The illustration shows a flowchart of a method for generating digital collectibles according to an exemplary embodiment of this application; the method for generating digital collectibles can be executed by an electronic device, and the method may include, but is not limited to, steps S301-S304:
[0107] S301: Get element configuration file.
[0108] The element configuration file records the element attribute information of N layers, where N is an integer greater than 1. ① A layer can be simply understood as a film containing elements such as text, images, tables, or graphics; it supports stacking multiple layers according to their layer level order to create a final image. In other words, layers have layer level attributes; by sequentially stacking at least two layers according to their layer level order, an image can be obtained. As given above... Figure 1b As shown, there are three layers: Layer 1, Layer 2, and Layer 3, and each layer contains different (or possibly the same) elements. Assuming that the layer level of Layer 1 is less than the layer level of Layer 2, and the layer level of Layer 3 is less than the layer level of Layer 3, then by stacking Layer 2 on top of Layer 1 and Layer 3 on top of Layer 2 in the order of layer with higher layer level, we can obtain the final image 102. This image 102 includes the elements contained in each layer, that is, the elements contained in each layer are combined to form image 102.
[0109] ②Each of the N layers corresponds to a set of element attribute information. Any set of element attribute information includes the element attribute information of multiple elements, and the layer to which these multiple elements belong is the layer corresponding to that specific element attribute information. In other words, each layer contains one or more elements, specifically, it contains the element attribute information of one or more elements. This makes the elements have layer levels. For example, if element 1 belongs to layer 1 and element 2 belongs to layer 2, then the element level of element 1 is determined to be the layer level of layer 1, and the element level of element 2 is determined to be the layer level of layer 2.
[0110] In practice, when the target object needs to generate multiple digital collectibles on different themes or the same theme, an element configuration file can be created for each theme. This facilitates the subsequent generation of digital collectibles under the corresponding theme by reading each element configuration file. For example, if the target object wants to generate 30,000 digital collectibles on different themes, see [link to example]. Figure 4Assuming the themes are named "Baijiu" (Chinese liquor), "Semiconductor," "Photovoltaics," "Internet," and "New Energy Vehicles," and each theme has 600 digital collectibles, an element configuration file can be created for each theme. This configuration file can be a spreadsheet file (or an Excel file). The element configuration files for each theme can be stored in the storage space of the electronic device. Using spreadsheet files for element configuration makes configuring the target object simpler and more convenient.
[0111] It should be noted that the element configuration files corresponding to multiple themes can be recorded in the same file in a paginated form, which may include a table file; or, the element configuration files corresponding to multiple themes can exist in the form of independent pages. This application embodiment does not limit the existence form of multiple element configuration files.
[0112] It should also be noted that the embodiments of this application support the simultaneous execution of the casting process for digital collectibles of different themes based on element configuration files corresponding to different themes; that is, the embodiments of this application support the simultaneous casting of digital collectibles of different themes. For ease of explanation, the following description will use the casting of a digital collectible of a single theme as an example to introduce the digital collectible generation method provided by the embodiments of this application. The following will combine... Figure 5 Taking the generation of element configuration files corresponding to a target topic (such as any topic) as an example, the specific implementation process of generating element configuration files is introduced. The steps for generating element configuration files may include, but are not limited to, s11-s12:
[0113] s11: Obtain the candidate element set, which includes element attribute information of one or more elements and the layer to which each element belongs. As described above, each layer contains one or more elements, and the element level of these elements is the layer level of the layer to which they belong. For example, if the candidate element set includes element attribute information of element 1, element 2, element 3, element 4, and element 5, and the layer to which each element belongs; where element 1, element 2, and element 3 belong to layer 1, element 4 belongs to layer 2, and element 3 belongs to layer 4, then the element level of element 1, element 2, and element 3 is determined to be the layer level of layer 1, the element level of element 4 is determined to be the layer level of layer 2, and the element level of element 5 is determined to be the layer level of layer 3.
[0114] s12: Add the element attribute information of elements at the same layer level to the corresponding function sheet in the element configuration file to generate the element configuration file. Specifically, the element configuration file includes N function sheets, each function sheet corresponding to one layer (or each function sheet represents one layer). Therefore, the element attribute information of various elements belonging to the same layer can be added to the same function sheet to generate the element configuration file.
[0115] Based on the steps s11-s12 above, an element configuration file for the target theme is generated. The following describes the contents of the element configuration file. Assuming that all elements in the candidate element set belong to two layers, Layer 1 and Layer 2, the created element configuration file includes two function sheets. The names of each function sheet in the element configuration file are prefixed with "layer," and incremented sequentially from layer1 according to the layer level represented by the function sheet. For example, if the two function sheets include sheet1 and sheet2, and sheet1 represents layer 1 and sheet2 represents layer 2, and the layer level of layer 1 is less than the layer level of layer 2, then the names of the function sheets included in the element configuration file will be: layer1 → layer2. When layer1 is selected, it indicates that the target object wants to view the element attribute information of the various elements contained in layer1, and the information recorded in the function sheet1 referred to by layer1 is output.
[0116] Each function sheet in the element configuration file records a set of element attribute information for the corresponding layer, and each set of element attribute information includes element attribute information for multiple elements. For example... Figure 6a As shown, worksheet sheet1 records the element attribute information of various elements belonging to layer 1. For example, the function table sheet1 contains two types of elements: background1 and background2; and so on. Figure 6b As shown, worksheet sheet2 records the element attribute information of various elements belonging to layer 3. For example, function sheet3 contains five elements: Scene Stage 1 "Scene Stage: Grand Ceremony", Scene Stage 2 "Scene Stage: Shining", and Scene Stage 3 "Scene Stage: Focus". Each function sheet records the element attribute information, including but not limited to: element name, element probability, element image, and element description information. The element attribute information of the elements given above will be described in detail below:
[0117] a. Element attribute information includes: element name (such as element ID or element abbreviation); the element name can be used to uniquely identify the element, and the element name can include element ID, element number or element nickname, etc.
[0118] b. The element attribute information of an element includes: the element image of the element. Specifically, the element attribute information of an element recorded in the element configuration file may include the element image itself, or it may include attribute information of the element image (such as the cache address of the element image, image number, etc.). This application embodiment does not limit the recording format of the element attribute information of an element in the element configuration file. Furthermore, the element image name and the element name may be the same or different; when the element name and the element image name are different, the element image name of the element image is recorded in the function table sheet1.
[0119] c. The element attribute information includes: element description information; the element description information can be used to describe the type to which the element belongs, and the element description information of each element in each layer is the same; that is, the type of one or more elements contained in each layer is the same, that is, one layer corresponds to one type, and the type corresponding to the layer may include, but is not limited to: background, scene stage, theme, and emoticon, etc., and the embodiments of this application do not limit the type to which the element belongs; such as Figure 6a The element in sheet1, represented by layer1, is of type background. Figure 6b The elements in sheet2, which represents layer2, belong to the category of scene stage.
[0120] d. Element attribute information includes: element probability (or element ratio, element proportion, etc.); element probability can be used to indicate the scarcity of an element. The specific value of the element probability of any element is: the ratio between the number of elements of that element and the number of elements of all elements contained in the layer to which that element belongs; and the sum of the element probabilities of all elements in each layer is 100%; such as Figure 6a The element probabilities in background 1 and background 2 are the same, both being 50%. Figure 6bThe element probabilities of scene 1, scene 2, scene 3, scene 4, and scene 5 shown are all the same, and all are 20%. The larger the ratio between the number of elements of any given element and the total number of elements in the layer to which that element belongs, the lower the scarcity of that element; conversely, the smaller the ratio between the number of elements of any given element and the total number of elements in the layer to which that element belongs, the higher the scarcity of that element. The higher the scarcity of an element, the smaller its quantity, and therefore the greater its value. It should be noted that the representation of element probability in this embodiment is not limited. Element probability can be expressed as a percentage (e.g., 20%), a ratio (e.g., 20:100), or quantity information (e.g., 20). The above example uses a percentage representation of element probability for illustration.
[0121] It is worth noting that the element attribute information recorded in the element configuration file is not limited to the four types mentioned above. In practical applications, element attribute information can be added, deleted, or updated in the element configuration file according to different needs for generating digital collectibles. This application embodiment does not limit the types and quantity of element attribute information recorded in the element configuration file. Furthermore, Figure 6a and Figure 6b This example uses a table in the function menu where the first column is for the element name, the second column for the element probability, the third column for the element image, and the fourth column for the element description. In practical applications, the position and style of each element's attribute information in the function menu can be adapted, and this will not be described exhaustively.
[0122] It is also worth noting that the above-mentioned process of generating the element configuration file for the target theme can be implemented automatically by the electronic device. In this implementation, the target object only needs to provide the candidate element set to the electronic device, and the electronic device can automatically generate the element configuration file for the target theme based on the candidate element set. This enables automated generation of element configuration files, improves the generation efficiency of element configuration files, and reduces the functional load of the target object. Alternatively, the generation process of the element configuration file for the target theme can also be implemented manually by the target object. In this implementation, the target object can use a spreadsheet application to create multiple function tables in the same spreadsheet file and fill in the element attribute information of the corresponding elements in each function table to generate the element configuration file. This helps the target object set the element configuration file according to its own needs and meets the target object's need to customize the creation of element configuration files. This application embodiment does not limit whether the element configuration file is automatically generated by the electronic device or manually generated by the target object.
[0123] S302: Randomly select from the element attribute information set in the element configuration file to determine the random element attribute information of each layer, and generate the first collection set based on the random element attribute information of each layer.
[0124] S303: Determine the exhaustive element attribute information of each layer from the set of element attribute information in the element configuration file, and generate the second collection set based on the exhaustive element attribute information of each layer.
[0125] In steps S302-S303, after the electronic device obtains the element configuration file, it can read and process the element configuration file. Specifically, the collection generation tool deployed in the electronic device reads and processes the element configuration file to generate multiple collection combinations composed of elements in the element configuration file, and then generates digital collections based on the collection combinations. In the process of generating collection combinations based on the element configuration file, this embodiment supports the method of randomly generating most collection combinations and exhaustively enumerating the remaining small part of collection combinations to generate collection combinations. Compared with purely using random generation of collection combinations, it can avoid duplicate collection combinations composed of the remaining elements, thus avoiding the failure of digital collection generation. Compared with purely using brute-force exhaustive generation of collection combinations, it can effectively reduce resource and time consumption and improve the efficiency of digital collection generation.
[0126] The following is in conjunction with the appendix Figure 7 The specific implementation process of generating a collection combination based on the element configuration file is described, including but not limited to steps s21-s23, wherein:
[0127] s21: Read the element configuration file and generate the element pool corresponding to each function table in the element configuration file. Specifically, after obtaining the element configuration file, the electronic device can read and process the information of each function table in the element configuration file, obtaining the element attribute information of each type of element recorded in each function table. The element attribute information includes the total number of times the element is allowed to be selected. Then, based on the total number of times each type of element is selected, the element attribute information of the elements selected a total of a certain number of times is added to the element pool corresponding to the corresponding function table, thus obtaining the element pool corresponding to each function table. The element pool corresponding to any function table includes: the element attribute information of the elements selected a total of a certain number of times under each type of element belonging to that function table; for example, if the function table includes two types of elements: element "background 1" and element "background 2", and the element probability of element "background 1" is 50%, the element probability of element "background 2" is 50%, and the function table contains a total of 10 elements, then the element pool corresponding to the function table will include: the element attribute information of 5 elements "background 1" and the element attribute information of 5 elements "background 2". It should be noted that, depending on the actual needs, some information from the element attributes can be added to the element pool; for example, the element names of the elements selected a total of times can be added to the element pool corresponding to the same function menu, so that the element pool only includes the element names of the elements.
[0128] Depending on the element attribute information recorded in the element configuration file, the method for determining the total number of times an element can be selected varies. Optionally, as described above, the element attribute information in the element configuration file may include element probabilities, and these probabilities may be expressed as quantity information. In this case, the element configuration file directly records the quantity information allowed for each type of element to be selected, which represents the total number of selections. The electronic device can then directly read the element configuration file to obtain the total number of selections for each element. Optionally, the element attribute information in the element configuration file may include element probabilities expressed as percentages or ratios. In this case, the element configuration file also records the total number of elements contained in each function table (i.e., the total number of elements). The total number of selections for that element can be calculated by comparing the total number of elements corresponding to the function table with the percentage or ratio of the elements within that function table. Of course, when the element probabilities recorded in the element configuration file are expressed in other forms, other implementation methods can also be used to determine the total number of selections for an element, which will not be described in detail here.
[0129] An exemplary diagram illustrating how to read an element configuration file to obtain the element pool corresponding to each function table can be found here. Figure 8 .like Figure 8As shown, the element configuration file includes two function tables, layer1 and layer2. The electronic device can read and process elements from each function table in the element configuration file to obtain the element pool corresponding to layer1 and the element pool corresponding to layer2. For example, layer1 in the element configuration file records two types of elements, background 1 and background 2, and the element probability of background 1 and background 2 is 50% each; layer2 in the element configuration file records five types of elements, scene platform 1, scene platform 2, scene platform 3, scene platform 4 and scene platform 5, and the element probability of each scene platform is 20%. It can be seen that there are 2*5=10 permutations and combinations of digital collectibles. Assuming that 10 different internet digital collectibles can be generated, it is possible to generate them. However, if there are more than 10, it is absolutely impossible to generate them, as the number of permutations and combinations is inherently limited.
[0130] So, if layer 1 contains a total of 10 elements, when reading the function table sheet1 from the element configuration file, 5 background1 elements and 5 background2 elements, totaling 10, are read and added to the element pool corresponding to sheet1. The resulting element pool for layer 1 includes 5 background1 elements and 5 background2 elements. Similarly, when reading the function table sheet2 from the element configuration file, 5 types of elements are read, with 2 of each type, totaling 10, and these are added to the element pool corresponding to sheet2, creating the element pool for layer 2. If there are other function tables (or layers), the process continues in the same manner. The element pool for each layer or menu can be an array in the programming language; multiple layers can have multiple arrays; for example, in the JS (JavaScript) language, there are arrays arr[0]
[10] and arr[1]
[10] ; where 0 in array arr[0]
[10] represents layer 1 (or menu sheet1) and 10 represents the number of elements, storing the elements. Similarly, 1 in array arr[1]
[10] represents layer 2 (or menu sheet2) and 10 represents the number of elements, storing the elements.
[0131] It should be noted that when the element configuration file includes at least two function tables, this application embodiment supports the electronic device to perform element reading processing on each function table in parallel or serial manner to construct the element pool corresponding to each function table. For example, if the element configuration file includes function table sheet1 and function table sheet2, the electronic device can read them serially according to the layer level corresponding to the function table sheet. For example, it can first read the elements in function table sheet1 to construct the element pool corresponding to function table sheet1, and then read the elements in function table sheet2 to construct the element pool corresponding to function table sheet2. As another example, if the element configuration file includes function table sheet1 and function table sheet2, the electronic device can read the elements in function table sheet1 and the corresponding elements in function table sheet2 in parallel, and construct the element pool corresponding to function table sheet1 and the element pool corresponding to function table sheet2 respectively, so as to realize the construction of at least two element pools simultaneously and improve the construction efficiency of element pools. When constructing the element pools corresponding to each function table in parallel, the construction process of each element pool is an independent process and will not affect each other, which is explained here.
[0132] s22: Random selection is performed from each element pool to determine the random element attribute information of each layer, and a first collection set is generated based on the random element attribute information of each layer. The first collection set includes one or more collection sets generated by randomly selecting elements from each element pool; each collection set includes the element name contained in the element attribute information of one element in each layer, and there are one or more different element names between any two collection sets. In other words, each collection set in the first collection set is obtained by concatenating the element names of one element from each element pool, and any two collection sets are different, specifically in that the element names of the elements that make up the collection set are different.
[0133] The following is combined with Figure 9 This paper describes the implementation process of randomly selecting elements from various element pools, determining the random element attribute information of each layer, and generating the first collection set based on the random element attribute information of each layer. Figure 9 As shown:
[0134] First, according to a random selection rule, the element attribute information of one element is randomly selected from each element pool. This randomly selected element's attribute information serves as the random element attribute information, and it includes the element's name. A random selection rule refers to a method of selecting elements from each element pool based on the principle of randomness. Its characteristic is that in a single random selection process, each element in the pool has an equal probability of being selected, and the selection is entirely determined by the combined effect of many random factors. For example... Figure 9 The first random selection shown is to select background 1 from the element pool corresponding to layer1 and scene stage 1 from the element pool corresponding to layer2.
[0135] Secondly, based on the layer level of the randomly selected elements, the element names are arranged and combined to generate a first candidate collection combination. For example, the first candidate collection combination might be "background1scene1.png". The ".png" in this first candidate collection combination indicates that the digital collection corresponding to this first candidate collection combination is in image format. Next, the first candidate collection combination is matched with existing collection combinations in the first collection combination set. The purpose of this matching is to determine whether there is already a collection combination in the first collection combination set that is the same as or duplicates the first candidate collection combination.
[0136] Then, if the first candidate collection combination does not match any existing collection combination in the first collection combination set, it means that no collection combination in the first collection combination set is duplicated with the first candidate collection combination. In this case, the first candidate collection combination is added to the first collection combination set. Furthermore, each element pool is updated based on the first candidate collection combination. Specifically, in each element pool, the element attribute information of each element contained in the first candidate collection combination is deleted. If the element attribute information in the element pool is the element name, updating the element pool here means deleting the element names of each element contained in the first candidate collection combination. Further, the element probabilities of each element contained in the first candidate collection combination can also be added to the first collection combination set. This allows the trading entity to output the element probabilities of each element contained in the first candidate collection combination when trading it later, enabling them to choose whether to trade the first candidate collection combination based on the element probabilities. If the first candidate collection combination matches an existing collection combination in the first collection combination set, it means that the existing collection combination in the first collection combination set is duplicated with the first candidate collection combination. In this case, the element attribute information (such as element name) of each element that makes up the first candidate collection combination set will be put back into the corresponding element pool.
[0137] Understandably, if the first candidate collection combination is one of the collection combinations generated from the first random selection, then the first collection combination set is determined to be an empty set, meaning there are no other collection combinations in the first collection combination set. In this case, the first candidate collection combination can be directly added to the first collection combination set. Optionally, if the first candidate collection combination is not one of the collection combinations generated from the first random selection, then it is determined that there are already generated collection combinations in the first collection combination set. In this case, the matching described above needs to be performed to ensure that the collection combinations added to the first collection combination set are not duplicates.
[0138] Finally, repeat the above steps until the number of collection combinations included in the first collection set is greater than the random selection threshold, which is recorded in the element configuration file, to obtain the first collection set.
[0139] In the process of generating the first collection set according to the random selection rule described above, it is worth noting that adding collection sets to the first collection set can be simply understood as adding collection sets to a collection file. The first and second collection sets are collection files, which are used to store collection sets generated according to the random selection rule and collection sets generated according to the exhaustive selection rule. The collection file can include a collection array; a diagram illustrating adding collection sets and the element probabilities of each element contained in a collection set to the collection array can be found in [reference needed]. Figure 10 ;like Figure 10 As shown, the collection array includes a filename field, an element field, and an element probability field. The filename field is used to store the collection combination, and the filename stored in the collection file can refer to the collection combination. The element field is used to store the element name, and the element probability field is used to store the element probability.
[0140] s23: When the number of collection combinations contained in the first collection combination set is greater than the random selection threshold, determine the exhaustive element attribute information of each layer from each element pool, and generate the second collection combination set based on the exhaustive element attribute information of each layer.
[0141] The element configuration file records a random selection threshold. When the number of collection combinations in the first collection set exceeds the random selection threshold, a brute-force approach is used to select elements to generate collection combinations, increasing the probability of successfully generating digital collections. The random selection threshold can be pre-set in the element configuration file by the target object based on business needs, and its specific value can be determined through multiple tests. For example, if the target object wants to generate 1000 digital collections on a target theme, and testing shows that the elements in the last 100 collection combinations are all duplicates (e.g., the last two collection combinations have the same remaining elements), resulting in no solution for generating digital collections, then the random selection threshold is set to 899. When the electronic device detects that 900 collection combinations are generated using random selection, it determines that the number of collection combinations in the first collection set exceeds the random selection threshold of 899. Therefore, it stops using random selection and instead uses a brute-force approach to select all possible permutations and combinations, ensuring that the generated digital collections are unique and increasing the probability of success.
[0142] In specific implementation, firstly, when the number of collection combinations contained in the first collection set exceeds the random selection threshold, the exhaustive element attribute information of each layer can be determined from the element attribute information set of each element in the element configuration file. The specific process may include: determining the number of times each element in each element attribute information set has been selected based on the element names contained in each collection combination in the first collection set; then, when there are elements in the layer whose selected count is less than the corresponding total selection count, the element attribute information of the elements whose selected count is less than the corresponding total selection count is determined as the exhaustive element attribute information of the layer. In other words, the exhaustive element attribute information of the layer may refer to: the element attribute information of the remaining elements in the element configuration file that have not been randomly selected; such as... Figure 11 As shown, assuming the element pool includes "element1", "element1", "element2", "element3", "element3" and "element3"; if "element1", "element2" and "element3" are randomly selected from the element pool according to the random selection rules, then the remaining elements "element1", "element3" and "element3" in the element pool are taken as the remaining elements, and the element attribute information of the remaining elements is taken as the exhaustive element attribute information.
[0143] Secondly, following the exhaustive selection rules, the element names contained in the exhaustive element attribute information of each layer are permuted and combined to generate one or more second candidate collection combinations. For example, if the remaining elements in each layer include: element a and element b in layer 1; element c and element c in layer 2, then permuting and combining the element names of the remaining elements will yield the second candidate collection combination: element a and element c, element b and element c.
[0144] Finally, the one or more second candidate collection combinations obtained through brute-force enumeration are matched with the collection combinations included in the first collection combination set. The purpose of this matching is to determine whether there exists a second collection combination among the one or more candidate collection combinations that is not present in the first collection combination set. If there is a second candidate collection combination among the one or more candidate collection combinations that does not match the first collection combination set, it means that there is a second collection combination among the one or more candidate collection combinations that is not present in the first collection combination set. In this case, the unmatched second candidate is added to the second collection combination set, resulting in the second collection combination set. Conversely, if there is no second candidate collection combination among the one or more candidate collection combinations that matches the first collection combination set, it means that there is no second collection combination among the one or more candidate collection combinations that is not present in the first collection combination set. In this case, the second collection combination set is determined to be an empty set, meaning that the second collection combination set does not contain any collection combinations.
[0145] Through the above steps s21-s23, it is possible to generate a collection combination by combining randomly selected elements and by brute-force exhaustive selection of elements. By combining the advantages of both, the digital collection can be solved, thus ensuring the successful generation of digital collections.
[0146] S304: Based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, generate the digital collection corresponding to each collection set.
[0147] Based on the aforementioned steps, a collection file is obtained. This file includes: the collection combinations contained in the first collection set, the collection combinations contained in the second collection set, and the element probabilities of each element within each collection combination in both sets. Then, based on the collection file and the element attribute information of each element in the element configuration file, a digital collectible corresponding to each collection combination in the collection file can be generated. Each collection combination in the first and second collection sets includes: the element name contained in the element attribute information of an element in each layer, and there are one or more distinct element names between any two collection combinations; that is, the collection file does not contain duplicate collection combinations to ensure the uniqueness of the digital collectibles generated based on the collection combinations.
[0148] For example, any two collection sets in the first collection set have one or more distinct element names, meaning no two collection sets in the first collection set are duplicates. Similarly, any two collection sets in the second collection set have one or more distinct element names, meaning no two collection sets in the second collection set are duplicates. Furthermore, any collection set in the first collection set and any collection set in the second collection set have one or more distinct element names, meaning no two collection sets in the first and second collection sets are duplicates.
[0149] As described above, no two combinations of collectibles in the collection file are identical. Therefore, the multiple digital collectibles generated based on each collectible combination in the collection file and the element images of the elements within that combination are also different. In other words, the massive number of digital collectibles generated using the embodiments of this application are all unique, ensuring the uniqueness of each digital collectible.
[0150] In this embodiment, when there is a need to generate digital collectibles, an element configuration file can be obtained. This configuration file records the element attribute information of elements in N layers, with each layer corresponding to a set of element attribute information. First, random selection is performed from each set of element attribute information in the configuration file, and based on the determined random element attribute information of each layer, a majority of unique collectible combinations are randomly generated. Second, exhaustive element attribute information for each layer is determined from each set of element attribute information in the configuration file, and the remaining unique collectible combinations are exhaustively generated based on this exhaustive element attribute information. Finally, digital collectibles are generated based on these combinations. This scheme supports generating a majority of unique collectible combinations through random element selection, followed by generating a small subset of unique collectible combinations through exhaustive element selection. By combining random and exhaustive methods, the generation of collectible combinations avoids the failure to generate duplicate combinations, thereby improving the success rate of digital collectible generation and achieving efficient digital collectible generation.
[0151] Figure 12 The illustration shows a flowchart of another method for generating digital collectibles according to an exemplary embodiment of this application; the method for generating digital collectibles can be executed by an electronic device, and the method may include, but is not limited to, steps S1201-S1205:
[0152] S1201: Get element configuration file.
[0153] S1202: Randomly select from the set of element attribute information in the element configuration file to determine the random element attribute information of each layer, and generate the first collection set based on the random element attribute information of each layer.
[0154] S1203: Determine the exhaustive element attribute information of each layer from the set of element attribute information in the element configuration file, and generate the second collection set based on the exhaustive element attribute information of each layer.
[0155] It should be noted that the specific implementation process described in steps S1201-S1203 can be found in the aforementioned... Figure 3 The specific implementation process shown in steps S301-S303 of the illustrated embodiment will not be repeated here.
[0156] S1204: Obtain the element images of the elements contained in each collection combination in the first collection combination set and the second collection combination set, and generate the digital collection corresponding to each collection combination based on the element image of each element and the layer to which each element belongs.
[0157] In the specific implementation, the electronic device calls the collection generation tool to generate collection combinations based on randomly selected elements, and also to generate a collection file by brute-force exhaustive selection of elements. This collection file includes one or more collection combinations from a first collection set and one or more collection combinations from a second collection set. Then, the electronic device calls the collection generation tool to start an image compositing service (or picture compositing service), reads the elements contained in each collection combination from the collection file, and obtains the element images of each element according to the element configuration file. Finally, based on the layer level of each element in each collection combination, the element images of each element in the collection combination are superimposed in layer-level order to obtain the digital collection corresponding to each collection combination. This digital collection is specifically an image containing elements.
[0158] The following section uses any collection combination in the collection file as an example to introduce the specific implementation process of generating the target digital collection corresponding to the target collection combination based on the element attribute information of each element contained in the target collection combination, specifically the element images of each element. In the specific implementation:
[0159] First, after the electronic device obtains the target collection combination from the collection file, it can read one or more reference elements contained in the target collection combination, specifically reading the element name of each reference element. For example, if the target collection combination is obtained by superimposing element image 3 onto element image 2, and element image 2 onto element image 1, then the reference elements contained in the target collection combination are determined to include: the elements contained in element image 3, the elements contained in element image 2, and the elements contained in element image 1.
[0160] Secondly, based on the element names of one or more reference elements, obtain the element images of each reference element from the one or more reference elements included in the target collection combination. The method of obtaining the element images varies depending on their storage location. Optionally, if the element images are directly recorded in the element configuration file, the element images of each reference element can be obtained directly from the element configuration file. Optionally, if the element images are stored in the cache space of the electronic device, the element images of the reference elements can be obtained from the cache space storing the reference elements based on information such as the element name or element storage address.
[0161] Finally, according to the layer level of each reference element in the target collection, the element images of each reference element are superimposed sequentially to generate the target digital collection corresponding to the target collection. The element images of each reference element can be superimposed sequentially in descending order of layer level; or, in ascending order of layer level, the element images of each reference element can be superimposed sequentially. This embodiment of the application does not limit this approach.
[0162] To better understand the process of generating target digital artifacts from overlaid element images given above, the following will combine... Figure 13 Taking the storage of element images in the cache space of an electronic device as an example, this paper introduces the process of generating target digital collectibles. Figure 13 As shown, assuming the target collection combination is "Background 1, Scene Stage 1, Penguin 2", reading this target collection combination will yield one or more reference elements, including: reference element "Background 1", reference element "Scene Stage 1", and reference element "Penguin 2". Each reference element is on a different layer and corresponds to an element image. The storage space can then be opened, containing folders corresponding to each layer. Each folder corresponding to any layer stores element images for each type of element belonging to that layer.
[0163] Then, based on the element names of the reference elements contained in the target collection combination, the element images corresponding to the reference elements are retrieved from each folder. For example, element image 1301 is obtained for reference element "Background 1", element image 1302 is obtained for reference element "Scene 1", and element image 1302 is obtained for reference element "Penguin 2". Finally, the element images of each reference element are superimposed sequentially according to the layer level of the layer to which each reference element belongs, to obtain the target digital collection corresponding to the target collection combination.
[0164] For example, if the layer level of reference element "Background 1" is the lowest (Layer 1), the layer level of reference element "Penguin 3" is the highest (Layer 3), and the layer level of reference element "Scene Platform 1" is an intermediate layer (Layer 2), then the element image 1302 of reference element "Scene Platform 1" is superimposed on the element image 1301 of reference element "Background 1," and then the element image 1303 of reference element "Penguin 2" is superimposed on the element image 1302 of reference element "Scene Platform 1," resulting in digital collection combination 1304. When one element image (such as element image 1303) is superimposed on another element image (such as element image 1302), the elements contained in the first element image can completely or partially cover the elements contained in the second element image. The visual effect presented to the audience is the display of each element layer. For example, Penguin 2 in element image 1303 partially covers Scene Platform 1 in element image 1302, presenting the audience with the spatial visual effect of Penguin 2 standing on Scene Platform 1.
[0165] Through the above process, it is possible to generate target digital collectibles corresponding to the target collectible combination based on the element images of each reference element contained in the target collectible combination. As described above, the number of collectible combinations contained in the collection file is relatively large. Therefore, this application embodiment supports the use of a process pool approach, based on the element attribute information (such as element images) of the elements contained in each collectible combination in the first collectible combination set and the second collectible combination set, and generates digital collectibles corresponding to each collectible combination.
[0166] The process of creating digital collectibles through process pooling can include: defining a process pool containing a fixed number of processes; when a task needs to be processed, a process can be pulled from the pool to handle the task; after the task is completed, the process is not closed, but is returned to the pool to wait for more tasks. If there are many tasks to be executed and the number of processes in the pool is insufficient, the tasks must wait for the previous processes to finish their tasks and return to an idle process before they can continue execution. In other words, since the number of processes in the pool is fixed, a fixed number of processes can run at any given time. This does not increase the scheduling complexity of the operating system, saves time in opening and closing processes, and achieves concurrency to a certain extent.
[0167] In this embodiment, the number of CPU (central processing unit) cores of the electronic device is determined, and a corresponding number of processing processes are generated based on the number of CPU cores. Multiple processing processes form a process pool. In this way, multiple processing processes can be pulled from the process pool to generate digital collectibles corresponding to the collection combination. This is equivalent to generating digital collectibles corresponding to different collection combinations based on different processing processes at the same time, thereby improving the generation efficiency of digital collectibles.
[0168] S1205: Process digital collectibles on the blockchain.
[0169] After generating digital collectibles for each collection combination in the collection file, this application embodiment also supports storing the digital collectibles on a blockchain in a blockchain network to achieve distributed storage of digital collectibles and ensure the uniqueness, immutability and non-replicability of digital collectibles.
[0170] In practical implementation, after generating digital collectibles for each collection combination in the collection file, a hash operation can be performed on the digital collectibles corresponding to each collection combination in the collection file. Specifically, the content contained in each digital collectible is hashed to obtain a hash value for each digital collectible, and each digital collectible has a different hash value. The hash operation may include the process of using a hash algorithm to perform hash calculations on binary data. Hash algorithms support mapping binary plaintext of arbitrary length to shorter binary strings, and different plaintexts are unlikely to map to the same hash value, thus ensuring the uniqueness of the binary string. Hash algorithms may include, but are not limited to, SHA256, SM3, and MD5.
[0171] Then, using the hash value of each digital collectible, the filename (i.e., collectible combination) in the collection file is updated. This update could refer to replacing the corresponding collectible combination in the collection file with the hash value of the digital collectible corresponding to that combination. For example... Figure 14 As shown, the collection file records the collection combination "Background1Scene1Stage1.png". After generating the digital collection corresponding to the collection combination "Background1Scene1Stage1.png", a hash operation can be performed on the digital collection to obtain its hash value. Then, the hash value of the digital collection is used to replace the collection combination "Background1Scene1Stage1.png" recorded in the collection file to obtain the updated collection file.
[0172] Finally, if all the collectible combinations in the collection file are replaced with the hash values of the corresponding digital collectibles, the collection file can be added to the blockchain to achieve the creation of digital collectibles on the blockchain. As described above, when the electronic device is a node device with consensus function in the blockchain network, the electronic device can cache the collection file and add the digital collectibles to the blockchain after the collection file achieves successful consensus. When the electronic device is a device outside the blockchain network, the electronic device can send the digital collectibles to the node device in the blockchain network so that the node device can add the digital collectibles to the blockchain. The embodiments of this application do not limit the specific process of adding digital collectibles to the blockchain.
[0173] Furthermore, once digital collectibles are successfully stored on the blockchain, it is confirmed that digital collectibles on the blockchain have been minted. In this way, digital collectibles have the characteristics of security and immutability. Their digital assets on the chain are identified by on-chain IDs and have clear asset ownership. Therefore, this application embodiment also supports the trading of digital collectibles based on the blockchain. The entire transaction process of digital collectibles can be publicly recorded on the blockchain to ensure the traceability of the transaction records of digital collectibles.
[0174] It should be noted that when the collection file is successfully uploaded to the blockchain, the element probabilities of each element in each collection combination included in the collection file are also uploaded to the blockchain. Therefore, when a transaction request for a digital collectible (such as any digital collectible) is received, indicating that a trading entity wants to trade the digital collectible, a prompt message can be output on the transaction requesting end (i.e., the device used by the trading entity), such as... Figure 15 The displayed prompt information 1501 includes the element probabilities of each element in the digital collectible (or digital collectible to be traded) that the trading party wishes to trade. This allows the trading party to understand the scarcity of the digital collectible based on the element probabilities, enabling them to make an informed decision based on their needs. It is understood that this application embodiment does not limit the specific form of the prompt information; for example, the prompt information may be as follows: Figure 15 The specific numerical value of the element probability shown can also be expressed as "Element X has an element probability of XX, indicating high scarcity of the element", etc.
[0175] In this embodiment, on the one hand, it supports generating mostly unique collection combinations by randomly selecting elements, and then generating a small portion of unique collection combinations by exhaustively selecting elements. This combination of random and exhaustive methods avoids generating duplicate collection combinations, thus preventing digital collection generation failure and improving the success rate of digital collection generation. On the other hand, the element probabilities of each element in the collection combination are added to a collection file. This allows for the output of the element probabilities of each element in the digital collection during subsequent trading, enabling traders to intuitively understand the scarcity of each digital collection and improving their trading experience.
[0176] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.
[0177] Please see Figure 16 , Figure 16 This is a schematic diagram of a digital collectible generation device provided in an embodiment of this application. The generation device can be installed in an electronic device provided in this embodiment, specifically a collectible generation tool deployed within the electronic device. In some embodiments, the generation device can be a computer program (including program code) running in the electronic device, and the generation device can be used to execute... Figure 3 or Figure 13 The corresponding steps in the method embodiments shown. Please refer to... Figure 16 The generating apparatus may include the following units:
[0178] Acquisition unit 1601 is used to acquire element configuration files. The element configuration files record the element attribute information of elements in N layers. Each layer corresponds to an element attribute information set, and each element attribute information set includes element attribute information of multiple elements; N is an integer greater than 1.
[0179] The processing unit 1602 is used to randomly select from the set of element attribute information in the element configuration file, determine the random element attribute information of each layer, and generate the first collection combination set based on the random element attribute information of each layer.
[0180] The processing unit 1602 is also used to determine the exhaustive element attribute information of each layer from the set of element attribute information in the element configuration file, and generate a second collection combination set based on the exhaustive element attribute information of each layer.
[0181] The processing unit 1602 is also used to generate digital collectibles corresponding to each collectible combination based on the element attribute information of the elements contained in each collectible combination in the first collectible combination set and the second collectible combination set.
[0182] Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
[0183] In one implementation, the element configuration file includes N function tables, each function table corresponding to a layer; the processing unit 1602 is used to obtain the element configuration file, specifically for:
[0184] Obtain a candidate element set, which includes element attribute information of one or more elements, as well as the layer to which each element belongs;
[0185] Add the element attribute information of elements belonging to the same layer to the corresponding function table of the layer in the element configuration file to generate the element configuration file;
[0186] Each function table in the element configuration file records a set of element attribute information for the corresponding layer.
[0187] In one implementation, each function table corresponds to an element pool, and the element attribute information includes the total number of times the element is allowed to be selected; the processing unit 1602 is further configured to:
[0188] The information is read and processed for each function table in the element configuration file to obtain the element attribute information of each element recorded in each function table;
[0189] Based on the total number of times each element is selected, the element attribute information of the elements selected a total of a certain number of times is added to the element pool corresponding to the corresponding function table, thus obtaining the element pool corresponding to each function table.
[0190] In one implementation, the element configuration file also records a randomly selected threshold.
[0191] The processing unit 1602 is used to randomly select from the element attribute information sets in the element configuration file to determine the random element attribute information of each layer, and generate a first collection set based on the random element attribute information of each layer; when determining the exhaustive element attribute information of each layer from the element attribute information sets in the element configuration file and generating a second collection set based on the exhaustive element attribute information of each layer, it is specifically used for:
[0192] Random selection is performed from each element pool to determine the random element attribute information of each layer, and the first collection set is generated based on the random element attribute information of each layer.
[0193] When the number of collection combinations contained in the first collection set exceeds the random selection threshold, exhaustive element attribute information of each layer is determined from each element pool, and a second collection set is generated based on the exhaustive element attribute information of each layer.
[0194] In one implementation, the processing unit 1602 is used to perform random selection processing from each element pool, determine the random element attribute information of each layer, and generate the first collection set based on the random element attribute information of each layer, specifically for:
[0195] According to the random selection rules, the element attribute information of an element is randomly selected from each element pool. The element attribute information of the randomly selected element is used as the random element attribute information. The element attribute information includes the element name.
[0196] Based on the layer level of the layer to which each randomly selected element belongs, the element names of the randomly selected elements are sorted and combined to generate the first candidate collection combination.
[0197] Match the first candidate collection with the existing collection collections in the first collection collection set;
[0198] If there is no match, the first candidate collection combination is added to the first collection combination set, and each element pool is updated based on the first candidate collection combination.
[0199] Repeat the above steps until the number of collection combinations included in the first collection set is greater than the random selection threshold, thus obtaining the first collection set.
[0200] In one implementation, when processing unit 1602 updates each element pool based on the first candidate collection combination, it specifically performs the following:
[0201] In each element pool, delete the element attribute information of each element contained in the first candidate collection combination.
[0202] In one implementation, the element attribute information includes the total number of times the element is allowed to be selected; when the processing unit 1602 determines the exhaustive element attribute information of each layer from the various element attribute information sets in the element configuration file, it is specifically used for:
[0203] Based on the element names contained in each collection set in the first collection set, determine the number of times each element in the element attribute information set has been selected.
[0204] When there are elements in a layer whose selected count is less than the corresponding total selected count, the element attribute information of the elements whose selected count is less than the corresponding total selected count is determined as the exhaustive element attribute information of the layer.
[0205] In one implementation, the element attribute information includes the element name. When processing unit 1602 generates the second collection set based on the exhaustive element attribute information of each layer, it is specifically used for:
[0206] According to the exhaustive selection rules, the element names contained in the exhaustive element attribute information of each layer are arranged and combined to generate one or more second candidate collection combinations.
[0207] Match one or more second candidate collections with the collections included in the first collection set;
[0208] If there is a second candidate collection that does not match the collection collection in the first collection collection set, then the mismatched second candidate collection is added to the second collection collection set to obtain the second collection collection set.
[0209] In one implementation, the element attribute information includes the element image; the first collection set and the second collection set belong to a collection file, and any collection set in the collection file is represented as the target collection set;
[0210] Processing unit 1602 is used to generate digital collectibles corresponding to each collectible combination based on the element attribute information of the elements contained in each collectible combination in the first collectible combination set and the second collectible combination set. Specifically, it is used for:
[0211] Read the element name of one or more reference elements contained in the target collection portfolio;
[0212] Based on the element names of one or more reference elements, obtain the element images of each reference element in the one or more reference elements;
[0213] Based on the layer level of each reference element, the element images of each reference element are superimposed sequentially to generate the target digital collection corresponding to the target collection combination.
[0214] In one implementation, the processing unit 1602 is further configured to:
[0215] Using a process pool approach, and based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, digital collections corresponding to each collection set are generated.
[0216] In one implementation, the processing unit 1602 is further configured to:
[0217] Perform a hash operation on the digital collectibles corresponding to each collection combination in the collection file to obtain the hash value of each digital collectible;
[0218] Replace the corresponding collection combination in the collection file with the hash value of each digital collection;
[0219] If all collection combinations in the collection file are replaced with the hash values of the corresponding digital collections, then the collection file is added to the blockchain.
[0220] In one implementation, the collection file also includes element attribute information for each element contained in each collection combination, including element probability, which indicates the scarcity level of the element; the processing unit 1602 is further configured to:
[0221] If the collection file is successfully uploaded to the blockchain and there is a digital collectible transaction request, a prompt message will be output on the transaction request end.
[0222] The notification information includes the element probabilities of each element contained in the digital collectible to be traded.
[0223] According to one embodiment of this application, Figure 16 The generating apparatus shown can be constructed by combining each unit individually or entirely into one or more other units, or one or more of the units can be further divided into multiple functionally smaller units. This can achieve the same operation without affecting the technical effect of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the generating apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by multiple units working together. According to another embodiment of this application, the generating apparatus can be executed by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). Figure 3 and Figure 13 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 16 The apparatus shown herein, and the method for generating digital collectibles to implement the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the same medium, and executed therein.
[0224] In this embodiment, when there is a need to generate digital collectibles, an element configuration file can be obtained. This configuration file records the element attribute information of elements in N layers, with each layer corresponding to a set of element attribute information. First, random selection is performed from each set of element attribute information in the configuration file, and based on the determined random element attribute information of each layer, a majority of unique collectible combinations are randomly generated. Second, exhaustive element attribute information for each layer is determined from each set of element attribute information in the configuration file, and the remaining unique collectible combinations are exhaustively generated based on this exhaustive element attribute information. Finally, digital collectibles are generated based on these combinations. This scheme supports generating a majority of unique collectible combinations through random element selection, followed by generating a small subset of unique collectible combinations through exhaustive element selection. By combining random and exhaustive methods, the generation of collectible combinations avoids the failure to generate duplicate combinations, thereby improving the success rate of digital collectible generation and achieving efficient digital collectible generation.
[0225] Figure 17 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application is shown. Please refer to... Figure 17 The electronic device includes a processor 1701, a communication interface 1702, and a computer-readable storage medium 1703. The processor 1701, communication interface 1702, and computer-readable storage medium 1703 can be connected via a bus or other means. The communication interface 1702 is used to receive and send data. The computer-readable storage medium 1703 can be stored in the memory of the electronic device and is used to store computer programs, including program instructions. The processor 1701 is used to execute the program instructions stored in the computer-readable storage medium 1703. The processor 1701 (or CPU (Central Processing Unit)) is the computing and control core of the electronic device, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve corresponding method flows or corresponding functions.
[0226] This application embodiment also provides a computer-readable storage medium (Memory), which is a memory device in an electronic device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the electronic device and extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by the processor 1701, which may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM memory or non-volatile memory, such as at least one disk storage device; optionally, it may also be at least one computer-readable storage medium located remotely from the aforementioned processor.
[0227] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor 1701 loads and executes one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above-described embodiment of the digital collection generation method; specifically, the one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and executed in the following steps:
[0228] Retrieve the element configuration file. The element configuration file records the element attribute information of elements in N layers. Each layer corresponds to a set of element attribute information. Each set of element attribute information includes element attribute information of multiple elements; N is an integer greater than 1.
[0229] From the set of element attribute information in the element configuration file, random selection is performed to determine the random element attribute information of each layer, and the first collection combination set is generated based on the random element attribute information of each layer.
[0230] From the set of element attribute information in the element configuration file, determine the exhaustive element attribute information of each layer, and generate the second collection set based on the exhaustive element attribute information of each layer.
[0231] Based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, the digital collection corresponding to each collection set is generated.
[0232] Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
[0233] In one implementation, the element configuration file includes N function tables, each function table corresponding to a layer; one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and, when retrieving the element configuration file, specifically perform the following steps:
[0234] Obtain a candidate element set, which includes element attribute information of one or more elements, as well as the layer to which each element belongs;
[0235] Add the element attribute information of elements belonging to the same layer to the corresponding function table of the layer in the element configuration file to generate the element configuration file;
[0236] Each function table in the element configuration file records a set of element attribute information for the corresponding layer.
[0237] In one implementation, each function table corresponds to an element pool, and the element attribute information includes the total number of times the element is allowed to be selected; one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and the following steps are also executed:
[0238] The information is read and processed for each function table in the element configuration file to obtain the element attribute information of each element recorded in each function table;
[0239] Based on the total number of times each element is selected, the element attribute information of the elements selected a total of a certain number of times is added to the element pool corresponding to the corresponding function table, thus obtaining the element pool corresponding to each function table.
[0240] In one implementation, the element configuration file also records a randomly selected threshold.
[0241] When one or more instructions in a computer-readable storage medium are loaded and executed by processor 1701, the following steps are specifically performed: First, random selection is performed from the set of element attribute information in the element configuration file to determine the random element attribute information of each layer, and a first collection set is generated based on the random element attribute information of each layer. Second, exhaustive element attribute information is determined from the set of element attribute information in the element configuration file to generate a second collection set, the following steps are specifically performed:
[0242] Random selection is performed from each element pool to determine the random element attribute information of each layer, and the first collection set is generated based on the random element attribute information of each layer.
[0243] When the number of collection combinations contained in the first collection set exceeds the random selection threshold, exhaustive element attribute information of each layer is determined from each element pool, and a second collection set is generated based on the exhaustive element attribute information of each layer.
[0244] In one implementation, when one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and executed to perform random selection processing from each element pool, determine the random element attribute information of each layer, and generate the first collection set based on the random element attribute information of each layer, the following steps are specifically performed:
[0245] According to the random selection rules, the element attribute information of an element is randomly selected from each element pool. The element attribute information of the randomly selected element is used as the random element attribute information. The element attribute information includes the element name.
[0246] Based on the layer level of the layer to which each randomly selected element belongs, the element names of the randomly selected elements are sorted and combined to generate the first candidate collection combination.
[0247] Match the first candidate collection with the existing collection collections in the first collection collection set;
[0248] If there is no match, the first candidate collection combination is added to the first collection combination set, and each element pool is updated based on the first candidate collection combination.
[0249] Repeat the above steps until the number of collection combinations included in the first collection set is greater than the random selection threshold, thus obtaining the first collection set.
[0250] In one implementation, one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and, when executing the update of each element pool based on the first candidate collection combination, specifically perform the following steps:
[0251] In each element pool, delete the element attribute information of each element contained in the first candidate collection combination.
[0252] In one implementation, the element attribute information includes the total number of times an element is allowed to be selected; when one or more instructions in a computer-readable storage medium are loaded by processor 1701 and executed to determine the exhaustive element attribute information of each layer from the set of element attribute information in the element configuration file, the following steps are specifically performed:
[0253] Based on the element names contained in each collection set in the first collection set, determine the number of times each element in the element attribute information set has been selected.
[0254] When there are elements in a layer whose selected count is less than the corresponding total selected count, the element attribute information of the elements whose selected count is less than the corresponding total selected count is determined as the exhaustive element attribute information of the layer.
[0255] In one implementation, the element attribute information includes the element name. One or more instructions in the computer-readable storage medium are loaded by the processor 1701 and, when generating a second collection set based on the exhaustive element attribute information of each layer, the following steps are specifically executed:
[0256] According to the exhaustive selection rules, the element names contained in the exhaustive element attribute information of each layer are arranged and combined to generate one or more second candidate collection combinations.
[0257] Match one or more second candidate collections with the collections included in the first collection set;
[0258] If there is a second candidate collection that does not match the collection collection in the first collection collection set, then the mismatched second candidate collection is added to the second collection collection set to obtain the second collection collection set.
[0259] In one implementation, the element attribute information includes the element image; the first collection set and the second collection set belong to a collection file, and any collection set in the collection file is represented as the target collection set;
[0260] When one or more instructions in a computer-readable storage medium are loaded by processor 1701 and executed to generate a digital collection corresponding to each collection based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, the following steps are specifically performed:
[0261] Read the element name of one or more reference elements contained in the target collection portfolio;
[0262] Based on the element names of one or more reference elements, obtain the element images of each reference element in the one or more reference elements;
[0263] Based on the layer level of each reference element, the element images of each reference element are superimposed sequentially to generate the target digital collection corresponding to the target collection combination.
[0264] In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 1701 and the following steps are also performed:
[0265] Using a process pool approach, and based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, digital collections corresponding to each collection set are generated.
[0266] In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 1701 and the following steps are also performed:
[0267] Perform a hash operation on the digital collectibles corresponding to each collection combination in the collection file to obtain the hash value of each digital collectible;
[0268] Replace the corresponding collection combination in the collection file with the hash value of each digital collection;
[0269] If all collection combinations in the collection file are replaced with the hash values of the corresponding digital collections, then the collection file is added to the blockchain.
[0270] In one implementation, the collection file also includes element attribute information for each element contained in each collection combination, including element probabilities, which indicate the scarcity of the elements; one or more instructions in the computer-readable storage medium are loaded by the processor 1701 and the following steps are also executed:
[0271] If the collection file is successfully uploaded to the blockchain and there is a digital collectible transaction request, a prompt message will be output on the transaction request end.
[0272] The notification information includes the element probabilities of each element contained in the digital collectible to be traded.
[0273] Based on the same inventive concept, the principle and beneficial effects of the electronic device provided in the embodiments of this application in solving the problem are similar to the principle and beneficial effects of the digital collection generation method in the method embodiments of this application in solving the problem. Please refer to the principle and beneficial effects of the implementation of the method. For the sake of brevity, they will not be repeated here.
[0274] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned method for generating digital collectibles.
[0275] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0276] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0277] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this invention should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating digital collectibles, characterized in that, include: Obtain an element configuration file, which records element attribute information of elements in N layers. Each layer corresponds to an element attribute information set, and each element attribute information set includes element attribute information of multiple elements; N is an integer greater than 1; the element configuration file includes N function tables, each function table corresponding to one layer; each function table records the element attribute information set corresponding to the layer; each function table corresponds to an element pool, and the element pool includes element attribute information of elements with a total number of selections under each element of the corresponding function table; Random selection is performed from each element pool to determine the random element attribute information of each layer, and a first collection set is generated based on the random element attribute information of each layer. When the number of collection combinations contained in the first collection combination set is greater than the random selection threshold recorded in the element configuration file, the exhaustive element attribute information of each layer is determined from each element pool, and a second collection combination set is generated based on the exhaustive element attribute information of each layer. Based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, a digital collection corresponding to each collection set is generated. Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
2. The method as described in claim 1, characterized in that, The process of obtaining the element configuration file includes: Obtain a candidate element set, which includes element attribute information of one or more elements, and the layer to which each element belongs; Add the element attribute information of elements belonging to the same layer to the corresponding function table of the element configuration file to generate the element configuration file.
3. The method as described in claim 2, characterized in that, Element attribute information includes the total number of times an element is allowed to be selected; after obtaining the element configuration file, it also includes: The information is read and processed for each function table in the element configuration file to obtain the element attribute information of each element recorded in each function table; Based on the total number of times each element is selected, the element attribute information of the elements selected a total of a certain number of times is added to the element pool corresponding to the corresponding function table, thus obtaining the element pool corresponding to each function table.
4. The method as described in claim 1, characterized in that, The process of randomly selecting elements from each element pool, determining the random element attribute information of each layer, and generating a first collection set based on the random element attribute information of each layer includes: According to the random selection rules, the element attribute information of an element is randomly selected from each element pool. The element attribute information of the randomly selected element is used as the random element attribute information. The element attribute information includes the element name. Based on the layer level of the layer to which each randomly selected element belongs, the element names of the randomly selected elements are sorted and combined to generate the first candidate collection combination. Match the first candidate collection combination with the existing collection combinations in the first collection combination set; If there is no match, the first candidate collection combination is added to the first collection combination set, and the element pools are updated based on the first candidate collection combination. Repeat the above steps until the number of collection combinations included in the first collection set is greater than the random selection threshold, thus obtaining the first collection set.
5. The method as described in claim 4, characterized in that, The step of updating each element pool based on the first candidate collection combination includes: In each element pool, the element attribute information of each element contained in the first candidate collection combination is deleted.
6. The method as described in claim 1, characterized in that, Element attribute information includes the total number of times an element is allowed to be selected; the process of determining the exhaustive element attribute information for each layer from each element pool includes: Based on the element names contained in each collection combination in the first collection combination set, determine the number of times each element in the element attribute information set has been selected. When there are elements in a layer whose selected count is less than the corresponding total selected count, the element attribute information of the elements whose selected count is less than the corresponding total selected count is determined as the exhaustive element attribute information of the layer.
7. The method as described in claim 1, characterized in that, The element attribute information includes the element name. Generating the second collection set based on the exhaustive element attribute information of each layer includes: According to the exhaustive selection rules, the element names contained in the exhaustive element attribute information of each layer are arranged and combined to generate one or more second candidate collection combinations. The one or more second candidate collection combinations are matched with the collection combinations included in the first collection combination set; If there is a second candidate collection set that does not match the collection set in the first collection set, then the mismatched second candidate collection set is added to the second collection set to obtain the second collection set.
8. The method as described in claim 1, characterized in that, The element attribute information includes the element image; the first collection set and the second collection set belong to a collection file, and any collection set in the collection file is represented as the target collection set; The step of generating a digital collection corresponding to each collection combination based on the element attribute information of the elements contained in each collection combination in the first collection combination set and the second collection combination set includes: Read the element name of one or more reference elements contained in the target collection; Based on the element names of the one or more reference elements, obtain the element image of each reference element among the one or more reference elements; Based on the layer level of the layer to which each reference element belongs, the element images of each reference element are sequentially superimposed to generate the target digital collectible corresponding to the target collectible combination.
9. The method as described in claim 8, characterized in that, The method further includes: Using a process pool approach, and based on the element attribute information of the elements contained in each collection set in the first collection set and the second collection set, digital collections corresponding to each collection set are generated.
10. The method as described in claim 8 or 9, characterized in that, The method further includes: Perform a hash operation on the digital collectibles corresponding to each collection combination in the collection file to obtain the hash value of each digital collectible; The hash value of each digital collectible is used to replace the corresponding collection combination in the collection file; If all collection combinations in the collection file are replaced with the hash values of the corresponding digital collections, then the collection file is uploaded to the blockchain.
11. The method as described in claim 10, characterized in that, The collection file also includes element attribute information for each element contained in each collection combination, including element probability, which indicates the scarcity level of the element; the method further includes: If the collection file is successfully uploaded to the blockchain and there is a digital collectible transaction request, a prompt message will be output on the transaction request end. The notification information includes the element probabilities of each element contained in the digital collectible to be traded.
12. A device for generating digital collectibles, characterized in that, include: An acquisition unit is used to acquire an element configuration file, which records element attribute information of elements in N layers. Each layer corresponds to an element attribute information set, and each element attribute information set includes element attribute information of multiple elements; N is an integer greater than 1; the element configuration file includes N function tables, each function table corresponding to one layer; each function table records the element attribute information set corresponding to the layer; each function table corresponds to an element pool, and the element pool includes element attribute information of elements selected a total of n times under each element of the corresponding function table; The processing unit is used to randomly select elements from each element pool, determine the random element attribute information of each layer, and generate a first collection set based on the random element attribute information of each layer. The processing unit is further configured to determine the exhaustive element attribute information of each layer from each element pool when the number of collection combinations contained in the first collection combination set is greater than the random selection threshold recorded in the element configuration file, and generate a second collection combination set based on the exhaustive element attribute information of each layer. The processing unit is further configured to generate a digital collection corresponding to each collection combination based on the element attribute information of the elements contained in each collection combination in the first collection combination set and the second collection combination set. Each collection set in the first collection set and the second collection set includes: the element name contained in the element attribute information of an element in each layer, and there are one or more different element names between any two collection sets.
13. An electronic device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the method for generating digital collectibles as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-11 to generate digital collections.
15. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method for generating digital collectibles as described in any one of claims 1-11.
Citation Information
Patent Citations
Method and device for determining candidate elements based on block chain proposal random consensus
CN109981281A
Virtual character head portrait generation method and device, electronic equipment and readable medium
CN113952738A