Web3 interface calling method and related device based on metaverse
By performing data analysis of interface call requests and three-dimensional virtual entity mapping in the metaverse, transaction requests and virtual wallets are built, and Web3 interface identification is analyzed, the problems of insufficient scalability of blockchain technology and lack of standardization of Web3 technology are solved, and efficient and accurate interface call and transaction control are achieved.
Patent Information
- Application Number
- CN202310898264.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-07-21
AI Technical Summary
The decentralized and distributed characteristics of blockchain technology lead to insufficient scalability, slow processing speed, low throughput and high transaction fees; the lack of standardization of Web3 technology leads to incompatibility in development.
By receiving interface call requests in the metaverse, performing data analysis and three-dimensional virtual entity mapping, building transaction requests and virtual wallets, performing data encoding processing, and analyzing Web3 interface identifiers, interface matching and calling from the preset Web3 interface information database.
It improves the efficiency and accuracy of interface calls, realizes data flow control and process management, enhances control of transactions, and facilitates interaction with smart contracts or other applications.
Smart Images

Figure CN116860485B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of metaverse technology, and in particular to a metaverse-based Web3 interface calling method and related devices. Background Art
[0002] It has been more than a decade since the birth of Bitcoin, and blockchain technology has developed many variants and applications. In recent years, blockchain technology has developed rapidly, involving more and more fields, such as finance, e-commerce, supply chain, etc. : Metaverse refers to the virtual space that combines the virtual reality world and the real world. With the continuous advancement and development of technologies such as VR, AR, and MR, the metaverse has become an important development direction of future science and technology and has received investment from all over the world. Web3 technology was born for the blockchain world, which can organically combine blockchain technology and the Web environment, allowing people to perform on-chain operations and data transmission in a more intuitive way.
[0003] At present, there are still some shortcomings in the development of these technologies. Due to the nature of blockchain technology itself, namely its decentralized and distributed characteristics, its scalability is insufficient, namely slow processing speed, low throughput, high transaction fees and other problems. Web3 technology also has the problem of insufficient standardization, because there is no universally recognized standard to guide developers in development, resulting in independent development and incompatibility problems. Summary of the invention
[0004] The present invention provides a metaverse-based Web3 interface calling method and related devices, which are used to improve the efficiency and accuracy of interface calling.
[0005] A first aspect of the present invention provides a Web3 interface calling method based on the metaverse, the Web3 interface calling method based on the metaverse comprising: receiving an interface calling request, and performing data parsing on the interface calling request to generate corresponding target parsing data;
[0006] Performing three-dimensional virtual entity mapping on the preset metaverse through the target parsing data to obtain a target three-dimensional virtual entity;
[0007] Constructing a transaction request for the target three-dimensional virtual entity to generate a corresponding target account transaction request;
[0008] Constructing a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet;
[0009] Performing data encoding processing on the target virtual wallet to obtain target wallet encoding data;
[0010] Performing Web3 interface identification analysis on the target wallet encoding data to generate a target Web3 interface identification;
[0011] Interface matching is performed from a preset Web3 interface information database through the target Web3 interface identifier, the corresponding target Web3 interface is determined and the target Web3 interface is called.
[0012] In combination with the first aspect, in a first implementation of the first aspect of the present invention, the receiving an interface call request, performing data parsing on the interface call request, and generating corresponding target parsed data includes:
[0013] Receive the interface call request, and perform endpoint analysis on the interface call request to obtain a corresponding API endpoint;
[0014] Extract request parameters through the API endpoint to obtain target request parameters;
[0015] The interface call request is parsed using the target request parameters to generate corresponding target parsed data.
[0016] In combination with the first aspect, in a second implementation of the first aspect of the present invention, the three-dimensional virtual entity mapping of the preset metaverse by using the target parsed data to obtain the target three-dimensional virtual entity includes:
[0017] Matching the preset metaverse with the scene type through the target parsing data to determine the target scene type;
[0018] Extracting element types through the target scene type to generate a target element type set;
[0019] A three-dimensional virtual entity mapping is performed through the target element type set to obtain a target three-dimensional virtual entity.
[0020] In combination with the first aspect, in a third implementation of the first aspect of the present invention, constructing a transaction request for the target three-dimensional virtual entity to generate a corresponding target account transaction request includes:
[0021] Performing storage data matching on the target three-dimensional virtual entity to generate storage data corresponding to the target three-dimensional virtual entity;
[0022] Performing data account matching on the stored data to generate a corresponding target data account;
[0023] A transaction request is generated for the target data account to obtain a corresponding target account transaction request.
[0024] In combination with the first aspect, in a fourth implementation of the first aspect of the present invention, the step of constructing a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet includes:
[0025] Performing transaction data verification on the target account transaction request to obtain a transaction verification result;
[0026] When the transaction verification result is verified, an Ethereum wallet address is established through the target data account;
[0027] A virtual wallet is constructed for the target three-dimensional virtual entity through the Ethereum wallet address to generate a target virtual wallet.
[0028] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, the step of performing data encoding processing on the target virtual wallet to obtain target wallet encoding data includes:
[0029] Perform wallet identification analysis on the target virtual wallet to generate corresponding wallet identification information;
[0030] The wallet identification information is encoded to generate target wallet encoding data.
[0031] In combination with the first aspect, in a sixth implementation of the first aspect of the present invention, the step of performing Web3 interface identification analysis on the target wallet encoded data to generate a target Web3 interface identification includes:
[0032] Performing encoding format analysis on the target wallet encoding data to generate a target encoding format;
[0033] Performing data conversion on the target wallet encoding data based on the target encoding format to generate encoding data in the target format;
[0034] The Web3 interface identifier is analyzed through the encoded data in the target format to generate a target Web3 interface identifier.
[0035] A second aspect of the present invention provides a Web3 interface calling system based on the metaverse, and the Web3 interface calling system based on the metaverse includes:
[0036] A receiving module, used for receiving an interface call request, performing data analysis on the interface call request, and generating corresponding target analysis data;
[0037] A mapping module, used to perform three-dimensional virtual entity mapping on a preset metaverse through the target parsed data to obtain a target three-dimensional virtual entity;
[0038] A generating module, used to construct a transaction request for the target three-dimensional virtual entity and generate a corresponding target account transaction request;
[0039] A construction module, used to construct a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet;
[0040] A processing module, used for performing data encoding processing on the target virtual wallet to obtain target wallet encoding data;
[0041] An analysis module, used to perform Web3 interface identification analysis through the target wallet encoding data to generate a target Web3 interface identification;
[0042] The matching module is used to perform interface matching from a preset Web3 interface information database according to the target Web3 interface identifier, determine the corresponding target Web3 interface and call the target Web3 interface.
[0043] The third aspect of the present invention provides a Web3 interface calling device based on the metaverse, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the Web3 interface calling device based on the metaverse executes the above-mentioned Web3 interface calling method based on the metaverse.
[0044] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to execute the above-mentioned metaverse-based Web3 interface calling method.
[0045] In the technical solution provided by the present invention, an interface call request is received, and data is parsed for the interface call request to generate corresponding target parsing data; a preset metaverse is mapped to a three-dimensional virtual entity through the target parsing data to obtain a target three-dimensional virtual entity; a transaction request is constructed for the target three-dimensional virtual entity to generate a corresponding target account transaction request; a virtual wallet is constructed for the target account transaction request to obtain a corresponding target virtual wallet; data encoding is processed for the target virtual wallet to obtain target wallet encoding data; Web3 interface identification is analyzed through the target wallet encoding data to generate a target Web3 interface identification; interface matching is performed from a preset Web3 interface information database through the target Web3 interface identification, the corresponding target Web3 interface is determined and the target Web3 interface is called. In this solution, data flow control and process management can be better realized. By establishing a target virtual wallet, simulated transactions can be carried out, control over various transactions is improved, and calls to the Web3 interface are realized, so that interaction with smart contracts or other applications can be more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of an embodiment of a Web3 interface calling method based on the metaverse in an embodiment of the present invention;
[0047] Figure 2 It is a flow chart of performing three-dimensional virtual entity mapping on a preset metaverse through target parsing data in an embodiment of the present invention;
[0048] Figure 3 A flow chart of constructing a transaction request for a target three-dimensional virtual entity in an embodiment of the present invention;
[0049] Figure 4 A flowchart of constructing a virtual wallet for a target account transaction request in an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of an embodiment of a Web3 interface calling system based on the metaverse in an embodiment of the present invention;
[0051] Figure 6 This is a schematic diagram of an embodiment of a Web3 interface calling device based on the metaverse in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The embodiment of the present invention provides a Web3 interface calling method and related devices based on the metaverse, which are used to improve the circulation planning efficiency and distribution efficiency of rural logistics. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0053] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of a Web3 interface calling method based on the metaverse in an embodiment of the present invention includes:
[0054] S101, receiving an interface call request, and performing data analysis on the interface call request to generate corresponding target analysis data;
[0055] It is understandable that the execution subject of the present invention can be a Web3 interface calling system based on the metaverse, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0056] Specifically, receiving an interface call request and parsing the data of the interface call request to generate the corresponding target parsing data usually requires interface registration first. Interface registration is a method used to determine the input and output of an API and its parameters so that it can obtain relevant data by calling the API. The process of registering an API includes determining the API name, input and output, API parameters, and API access password. When the API is registered, each time a request is made, the server parses its data and generates a target parsing data for it. The following steps are usually required: Listening to API requests: Before starting parsing, the server configures the API server to listen for requests. When the API server receives a request, the API server transmits and parses the request so that the API manager can start working. Parsing request parameters: The API manager then checks the requests you submitted and starts parsing the parameters in them. Request parameters are passed by name, which means that each parameter has a unique name and can be parsed based on the name. Check and verify parameters: After parsing each parameter, the API manager will check whether the passed parameters meet the requirements and whether they have suitable values. If the parameters do not meet the requirements, the API will not be able to process this error request. Generate target parsed data: When the API manager has parsed and validated all the parameters, it can generate target parsed data and pass it to the handler for further processing. These target parsed data can contain detailed information about the API request, such as the type of request, the parameters of the request, and the operation that needs to be performed. For example, suppose you are developing an API whose purpose is to provide users with some information about a digital currency, such as its price, market value, and so on. Users can use the API by sending requests to the API server and passing the required parameters.
[0057] S102, mapping the preset metaverse into a three-dimensional virtual entity through target parsing data to obtain a target three-dimensional virtual entity;
[0058] Specifically, create a pre-built metaverse and virtual entities: First, the metaverse virtual world and virtual entities need to be pre-created on the metaverse development platform. These virtual entities can be any type of entity, such as a building, a vehicle, or a person, all of which need to be modeled and designed. Parse the target parsing data: Next, the server parses the target parsing data to determine the attributes of the virtual entity we need to match. For example, in a car sales application, the server looks for cars with a specific manufacturer, color, and model. Therefore, we must parse these parameters and use them as search conditions. Perform virtual entity search: When the target parsing data is parsed and the required search conditions are obtained, the server performs a virtual entity search in the pre-built metaverse. This can be done by using the API and tools of the metaverse development platform. The server uses various search algorithms to find virtual entities that meet the conditions and find entities that match the target parsing data. Get the target virtual entity: After performing the virtual entity search, the server uses APIs and tools to obtain virtual entities that match the target parsing data. These virtual entities can be any type of entity, such as a building, a vehicle, or a person. For example, in a Metaverse-based car sales application, users can search for specific car models, colors, and price ranges, and then get matching virtual car entities. At this point, the server uses APIs and development tools to map these virtual car entities to the Metaverse virtual world, allowing users to view and interact with these virtual car entities. In this way, users can choose their favorite car models based on their needs and preferences.
[0059] S103, constructing a transaction request for the target three-dimensional virtual entity, and generating a corresponding target account transaction request;
[0060] Specifically, confirm the transaction type and method: First, the server determines the required transaction type and method. For example, in an e-commerce application, users may need to purchase three-dimensional virtual entities or rent them, so the server makes a decision on the type and method of the transaction. Confirm transaction details: After determining the transaction type and method, the server further determines the transaction details, such as the transaction quantity, price, remaining inventory, and payment method for the transaction. These transaction details can help us accurately describe the transaction when constructing the transaction request. Construct transaction request: Next, the server uses the corresponding API and development tools to construct the transaction request. Through the API, the server passes the transaction details, such as the transaction quantity, price, and payment method, and creates a target account transaction request for the transaction. Verify the transaction request: While constructing the transaction request, the server verifies the transaction request. This includes checking for any unexpected errors found in the transaction and fixing them. For example, there may be a shortage of inventory or insufficient currency in a transaction, which the server fixes during the automatic verification process. Confirm and execute the transaction request: When the transaction request has been confirmed and there are no errors, the server uses the API and development tools to execute the transaction request. This usually involves transferring money or assets from one account to another. When a transaction is executed, the server obtains the transaction results and other information through the API. Assume that in an e-commerce application based on the Metaverse, a user can purchase a three-dimensional virtual entity. The user needs to specify the quantity, price, and payment method of the purchased virtual entity. In this embodiment, the server uses the preset transaction API to construct a transaction request, and the server passes the details such as the quantity, price, and payment method of the purchased virtual entity. Then, the system verifies the transaction request and executes the transaction request after successful verification to complete the transaction.
[0061] S104, constructing a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet;
[0062] Specifically, confirm the wallet type and encryption method: First, the server determines the wallet type and encryption method to be used. Virtual wallets can use a variety of different encryption methods to ensure the security and privacy of transactions. For example, in an e-commerce application based on the Metaverse, the server uses an encryption method similar to blockchain technology to ensure transaction security. Create a virtual wallet through the API: Next, the server uses the API and development tools provided by the development platform to create a virtual wallet. This includes specifying the type of virtual wallet to be created, the account name and password, and other necessary details in the API. Creating a virtual wallet through the API makes it easier for us to manage accounts and add new transactions. Bind the wallet and transaction request: When the virtual wallet is successfully created, the server uses the API and development tools to bind the virtual wallet to the transaction request. The server tracks and manages transactions while ensuring that the account information and security of the transaction are properly protected. Encrypt and protect the wallet: After the virtual wallet is created and bound, the server encrypts and protects the wallet. This includes encrypting and storing the private information of the virtual wallet, such as the account password, private key, etc. At the same time, the server protects the entire transaction process to ensure that the security and privacy of the transaction are not lost. For example, in an e-commerce application based on the Metaverse, a user needs to use a virtual wallet to purchase a three-dimensional virtual entity. In this embodiment, the server uses a preset API and development tools to create a virtual wallet. Then, the server uses the API and tools to bind the virtual wallet to the transaction request to ensure the correctness of the account and transaction information. Finally, the server encrypts and protects the virtual wallet and the entire transaction process. In this way, users can conduct transactions in a secure environment and manage their virtual wallets.
[0063] S105, performing data encoding processing on the target virtual wallet to obtain target wallet encoding data;
[0064] Specifically, determine the encoding and encryption method: First, the server determines the encoding and encryption method to be used. The virtual wallet server uses various types of encoding and encryption algorithms to ensure data security and privacy. For example, in an e-commerce application based on the metaverse, the server uses Base64 encoding and AES encryption algorithms to encrypt virtual wallet data. Encode and encrypt the data: Next, the server uses encoding and encryption tools to encode and encrypt the virtual wallet. For example, the Base64 encoding algorithm can be used to encode the data into a series of readable ASCII characters, while the AES encryption algorithm can be used to encrypt the data and convert it into hexadecimal data using a cryptographic key. Store the encoded data: When the virtual wallet data is encoded and encrypted, the server stores it in the system. The server selects a relatively safe and reliable storage method, such as encrypted file storage, database storage, and the like. For example, in an e-commerce application based on the metaverse, a user needs to use a virtual wallet to purchase a three-dimensional virtual entity. In this embodiment, the server uses a preset encryption and encoding tool to encode and encrypt the data of the virtual wallet. For example, the server uses the Base64 encoding algorithm to encode the virtual wallet data into a series of readable ASCII characters, then encrypts the data using the AES encryption algorithm and converts it into hexadecimal data using a cryptographic key. Finally, the server selects a relatively safe and reliable storage method, such as storing the virtual wallet data in an encrypted file or database.
[0065] S106. Perform Web3 interface identification analysis on the target wallet encoding data to generate a target Web3 interface identification;
[0066] Specifically, confirm the Web3 interface identifier: First, the server determines what type of Web3 interface identifier the server uses. Web3 is a programming framework developed for blockchain, which provides many different types of interface identifiers, including Ethereum interface, IPFS (InterPlanetary File System) interface, etc. Use the programming interface to process the encoded data: Next, the server uses the corresponding Web3 programming interface to analyze and process the target wallet encoded data. This includes decoding the encoded data using algorithms such as Base64 or AES and converting it into a data structure data in a readable format. For example, in an Ethereum-based application, the server uses the interface of the Solidity programming language to implement this step. Use the interface identification tool to identify the data: When the wallet encoded data is decoded and converted into a data structure in a readable format, we use the corresponding interface identification tool on the server to identify it. This includes identifying the contract address, function name, function parameters, etc., and using ABI (Application Binary Interface) to define the interface structure and function call method. For example, in an Ethereum-based smart contract, the server uses the interface and ABI tool of the Solidity programming language to define and identify the encoded data. Generate Web3 interface identifier: Finally, the server uses the identification tool to generate Web3 interface identifiers. These interface identifiers can help us accurately locate and identify the corresponding functions and interfaces when calling smart contracts or performing other Web3 operations.
[0067] S107. Perform interface matching from a preset Web3 interface information database according to the target Web3 interface identifier, determine the corresponding target Web3 interface, and call the target Web3 interface.
[0068] Specifically, the server presets the Web3 interface information database: First, the server builds a preset Web3 interface information database. This database should contain all Web3 interface providers that the server matches the interface and the API interface information they support. These API interface information include interface name, interface type (such as HTTP, WebSocket, etc.), interface URL, etc. Target Web3 interface identifier: Next, the server parses the target Web3 interface identifier from the user request parameters. This identifier can be the name, interface type or interface URL of the Web3 interface provider, etc. Interface matching: Next, the server searches for a Web3 interface provider that matches the target Web3 interface identifier in the preset Web3 interface information database. In this embodiment, the server uses some simple string matching algorithms, such as fuzzy matching algorithms to implement it. Determine the corresponding target Web3 interface and call the target Web3 interface: Finally, when a Web3 interface provider that matches the target Web3 interface identifier is found, the server calls it through the API interface provided by the provider. In this embodiment, the server implements this calling process as an HTTP or WebSocket request, and then obtains the desired result by parsing the interface return information. The following example illustrates this process. Suppose we have a Web3 interface information database called Web3info, which contains two Web3 interface providers, Alchemy and Infura. Alchemy provides an API interface based on the HTTP protocol, while Infura provides an API interface based on the WebSocket protocol. Now the server calls an API interface provided by Infura, and the interface address is "wss: / / mainnet.infura.io / ws / v3 / XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX". Then the server follows the steps below: Parse the target Web3 interface identifier from the user request parameters: "infura" and "wss: / / mainnet.infura.io / ws / v3 / XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".
[0069] The server searches the Web3info database for a Web3 interface provider that matches the target Web3 interface identifier. The server uses a string matching algorithm to find the Infura provider. Once the Infura provider is found, we can call the target interface through the API interface it provides. In this example, the server uses the "wss: / / mainnet.infura.io / ws / v3 / XXXXXXXXXXXXXXXXXXXXXXXXXXX" address provided by Infura to call the target interface, and obtains the desired result by parsing the information returned by the interface.
[0070] In the embodiment of the present invention, an interface call request is received, and data is parsed for the interface call request to generate corresponding target parsing data; a preset metaverse is mapped to a three-dimensional virtual entity through the target parsing data to obtain a target three-dimensional virtual entity; a transaction request is constructed for the target three-dimensional virtual entity to generate a corresponding target account transaction request; a virtual wallet is constructed for the target account transaction request to obtain a corresponding target virtual wallet; data encoding is processed for the target virtual wallet to obtain target wallet encoding data; Web3 interface identification is analyzed through the target wallet encoding data to generate a target Web3 interface identification; interface matching is performed from a preset Web3 interface information database through the target Web3 interface identification, the corresponding target Web3 interface is determined and the target Web3 interface is called. In this solution, data flow control and process management can be better realized. Establishing a target virtual wallet can simulate transactions, improve control over various transactions, realize the call of the Web3 interface, and more conveniently interact with smart contracts or other applications.
[0071] In a specific embodiment, the process of executing step S101 may specifically include the following steps:
[0072] (1) Receive the interface call request, perform endpoint analysis on the interface call request, and obtain the corresponding API endpoint;
[0073] (2) Extract request parameters through the API endpoint to obtain the target request parameters;
[0074] (3) Parse the interface call request data through the target request parameters to generate corresponding target parsed data.
[0075] Specifically, the server receives an interface call request: First, the server establishes a web server and receives an interface call request from the client through the server. In actual development, the server uses frameworks such as Flask and Django to build a web server. Endpoint analysis: After receiving an interface call request, the server performs endpoint analysis on the requested URL. This step mainly extracts the path and query parameters in the URL to obtain the API endpoint. In this embodiment, the server uses regular expressions to match the path and uses a parser to extract query parameter information. For example, if the URL of an interface call request is http: / / example.com / api / getUser?userId=123, then after endpoint analysis, the server obtains the API endpoint as " / api / getUser" and the query parameter as {"userId":"123"}. Request parameter extraction: Next, the server extracts request parameters from the interface call request. Based on the API endpoint and the request method of the interface call request (such as GET, POST, etc.), the server infers which request parameters are expected to be extracted from the request. In this embodiment, the server uses a parser to extract request parameter information. Data parsing: Finally, the server performs data parsing on the interface call request according to the extracted request parameters and generates corresponding target parsing data. The specific method of data parsing depends on the data structure of the interface call request and the data format supported by the API endpoint. In this embodiment, the server uses various parsers to parse the interface call request. For example, suppose we have an API endpoint called getUser, which is used to query user information. When receiving an interface call request of the following example: http: / / example.com / api / getUser?userId=123&username=john
[0076] After getting the API endpoint / api / getUser and the query parameters {"userId":"123","username":"john"}, the server parses the request and generates the target parsed data, such as a JSON formatted object:
[0077] "name":"John Doe",
[0078] "email":"john@example.com"
[0079] }
[0080] In a specific embodiment, if Figure 2 As shown, the process of executing step S102 may specifically include the following steps:
[0081] S201, matching the preset metaverse with the scene type through the target parsing data to determine the target scene type;
[0082] S202, extracting element types according to the target scene type to generate a target element type set;
[0083] S203 . Perform three-dimensional virtual entity mapping through the target element type set to obtain a target three-dimensional virtual entity.
[0084] Specifically, server scene type matching: First, the server finds the scene type that matches the target parsed data from the preset metaverse. This step is very important because different scene types may correspond to different virtual worlds and virtual entities. In this embodiment, the server uses some scene matching algorithms, such as matching algorithms based on natural language processing, to achieve scene type matching. Element type extraction: Next, the server extracts a set of target element types from the preset metaverse based on the target parsed data and scene type. This step requires extracting corresponding element types from different virtual worlds based on the scene type. In this embodiment, the server uses some filtering algorithms based on scenes and element attributes to extract the target element type set. Three-dimensional virtual entity mapping: Finally, the server maps the target element type set to a three-dimensional virtual entity. This step needs to take into account the diversity of element types and the accuracy of virtual entities. In this embodiment, the server uses some model conversion and rendering algorithms to achieve three-dimensional virtual entity mapping. For example, if we have a target parsed data that represents a person who owns a house, the server implements the following steps: Scene type matching: The server uses a natural language processing algorithm to extract key information from the parsed data, such as "a person who owns a house", and then uses a matching algorithm to find a scene type that matches it in the preset metaverse. Element type extraction: Assuming that the scene type we found contains a virtual social network, the server extracts the corresponding character element type and house element type from this virtual social network. 3D virtual entity mapping: Using the model conversion and rendering algorithm, the server maps the character element type and house element type to the 3D virtual entity of the metaverse to generate the target 3D virtual entity.
[0085] In a specific embodiment, if Figure 3 As shown, the process of executing step S103 may specifically include the following steps:
[0086] S301, performing storage data matching on a target three-dimensional virtual entity to generate storage data corresponding to the target three-dimensional virtual entity;
[0087] S302, performing data account matching on the stored data to generate a corresponding target data account;
[0088] S303: Generate a transaction request for the target data account to obtain a corresponding target account transaction request.
[0089] Specifically, server storage data matching: First, the server matches the storage data corresponding to the target three-dimensional virtual entity with the existing data storage. In this embodiment, the server uses some matching algorithms, such as matching algorithms based on distributed hash tables, to achieve storage data matching. Data account matching: When the data storage corresponding to the target storage data is matched, the server matches the data account corresponding to the target storage data through the account address in the data storage. In this embodiment, the server uses some query interfaces, such as the query interface on Etherscan, to achieve data account matching. Transaction request generation: Finally, the server generates a transaction request for the target data account.
[0090] In a specific embodiment, if Figure 4 As shown, the process of executing step S104 may specifically include the following steps:
[0091] S401, verifying the transaction data of the target account transaction request and obtaining a transaction verification result;
[0092] S402. When the transaction verification result is verified, an Ethereum wallet address is established through the target data account;
[0093] S403: construct a virtual wallet for the target three-dimensional virtual entity through the Ethereum wallet address to generate a target virtual wallet.
[0094] Specifically, server transaction data verification: First, the server verifies the transaction data of the target account transaction request. This step requires verification of the transaction data and transaction fees to ensure that the transaction is legal and executable. In this embodiment, the server uses some verification algorithms, such as verification algorithms based on smart contracts, to implement transaction data verification. Wallet address establishment: If the target transaction request is verified, the server establishes an Ethereum wallet address and binds it to the target data account. In this embodiment, the server uses the Ethereum wallet API to generate a new wallet address and binds the address to the target data account. Virtual wallet construction: Finally, the server uses the target virtual wallet construction algorithm to map the target three-dimensional virtual entity to the wallet address and generate the target virtual wallet. In this embodiment, the server uses some model conversion and rendering algorithms to implement virtual wallet construction. For example, assuming that we have completed transaction data verification for the target account transaction request, we now need to implement the following steps: Wallet address establishment: Use the Ethereum wallet API to generate a new wallet address for the target data account and bind the wallet address to the target data account. Virtual wallet construction: Use the model conversion and rendering algorithm to map the target three-dimensional virtual entity to the wallet address and generate the target virtual wallet.
[0095] In a specific embodiment, the process of executing step S105 may specifically include the following steps:
[0096] (1) Analyze the wallet identification of the target virtual wallet and generate corresponding wallet identification information;
[0097] (2) Encode the wallet identification information to generate target wallet encoding data.
[0098] It should be noted that wallet identification refers to a way to uniquely identify and classify virtual wallets. It can include a lot of information, such as the virtual world to which the wallet belongs, the owner of the wallet, the purpose of the wallet, etc. Encoding processing refers to the process of encoding and encrypting the wallet identification information for storage and use. In actual applications, the server performs wallet identification analysis on the target virtual wallet, and encodes the wallet identification information to finally generate the target wallet encoding data. The wallet identification analysis is performed on the target virtual wallet, and the wallet identification information is encoded to finally generate the target wallet encoding data. The steps are as follows: Wallet identification analysis: First, the server performs wallet identification analysis on the target virtual wallet to obtain some key information related to it, such as the virtual world to which the wallet belongs, the wallet type, the wallet owner, etc. In this embodiment, the server uses some wallet classification and marking algorithms, such as a marking algorithm based on machine learning, to implement wallet identification analysis. Encoding processing: When the wallet identification information analysis is completed, the server encodes the information for storage and use. In this embodiment, the server uses some encryption and encoding algorithms, such as the SHA-256 hash algorithm, the Base64 encoding algorithm, etc., to encode and encrypt the wallet identification information to generate the target wallet encoding data. For example, suppose we have a virtual world called VirtualWorld, which contains an entity called House, which corresponds to a virtual wallet. Now, the server implements the following steps: Wallet identification analysis: Use a machine learning-based tagging algorithm to identify and classify the virtual wallet, and obtain information such as the virtual world to which the wallet belongs, the wallet type, and the wallet owner. Encoding processing: Use the SHA-256 hash algorithm and the Base64 encoding algorithm to encode and encrypt the wallet identification information to generate the target wallet encoding data.
[0099] In a specific embodiment, the process of executing step S106 may specifically include the following steps:
[0100] (1) Analyze the encoding format of the target wallet encoding data and generate the target encoding format;
[0101] (2) Convert the target wallet encoding data based on the target encoding format to generate encoding data in the target format;
[0102] (3) Perform Web3 interface identification analysis on the encoded data in the target format to generate the target Web3 interface identification.
[0103] Specifically, the encoding format refers to the format used when encoding data. Common encoding formats include JSON, XML, Protobuf, etc. Data conversion refers to the process of converting data from one encoding format to another. Web3 interface identification refers to the interface required to identify when using the Web3 protocol for data transmission. In actual applications, the server performs encoding format analysis on the target wallet encoding data, performs data conversion, and finally generates the target Web3 interface identification. Perform encoding format analysis on the target wallet encoding data, perform data conversion, and finally generate the target Web3 interface identification. The steps are as follows: Encoding format analysis: First, the server performs encoding format analysis on the target wallet encoding data to determine the encoding format it uses. In this embodiment, the server uses some encoding parsers, such as JSON parser, XML parser, etc., to implement encoding format analysis. Data conversion: When the target encoding format is determined, the server performs data conversion on the target wallet encoding data and converts it into the target encoding format. In this embodiment, the server uses some data converters, such as JSON converter, XML converter, etc., to implement data conversion. Web3 interface identification analysis: Finally, the server performs Web3 interface identification analysis on the target encoding data to determine the required Web3 interface identification. In this embodiment, the server uses some Web3 interface identifier parsers, such as EthereumWeb3 interface identifier parser, IPFSWeb3 interface identifier parser, etc., to implement Web3 interface identifier analysis. For example, assuming that we have completed the encoding format analysis and data conversion for the target wallet encoding data, we now need to implement the following steps: Web3 interface identifier analysis: Use the EthereumWeb3 interface identifier parser to analyze the target encoding data and determine the required Web3 interface identifier. Initiate a request: Use the required Web3 interface identifier to initiate a request to the target network to obtain wallet information or perform some wallet operations.
[0104] The above describes the Web3 interface calling method based on the Metaverse in the embodiment of the present invention. The following describes the Web3 interface calling system based on the Metaverse in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a Web3 interface calling system based on the metaverse includes:
[0105] The receiving module 501 is used to receive an interface call request, and perform data analysis on the interface call request to generate corresponding target analysis data;
[0106] A mapping module 502 is used to perform three-dimensional virtual entity mapping on a preset metaverse through the target parsed data to obtain a target three-dimensional virtual entity;
[0107] A generating module 503 is used to construct a transaction request for the target three-dimensional virtual entity and generate a corresponding target account transaction request;
[0108] A construction module 504 is used to construct a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet;
[0109] The processing module 505 is used to perform data encoding processing on the target virtual wallet to obtain target wallet encoding data;
[0110] An analysis module 506 is used to perform a Web3 interface identifier analysis on the target wallet encoding data to generate a target Web3 interface identifier;
[0111] The matching module 507 is used to perform interface matching from a preset Web3 interface information database according to the target Web3 interface identifier, determine the corresponding target Web3 interface and call the target Web3 interface.
[0112] Through the cooperation of the above components, the interface call request is received, and the interface call request is parsed to generate the corresponding target parsing data; the preset metaverse is mapped to a three-dimensional virtual entity through the target parsing data to obtain the target three-dimensional virtual entity; the target three-dimensional virtual entity is constructed for the transaction request to generate the corresponding target account transaction request; the target account transaction request is constructed for the virtual wallet to obtain the corresponding target virtual wallet; the target virtual wallet is encoded to obtain the target wallet encoding data; the target wallet encoding data is analyzed for the Web3 interface identifier to generate the target Web3 interface identifier; the target Web3 interface identifier is used to match the interface from the preset Web3 interface information database, determine the corresponding target Web3 interface and call the target Web3 interface. In this solution, data flow control and process management can be better realized. The establishment of the target virtual wallet can simulate transactions, improve the control of various transactions, realize the call of the Web3 interface, and interact with smart contracts or other applications more conveniently.
[0113] above Figure 5 The Metaverse-based Web3 interface calling system in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The Metaverse-based Web3 interface calling device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0114] Figure 6It is a structural diagram of a Web3 interface calling device based on the metaverse provided by an embodiment of the present invention. The Web3 interface calling device 600 based on the metaverse may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the Web3 interface calling device 600 based on the metaverse. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the Web3 interface calling device 600 based on the metaverse.
[0115] The Metaverse-based Web3 interface calling device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 6 The structure of the Metaverse-based Web3 interface calling device shown does not constitute a limitation on the Metaverse-based Web3 interface calling device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0116] The present invention also provides a Web3 interface calling device based on the metaverse, and the Web3 interface calling device based on the metaverse includes a memory and a processor, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the Web3 interface calling method based on the metaverse in the above-mentioned embodiments.
[0117] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the metaverse-based Web3 interface calling method.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0120] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments are still modified, or some of the technical features thereof are replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Web3 interface calling method based on the metaverse, characterized in that: The Web3 interface calling method based on the metaverse includes: Receive an interface call request, and perform data analysis on the interface call request to generate corresponding target analysis data; The target parsing data is used to perform three-dimensional virtual entity mapping on the preset metaverse to obtain a target three-dimensional virtual entity; specifically comprising: performing scene type matching on the preset metaverse through the target parsing data to determine the target scene type; performing element type extraction through the target scene type to generate a target element type set; performing three-dimensional virtual entity mapping through the target element type set to obtain a target three-dimensional virtual entity; Constructing a transaction request for the target three-dimensional virtual entity to generate a corresponding target account transaction request; Constructing a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet; Performing data encoding processing on the target virtual wallet to obtain target wallet encoding data; Performing a Web3 interface identification analysis on the target wallet encoded data to generate a target Web3 interface identification; specifically comprising: performing an encoding format analysis on the target wallet encoded data to generate a target encoding format; performing data conversion on the target wallet encoded data based on the target encoding format to generate encoding data in a target format; performing a Web3 interface identification analysis on the encoding data in the target format to generate a target Web3 interface identification; Interface matching is performed from a preset Web3 interface information database through the target Web3 interface identifier, the corresponding target Web3 interface is determined and the target Web3 interface is called.
2. The method for calling a Web3 interface based on the metaverse according to claim 1, characterized in that: The receiving the interface call request, performing data parsing on the interface call request, and generating corresponding target parsed data includes: Receive the interface call request, and perform endpoint analysis on the interface call request to obtain a corresponding API endpoint; Extract request parameters through the API endpoint to obtain target request parameters; The interface call request is parsed using the target request parameters to generate corresponding target parsed data.
3. The Web3 interface calling method based on the metaverse according to claim 1 is characterized in that: The step of constructing a transaction request for the target three-dimensional virtual entity and generating a corresponding target account transaction request includes: Performing storage data matching on the target three-dimensional virtual entity to generate storage data corresponding to the target three-dimensional virtual entity; Performing data account matching on the stored data to generate a corresponding target data account; A transaction request is generated for the target data account to obtain a corresponding target account transaction request.
4. The method for calling a Web3 interface based on the metaverse according to claim 1, characterized in that: The step of constructing a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet includes: Performing transaction data verification on the target account transaction request to obtain a transaction verification result; When the transaction verification result is verified, an Ethereum wallet address is established through the target data account; A virtual wallet is constructed for the target three-dimensional virtual entity through the Ethereum wallet address to generate a target virtual wallet.
5. The method for calling a Web3 interface based on the metaverse according to claim 1, characterized in that: The step of performing data encoding processing on the target virtual wallet to obtain target wallet encoding data includes: Perform wallet identification analysis on the target virtual wallet to generate corresponding wallet identification information; The wallet identification information is encoded to generate target wallet encoding data.
6. A Web3 interface calling system based on the metaverse, characterized in that: The Metaverse-based Web3 interface calling system includes: A receiving module, used for receiving an interface call request, performing data analysis on the interface call request, and generating corresponding target analysis data; A mapping module is used to perform three-dimensional virtual entity mapping on a preset metaverse through the target parsing data to obtain a target three-dimensional virtual entity; specifically comprising: performing scene type matching on a preset metaverse through the target parsing data to determine a target scene type; performing element type extraction through the target scene type to generate a target element type set; performing three-dimensional virtual entity mapping through the target element type set to obtain a target three-dimensional virtual entity; A generating module, used to construct a transaction request for the target three-dimensional virtual entity and generate a corresponding target account transaction request; A construction module, used to construct a virtual wallet for the target account transaction request to obtain a corresponding target virtual wallet; A processing module, used for performing data encoding processing on the target virtual wallet to obtain target wallet encoding data; An analysis module is used to perform Web3 interface identification analysis on the target wallet encoding data to generate a target Web3 interface identification; specifically comprising: performing encoding format analysis on the target wallet encoding data to generate a target encoding format; performing data conversion on the target wallet encoding data based on the target encoding format to generate encoding data in a target format; performing Web3 interface identification analysis on the encoding data in the target format to generate a target Web3 interface identification; The matching module is used to perform interface matching from a preset Web3 interface information database according to the target Web3 interface identifier, determine the corresponding target Web3 interface and call the target Web3 interface.
7. A Web3 interface calling device based on the Metaverse, characterized in that: The Web3 interface calling device based on the metaverse includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the metaverse-based Web3 interface calling device executes the metaverse-based Web3 interface calling method as described in any one of claims 1-5.
8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, a metaverse-based Web3 interface calling method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Web3 interface calling method, system and device based on block chain and storage medium
CN114710510A
Web3-oriented NFT value circulation system
CN116433375A