Advertisement bidding method and device, equipment and storage medium

By setting up the main chain and side chain on the blockchain, and using smart contracts to process advertising bidding data, the problem of insufficient storage space in the blockchain is solved, efficient recovery of advertising bidding data and reuse of storage space are achieved, and operations are simplified. process.

CN118798997APending Publication Date: 2024-10-18CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311452335.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The advertising bidding data in the blockchain continues to increase, resulting in limited storage space and the need to stop services for data recycling, which is a complex operation.

Method used

By setting up the main chain and multiple side chains on the blockchain, using smart contracts to determine the type of advertising bidding data, and updating the data to the main chain or side chain through the target contract function, the efficient uploading of advertising bidding data can be achieved. and recycling, avoiding stopping the blockchain service when data is recycled.

Benefits of technology

It achieves efficient recycling of advertising bidding data and reuse of storage space, simplifies the data recycling process, and improves storage space utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798997A_ABST
    Figure CN118798997A_ABST
Patent Text Reader

Abstract

The invention discloses an advertisement bidding method and device, equipment and a storage medium, and belongs to the technical field of block chains. According to the method, when advertisement bidding data is received, an intelligent contract corresponding to a target block chain is called to determine the uplink type of the advertisement bidding data, and the target block chain comprises a main chain and a plurality of side chains; determining a target contract function according to the uplink type; and updating the advertisement bidding data in the corresponding main chain or side chain in the target block chain through the target contract function to perform advertisement bidding. In this way, the method achieves the chaining and bidding of the advertisement bidding data by setting the main chain and the plurality of side chains on the block chain, facilitates the recovery of the data and the storage space on the premise of satisfying the real-time bidding of the advertisement, has the characteristics of high reusability of the storage space, and facilitates the recovery of the storage space. And the uplink service of the block chain does not need to be stopped during data recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to an advertisement bidding method, device, equipment and storage medium. Background Art

[0002] In the advertising business, the use of blockchain technology has become the norm. The introduction of blockchain makes the bidding advertising business more transparent, protects the rights and interests of advertisers, and enhances the competitiveness of the platform's advertising bidding business.

[0003] At present, in the advertising bidding scenario, merchants generally bid for ranking by purchasing keywords in order to have more opportunities to be exposed to users. The common problem of existing solutions is that as the advertising bidding data in the blockchain continues to increase, each node in the blockchain is limited by limited storage space. If some data needs to be recycled (such as removed advertisements, removed keywords, etc.), it is necessary to stop the service and clean up, which is complicated.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide an advertising bidding method, device, equipment and storage medium, aiming to solve the technical problem that the existing blockchain network bidding method occupies too much storage space and is not convenient for data recovery.

[0006] To achieve the above object, the present invention provides an advertisement bidding method, which comprises the following steps:

[0007] After receiving the advertising bidding data, calling the smart contract corresponding to the target blockchain to determine the type of the advertising bidding data on the blockchain, the target blockchain includes a main chain and multiple side chains;

[0008] Determine the target contract function according to the on-chain type;

[0009] The advertising bidding data is updated in the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

[0010] Optionally, before receiving the advertising bidding data and calling the smart contract corresponding to the target blockchain to determine the on-chain type of the advertising bidding data, the method further includes:

[0011] Constructing a first contract function for determining the type of on-chain and a second contract function for information recovery;

[0012] A smart contract is written according to the first contract function and the second contract function and is published to the target blockchain.

[0013] Optionally, the calling of the smart contract corresponding to the target blockchain to determine the on-chain type of the advertising bidding data includes:

[0014] Determining a data field according to the advertisement bidding data;

[0015] Determine a keyword data field and an advertisement data field according to the data field;

[0016] The smart contract corresponding to the target blockchain is called to determine the chain type of the advertising bidding data in combination with the keyword data field and the advertisement data field.

[0017] Optionally, the updating the advertising bidding data in a corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding includes:

[0018] When the target contract function is the first contract function and the on-chain type is a keyword operation type, constructing a keyword on-chain block according to the advertisement bidding data;

[0019] After each side chain block passes the consensus algorithm, the newly added keywords in the advertising bidding data are marked as being on the shelf;

[0020] Constructing corresponding main chain blocks for each newly added keyword in the advertising bidding data according to a preset order;

[0021] Add each main chain block to the main chain of the target blockchain.

[0022] Optionally, the updating the advertising bidding data in a corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding includes:

[0023] When the target contract function is the first contract function and the on-chain type is an advertising operation type, determining the bidding order and keyword ranking information of the advertising bidding data according to the smart contract;

[0024] Constructing a hash stack according to the bidding ranking, the advertisement bidding data and the keyword ranking information;

[0025] Generate a sidechain block according to the hash stack and publish it to the target blockchain;

[0026] After each side chain block passes the consensus algorithm, determine the target side chain corresponding to each side chain block;

[0027] Add each side face block to the corresponding target side chain for advertising bidding

[0028] Optionally, the updating the advertising bidding data in a corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding includes:

[0029] When the target contract function is the second contract function and the on-chain type is a delisted keyword type, determining the delisted keyword according to the advertising bidding data;

[0030] Setting a delisting flag for the delisting side chain corresponding to the delisting keyword, and marking the delisting keyword in a database;

[0031] The content in the delisting side chain corresponding to the delisting keyword is cleared, and a delisting identification block is added to the delisting side chain.

[0032] Optionally, the updating the advertising bidding data in a corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding includes:

[0033] When the target contract function is the second contract function and the on-chain type is a delisted advertisement type, determining a delisted hash stack according to the advertisement bidding data;

[0034] The stack in the removed hash stack is recycled and deleted.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes an advertisement bidding device, which includes:

[0036] A type determination module, configured to, upon receiving the advertising bidding data, call a smart contract corresponding to a target blockchain to determine the on-chain type of the advertising bidding data, wherein the target blockchain includes a main chain and multiple side chains;

[0037] A function calling module, used to determine the target contract function according to the on-chain type;

[0038] The information on-chain module is used to update the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also proposes an advertising bidding device, which includes: a memory, a processor, and an advertising bidding program stored in the memory and running on the processor, and the advertising bidding program is configured to implement the advertising bidding method described above.

[0040] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which an advertising bidding program is stored, and when the advertising bidding program is executed by a processor, the advertising bidding method as described above is implemented.

[0041] After receiving the advertising bidding data, the present invention calls the smart contract corresponding to the target blockchain to determine the type of the advertising bidding data on the chain, and the target blockchain includes a main chain and multiple side chains; determines the target contract function according to the on-chain type; and updates the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding. In this way, the advertising bidding data is put on the chain and bid by setting the main chain and multiple side chains on the blockchain, so that the data and storage space can be easily recovered under the premise of meeting the real-time bidding of the advertisement. It has the characteristics of strong storage space reusability and easy storage space recovery, and there is no need to stop the blockchain on-chain service when the data is recovered. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a structural diagram of an advertising bidding device in a hardware operating environment involved in an embodiment of the present invention;

[0043] Figure 2 This is a flow chart of a first embodiment of an advertisement bidding method of the present invention;

[0044] Figure 3 This is a schematic diagram of the data structure on the chain in an embodiment of the advertising bidding method of the present invention;

[0045] Figure 4 A schematic diagram of constructing an advertisement bidding main chain block in an embodiment of an advertisement bidding method of the present invention;

[0046] Figure 5 A schematic diagram of a hash stack structure in an embodiment of an advertisement bidding method of the present invention;

[0047] Figure 6 This is a schematic diagram of newly added advertisement bidding information for a side chain in an embodiment of an advertisement bidding method of the present invention;

[0048] Figure 7 A schematic diagram of keyword delisting in an embodiment of an advertisement bidding method of the present invention;

[0049] Figure 8 This is a flow chart of a second embodiment of the advertising bidding method of the present invention;

[0050] Fig. 9 This is a structural design diagram of a smart contract in an advertising bidding scenario in an embodiment of an advertising bidding method of the present invention;

[0051] Fig.10 It is a structural block diagram of the first embodiment of the advertising bidding device of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] Reference Figure 1 , Figure 1 It is a schematic diagram of the structure of an advertising bidding device in the hardware operating environment involved in the embodiment of the present invention.

[0055] like Figure 1 As shown, the advertising bidding device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0056] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the advertising bidding device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0057] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an advertisement bidding program.

[0058] exist Figure 1 In the advertising bidding device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the advertising bidding device of the present invention can be set in the advertising bidding device, and the advertising bidding device calls the advertising bidding program stored in the memory 1005 through the processor 1001, and executes the advertising bidding method provided by the embodiment of the present invention.

[0059] The embodiment of the present invention provides an advertisement bidding method, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of an advertisement bidding method of the present invention.

[0060] In this embodiment, the advertisement bidding method includes the following steps:

[0061] Step S10: After receiving the advertising bidding data, call the smart contract corresponding to the target blockchain to determine the chain type of the advertising bidding data, and the target blockchain includes a main chain and multiple side chains.

[0062] In this embodiment, the execution subject of this embodiment may be the advertising bidding device, which has functions such as data processing, data communication and program running, and the advertising bidding device may be a cloud server that controls the blockchain. Of course, it may also be other devices with similar functions, and this implementation condition does not limit this. For ease of explanation, this implementation is described by taking the advertising bidding device as an example.

[0063] It should be noted that in the advertising business, the use of blockchain technology has become the norm. The introduction of blockchain makes the bidding advertising business more transparent, protects the rights and interests of advertisers, and enhances the competitiveness of the platform's advertising bidding business. At present, in the advertising bidding scenario, merchants generally bid for ranking by purchasing keywords so that they can have more opportunities to be exposed to the user side. The common problem of the existing scheme is that with the continuous increase of advertising bidding data in the blockchain, each node in the blockchain is limited by limited storage space. If some data needs to be recycled (such as ads that have been removed from the shelves, keywords that have been removed from the shelves, etc.), it is necessary to stop the service and clean up, which is complicated. The scheme of this embodiment is convenient for data recovery, and there is no need to stop the blockchain's on-chain service when data is recovered. The keywords are placed in the main chain through smart contracts to build blocks; the bidding ads are placed in a hash stack, and the blocks constructed by the primary key values ​​of the hash stack are mounted in the side chain of the corresponding keywords. Each time the bidding advertisement data (including bidding, delisting, etc.) is uploaded to the chain, only the uploaded data is placed in the corresponding hash stack and a block is added to the side chain. Each bidding is automatically calculated by the smart contract according to the rules and stored in the database of each node in the blockchain after consensus by the consensus algorithm. The hash stack assigns a primary key value to each advertisement, and the corresponding Value value is the stack. The stack stores the recent limited bidding information of the corresponding advertisement. This design realizes the reuse of information of multiple biddings for one advertisement and multiple biddings for one advertisement, reducing the storage space occupied. When an advertisement is delisted or a keyword is delisted, only the side chains corresponding to the several keywords involved need to be processed; when a keyword is delisted, its side chain data is cleared, and a block with an abandoned mark is added so that no advertising data of the keyword is mounted on the side chain; when an advertisement is delisted, only the stack of the hash stack needs to be recycled. This greatly simplifies the space recycling work.

[0064] It should be understood that the main-side chain construction method for realizing fast advertising bidding based on the smart contract of the main-side chain has the characteristics of strong storage space reusability and convenient storage space recovery, and there is no need to stop the blockchain's on-chain service when data is recovered. Compared with the traditional solution of packaging bidding information into the blockchain (generally only one chain, namely the main chain) (which can only achieve data immutability, and data recovery requires data recovery of the entire chain, which is inefficient), it not only realizes the automatic calculation of bidding on the chain through smart contracts, but also facilitates subsequent efficient and non-stop service data recovery. Specifically, according to the business characteristics of low-frequency updates of bidding keywords and high-frequency updates of bidding advertisements, this device puts keywords on the main chain through smart contracts, takes keywords as block construction units, and establishes the main chain in the order of keyword on-chain; puts bidding advertisements in a hash stack, and mounts the blocks constructed by the Key value of the hash stack in the side chain generated by the corresponding keywords, achieving the effect of fast on-chain bidding advertisements, while facilitating subsequent efficient data recovery. Each time the bidding advertisement data (including bidding, delisting, etc.) is uploaded to the chain, only the uploaded data is placed in the corresponding hash stack, and the primary key value of the hash stack is packaged into a side chain block. Each time the bidding is automatically calculated by the smart contract according to the rules and stored in the database of each node in the blockchain after consensus by the consensus algorithm. When an advertisement is delisted or a keyword is delisted, only the side chains corresponding to the keywords involved need to be processed; when a keyword is delisted, its side chain data is cleared, and a block with an abandoned mark is added so that no advertising data for the keyword is mounted on the side chain; when an advertisement is delisted, only the storage space of the hash stack needs to be recovered.

[0065] In a specific implementation, the advertising bidding data is the on-chain data that needs to be bid on the advertisements on the target blockchain.

[0066] It should be noted that before step S10, a smart contract is written and published to the blockchain. The main functions of the smart contract are to construct blocks and determine the type of chain (this is contract function 1) and information recovery (this is contract function 2). The contract function of constructing blocks and determining the type of chain is mainly to determine the type of chain information and build blocks of different main and side chains according to the type of chain information so as to be published to the blockchain; information recovery is information recovery triggered when receiving keywords or advertisements are removed from the shelves.

[0067] Furthermore, in order to accurately determine the chain type, step S10 includes: determining the data field according to the advertising bidding data; determining the keyword data field and the advertising data field according to the data field; calling the smart contract corresponding to the target blockchain to determine the chain type of the advertising bidding data in combination with the keyword data field and the advertising data field.

[0068] It should be understood that the system outside the blockchain will publish the data to be uploaded to a node A in the blockchain through the blockchain upload interface. The data uploaded to the chain is mainly divided into two categories, one is the keywords required for bidding, including keyword upload (including the first one-time upload and subsequent incremental addition of a small number of keywords), and the other is advertising-related information (including bidding advertising information and advertising removal information). The data structure design of the chain is as follows: Figure 3 shown.

[0069] In the specific implementation, the data structure design of the chain is as follows Figure 3 As shown, it mainly includes two fields, keyword word and advertisement data ad. The keyword word is used for keyword listing and delisting, and contains two key fields, namely the chain action wordAction (wordAction=0 indicates listing, wordAction=1 indicates delisting) and the keyword list wordList. That is, when wordAction=0, the keywords in the keyword list wordList are listed to the main chain; when wordAction=1, the keywords in the keyword list wordList are delisted from the main chain. The two types of advertisement data ad fields are used for advertising bidding and advertising delisting. It contains 3 key fields, namely the chain action adAction (adAction=0 indicates bidding advertising, adAction=1 indicates advertising delisting), advertising ID and advertising bidding keyword and price biddingInfo (biddingInfo is a JSONArray structure, and each JSON in JSONArray contains two key fields, keyword word and bidding price price). When adAction=0, the advertisement ID, advertisement bidding keywords, and price all have corresponding information in biddingInfo; when adAction=1, only the advertisement ID field has data, indicating that the advertisement ID is removed from the shelves.

[0070] It should be noted that a smart contract is a pre-set smart contract containing two contract functions. After consensus is reached by the consensus algorithm at each node in the blockchain, the pre-built smart contract is formed into a consensus in the blockchain and saved in the local storage of each node in the blockchain; at this point, the smart contract has completed consensus and storage in the blockchain system and can be used to receive data on the chain.

[0071] Step S20: Determine the target contract function according to the on-chain type.

[0072] It should be understood that after determining the chain type, the target contract function corresponding to the chain type is determined. The target contract function is one of the first contract function and the second contract function, which are responsible for chaining and information recovery respectively.

[0073] Step S30: The advertising bidding data is updated in the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

[0074] In the specific implementation, if the data is a keyword on-chain or a bidding advertisement information, the contract function 1 described in is triggered; if the data is a keyword off-shelf or an advertisement off-shelf, the contract function 2 described in is triggered. Among them, in contract function 1, if the data is a keyword on-chain, the main chain block is constructed and the block is published to the blockchain; if it is a bidding advertisement on-chain, the bidding sorting is performed according to the bidding rules in the smart contract, and the sorting results are written to the local storage; and the ranking of the bidding advertisement in multiple keywords and the bidding advertisement information are constructed according to the keyword dimension. Hash stacks are constructed, and the Key value of the hash stack is written into the corresponding multiple side chain blocks, and the newly added side chain blocks and the newly added hash stacks are published to the blockchain in the form of blocks. Here, the main difference between the main chain block and the side chain block is the block type type field, and different values ​​are used to represent blocks of different chain types, such as type = 1 for the main chain block, and type = 2 for the side chain block. Among them, in contract function 2, the data is a keyword off-shelf or an advertisement off-shelf, which will trigger information recycling. After consensus is reached by each node in the blockchain through the consensus algorithm, several blocks are mounted on the corresponding chain, that is, the main chain block is mounted on the main chain, and multiple blocks of the side chain are mounted on the side chain built with the corresponding keywords as the starting point of the side chain according to keywords, and the hash stack structure is maintained locally at the same time. Before the block on the side chain is chained, each node needs to call the local smart contract to calculate the bidding result according to the bidding situation of the bidding advertisement, and compare it with the result in the block issued in step 4. If the data is consistent, the block is put on the side chain; otherwise, it is an invalid data block and the chain action is not performed.

[0075] Furthermore, in order to realize the chaining of bidding keywords, step S40 includes: when the target contract function is the first contract function and the chaining type is the keyword operation type, constructing a keyword chaining block according to the advertising bidding data; after each side chain block reaches a consensus through the consensus algorithm, marking the newly added keywords in the advertising bidding data as being on the shelf; constructing a corresponding main chain block for each newly added keyword in the advertising bidding data in a preset order; and adding each main chain block to the main chain of the target blockchain.

[0076] It should be noted that at this time, wordAction = 0, which means that the content in the keyword list wordList is put on the main chain. At this time, a block is constructed (it does not distinguish whether the block is the main chain or the side chain at this time), and the block is published to the blockchain; each node in the blockchain receives the above-mentioned keyword chain block, and after the consensus algorithm, the blockchain main chain reaches a consensus on the block and stores it in the local database, marking these newly added keywords as being put on the shelf; then, several keywords in the keyword list wordList are respectively constructed locally in the order of the keywords in wordList. The corresponding number of main chain blocks, such as Figure 4 As shown. After each node completes the construction of the local main chain's new blocks, it packages the information of the local new blocks into blocks and publishes them to the main chain for consensus. After receiving the new blocks calculated locally by other nodes, each node compares them with the new blocks calculated locally. If the results of more than half of the nodes are the same, a consensus is formed, and these new blocks are added to the local main chain of each node, and the information on the completion of these blocks is published in the blockchain to other nodes. Thus, the final conclusion of the new blocks is formed in the main chain. If the results of more than half of the nodes are different, the consensus has not been formed.

[0077] Furthermore, in order to upload information related to bidding advertisements to the chain, step S40 includes: when the target contract function is the first contract function and the upload type is the advertising operation type, determining the bidding ranking and the keyword ranking information of the advertising bidding data according to the smart contract; constructing a hash stack according to the bidding ranking, the advertising bidding data and the keyword ranking information; generating a side chain block according to the hash stack and publishing it to the target blockchain; determining the target side chain corresponding to each side chain block after each side chain block reaches consensus through the consensus algorithm; and adding each side face block to the corresponding target side chain for advertising bidding.

[0078] It should be understood that when adAction = 0, the data on the chain is a bidding advertisement. At this time, the nodes of the blockchain will perform bidding sorting according to the bidding rules in the smart contract, and write the sorting results to local storage; and build a hash stack based on the ranking of the bidding advertisement in multiple keywords and the bidding advertisement information according to the keyword dimension, and package the key of the hash stack into a side chain block, and package it into a block together with the value of the hash stack, and publish the block to the blockchain. The structural design of the hash stack is as follows: Figure 5 shown.

[0079] In the specific implementation, Figure 5As shown, the left side is the Key value of the hash table. Each advertisement will be assigned a Key value, and the corresponding Value is a stack of valid space. The stack is used to record a limited number of K bidding information of an advertisement. If there are more than K bidding information, the content that first enters the stack will be popped out so that new content can be successfully added to the stack. Each node in the blockchain receives the constructed side chain block. After the consensus algorithm, the blockchain reaches a consensus on the block and stores it in the local database, identifying the mapping relationship between the advertisement ID and the keyword and the ranking information of all advertisements under the corresponding keyword; then, several keywords in the keyword list wordList are locally constructed into a hash stack and a corresponding number of side chain blocks in the order of the keywords in wordList, as shown in FIG. Figure 6 As shown. Figure 6 As shown in the figure, if the advertising ID bids for keyword 1, keyword 2, and keyword 3, the advertising bidding information (including the ranking under the corresponding keyword) is packaged into blocks, and after the consensus algorithm consensus (see the next paragraph), it is mounted in the side chains of keyword 1, keyword 2, and keyword 3 respectively. If a keyword currently has no side chain, then this block is the first block under this keyword ( Figure 6 Keyword 3 is an example of this).

[0080] It should be noted that after each node completes the construction of the local side chain's new blocks, it packages the information of the local new blocks into blocks and publishes them to the side chain for consensus. After each node receives the new blocks calculated locally by other nodes, it compares them with the new blocks calculated locally. If the results of more than half of the nodes are the same, a consensus is formed, and these new blocks are added to the local side chain of each node (that is, Figure 6 The process ends when the final conclusion of the newly added blocks is formed in the side chain. If the results of more than half of the nodes are different, the consensus is not formed and the process ends.

[0081] Furthermore, in order to realize the function of keyword delisting, step S40 includes: when the target contract function is the second contract function and the chain type is a delisted keyword type, determining the delisted keyword according to the advertising bidding data; setting a delisting flag for the delisting side chain corresponding to the delisted keyword, and identifying the delisted keyword in the database; clearing the content in the delisting side chain corresponding to the delisted keyword, and adding a delisted flag block to the delisting side chain.

[0082] It should be noted that what is removed from the shelves are keywords. As mentioned above, keywords are in the main chain, and the main chain with forward and backward links is constructed with keywords as blocks according to the order in which the keywords are added to the chain. When removing a keyword, it is only necessary to set a removal mark on the side chain corresponding to the keyword and mark the keyword as removed from the database. Figure 7 As shown. Figure 7 As shown, when keyword 3 is removed from the shelves, the original side chain content of keyword 3 is cleared, that is, the storage space occupied by the data of the original side chain is recovered, and a special block that has been removed from the shelves is added.

[0083] It should be understood that if there are advertisements that continue to bid on the keyword in the future, when the advertising information is to be loaded into the side chain of keyword 3, it will be found that the block with the logo has been removed, and the advertising information will not be loaded into the side chain of keyword 3 at this time.

[0084] Furthermore, in order to remove the bidding advertisement, step S40 includes: when the target contract function is the second contract function and the on-chain type is the removed advertisement type, determining the removed hash stack according to the advertisement bidding data; and recycling and deleting the stack in the removed hash stack.

[0085] In the specific implementation, the advertisement is removed from the shelves at this time. The advertisement may have bid for multiple keywords, so there may be multiple keywords in the side chain that contain the advertisement information. In the design of this article, the side chain stores the key of the hash stack, which takes up less space, and the V of the hash stack takes up more space. At this time, only the stack of the hash stack needs to be recycled, which greatly simplifies the space recycling work.

[0086] This embodiment determines the type of the advertising bidding data to be uploaded to the chain by calling the smart contract corresponding to the target blockchain upon receiving the advertising bidding data, and the target blockchain includes a main chain and multiple side chains; determines the target contract function according to the type of the uploaded chain; and updates the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding. In this way, the advertising bidding data is uploaded to the chain and bid by setting the main chain and multiple side chains on the blockchain, so that the data and storage space can be easily recovered under the premise of meeting the real-time bidding of the advertisement. It has the characteristics of strong storage space reusability and easy storage space recovery, and there is no need to stop the blockchain's on-chain service when the data is recovered.

[0087] refer to Figure 8 , Figure 8 It is a flow chart of a second embodiment of an advertisement bidding method of the present invention.

[0088] Based on the first embodiment, the advertising bidding method of this embodiment further includes, before step S10:

[0089] Step S101: Construct a first contract function for determining the type of on-chain transaction and a second contract function for information recovery.

[0090] It should be noted that the main functions of smart contracts are to construct blocks and determine the type of chain (this is contract function 1) and information recovery (this is contract function 2). The contract function of constructing blocks and determining the type of chain is mainly to determine the type of chain information and build blocks of different main and side chains according to the type of chain information so as to publish them to the blockchain; information recovery is triggered when receiving keywords or advertisements are removed from the shelves. The structural design of smart contracts is as follows: Fig. 9 shown.

[0091] It should be understood that, as shown in the figure above, the smart contract data structure design diagram applied to the ad removal scenario contains four data areas, namely <1> Contract metadata area; <2> Contract data area; <3> Contract area; <4> Contract data verification area. The contract metadata area (ContractMetaData) mainly contains metadata information of the contract, including the contract number (string field type, field name contract_num), contract name (string field type, field name contract_name), contract version (string field type, field name contract_version), and contract triggering method (integer field type, field name contract_runway). There are many contract triggering methods, including but not limited to real-time triggering and timed triggering. When real-time triggering, contract_runway = 0; when timed triggering, the triggering time is written in the form of an integer string, such as 2023-04-10 10:00:00 can be written as 20230410100000, that is, contract_runway = 20230410100000.

[0092] In the specific implementation, the contract data area (ContractData) mainly includes multiple bidding rules, blockchain type, and side chain keyword delisting block identification. The blockchain type refers to how to distinguish the main and side chain blocks when building the main and side chain blocks. In this scenario, this field clarifies the use of the block type type field, and uses different values ​​to represent blocks of different chain types, such as type = 1 for the main chain block, and type = 2 for the side chain block. The side chain keyword delisting block identification field is used to mark how to identify the side chain of a keyword block after the side chain corresponding to the keyword is recycled after the keyword is delisted, so as not to continue to add side chains.

[0093] It should be noted that the contract area (Contract) mainly contains a function list consisting of several contract functions. The format of the contract function is as follows:

[0094] Return value function contract name (input parameter list) {

[0095] Function implementation

[0096] }

[0097] It should be understood that the composition logic of the first contract function is as follows:

[0098] 1. At this time, a node in the blockchain receives the on-chain data. The on-chain data structure is as follows: Figure 3 As shown. This structure mainly contains two fields: keyword word and advertisement data ad. At this time, first determine the field of keyword word. If the chain action wordAction and keyword list wordList fields are not empty, it means it is a keyword operation, and go to 2.; if at least one field of the chain action wordAction and keyword list wordList fields is empty, it means it is an advertisement bidding or delisting action. Go to 5.;

[0099] 2. Construct a block based on the block data. If wordAction=0, it means that the content in the keyword list wordList is put on the main chain. At this time, construct a block (it does not distinguish whether the block is the main chain or the side chain at this time), and publish the block to the blockchain; go to 3.; If wordAction=1, it means that the content in the keyword list wordList is removed from the main chain. At this time, construct a block (it does not distinguish whether the block is the main chain or the side chain at this time), and publish the block to the blockchain; go to 4.;

[0100] 3. Each node in the blockchain receives the block in step 2. After the consensus algorithm, the blockchain main chain reaches a consensus on the block and stores it in the local database, marking these newly added keywords as being on the shelf; then, several keywords in the keyword list wordList are respectively constructed locally in the order of the keywords in wordList. The corresponding number of main chain blocks, such as Figure 4 As shown: After each node completes the construction of the local main chain's new blocks, it packages the information of the local new blocks into blocks and publishes them to the main chain for consensus. After receiving the new blocks calculated locally by other nodes, each node compares them with the new blocks calculated locally. If the results of more than half of the nodes are the same, a consensus is formed, and these new blocks are added to the local main chain of each node, and the information on the completion of these block construction is published in the blockchain to other nodes. Thus, the final conclusion of the new blocks is formed in the main chain. Go to 8,; if the results of more than half of the nodes are different, the consensus has not been formed, go to 8,;

[0101] 4. Each node in the blockchain receives the block in step 2. After the consensus algorithm is used, the blockchain forms a consensus on the block and stores it in the local database, marking these newly added keywords as being off-shelf. Then, the side chain data corresponding to several keywords in the keyword list wordList is recycled. Go to step 8;

[0102] 5. At this time, the on-chain data is advertising bidding or delisting data. If the on-chain action adAction under the ad field of the two types of advertising data is 0, the on-chain data is a bidding advertisement. At this time, the nodes of the blockchain will perform bidding sorting according to the bidding rules in the smart contract, and write the sorting results to local storage; and build a hash stack based on the ranking of the bidding advertisement in multiple keywords and the bidding advertisement information according to the keyword dimension, and package the Key value of the hash stack into a side chain block, and package it together with the Value of the hash stack into a block, and publish the block to the blockchain. Go to step 6; if adAction = 1, it is a delisted advertisement, go to step 7;

[0103] 6. Each node in the blockchain receives the block in step 5. After the consensus algorithm, the blockchain forms a consensus on the block and stores it in the local database, identifying the mapping relationship between the ad ID and the keyword and the ranking information of all ads under the corresponding keyword. Then, several keywords in the keyword list wordList are respectively constructed locally in the order of the keywords in wordList. Hash stacks and a corresponding number of side chain blocks are constructed, such as Figure 6 As shown, if the advertising ID bids for keyword 1, keyword 2, and keyword 3, a hash stack is constructed with the advertising bidding information (including the ranking under the corresponding keyword), and the key value of the hash stack is packaged into a side chain block. After the consensus algorithm consensus (see the next paragraph), it is mounted in the side chains of keyword 1, keyword 2, and keyword 3 respectively. If a keyword currently has no side chain, then this block is the first block under this keyword (keyword 3 in this figure is an example). After each node completes the construction of the new block in the local side chain, it packages the information of the local new block into a block and publishes it to the side chain for consensus. After each node receives the new block calculated locally by other nodes, it compares it with the new block calculated locally. If the results of more than half of the nodes are the same, a consensus is formed, and these new blocks are added to the local side chain of each node, and the information on the completion of the construction of these blocks is published in the blockchain to other nodes. Thus, the final conclusion of the new block is formed in the side chain. Go to step 8; if the results of more than half of the nodes are different, the consensus has not been formed, and go to step 8;

[0104] 7. At this time, the advertising ID is removed from the shelves. First, the advertising status stored in the local database is marked as removed from the shelves, and then the smart contract of information recycling function 2 is triggered. After the smart contract is executed, go to step 8;

[0105] 8. The process ends.

[0106] It should be understood that the construction and logic of the second smart contract are as follows:

[0107] Step 1: At this time, the data on the chain is a keyword or advertisement, which will trigger information recycling, that is, this smart contract. If the data is a keyword, go to step 2; if the data is an advertisement, go to step 3;

[0108] Step 2: At this time, the keywords are removed from the shelves. As mentioned above, the keywords are in the main chain, and the main chain of front and back links is constructed with the keywords as blocks according to the order in which the keywords are chained.

[0109] When delisting a keyword, you only need to set a delisting flag on the side chain corresponding to the keyword and mark the keyword as delisted in the database. Figure 7 As shown, when keyword 3 is removed from the shelf, the original side chain content of keyword 3 is cleared, that is, the storage space occupied by the original side chain data is recovered, and a special block that has been removed from the shelf is added. If there are advertisements that still bid for the keyword in the future, when the advertisement information is loaded into the side chain of keyword 3, the block indicating that it has been removed from the shelf will be found, and the advertisement information will not be loaded into the side chain of keyword 3 at this time. Go to step 4.

[0110] Step 3: At this time, the advertisement is removed from the shelves. The advertisement may have bid for multiple keywords, so there may be multiple keyword side chains with the advertisement information. According to the design of this article, only the hash stack needs to be recycled at this time. This greatly simplifies the space recycling work.

[0111] Step 4: The process ends.

[0112] Step S102: Compile a smart contract according to the first contract function and the second contract function and publish it to the target blockchain.

[0113] It should be noted that after the first contract function and the second contract function are determined, the two contract functions are merged to obtain a smart contract, and then the smart contract is written and published to the target blockchain for storage.

[0114] This embodiment constructs a first contract function for determining the type of chain, and a second contract function for information recovery; writes a smart contract based on the first contract function and the second contract function and publishes it to the target blockchain. In this way, it is possible to put keywords on the main chain through smart contracts, use keywords as block construction units, and establish the main chain in the order of keyword chaining; put bidding ads in a hash stack, and mount the blocks constructed by the key values ​​of the hash stack on the side chain generated by the corresponding keywords, so as to achieve the effect of fast chaining of bidding ads and facilitate subsequent efficient data recovery.

[0115] In addition, an embodiment of the present invention further proposes a storage medium, on which an advertising bidding program is stored. When the advertising bidding program is executed by a processor, the steps of the advertising bidding method described above are implemented.

[0116] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0117] Reference Fig.10 , Fig.10 It is a structural block diagram of the first embodiment of the advertising bidding device of the present invention.

[0118] like Fig.10 As shown, the advertising bidding device proposed in the embodiment of the present invention includes:

[0119] The type determination module 10 is used to call the smart contract corresponding to the target blockchain to determine the chain type of the advertising bidding data after receiving the advertising bidding data. The target blockchain includes a main chain and multiple side chains.

[0120] The function calling module 20 is used to determine the target contract function according to the on-chain type.

[0121] The information on-chain module 30 is used to update the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

[0122] This embodiment determines the type of the advertising bidding data to be uploaded to the chain by calling the smart contract corresponding to the target blockchain upon receiving the advertising bidding data, and the target blockchain includes a main chain and multiple side chains; determines the target contract function according to the type of the uploaded chain; and updates the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding. In this way, the advertising bidding data is uploaded to the chain and bid by setting the main chain and multiple side chains on the blockchain, so that the data and storage space can be easily recovered under the premise of meeting the real-time bidding of the advertisement. It has the characteristics of strong storage space reusability and easy storage space recovery, and there is no need to stop the blockchain's on-chain service when the data is recovered.

[0123] In one embodiment, the type determination module 10 is also used to construct a first contract function for determining the chain type and a second contract function for information recovery; a smart contract is written according to the first contract function and the second contract function and published to the target blockchain.

[0124] In one embodiment, the type determination module 10 is also used to determine the data field according to the advertising bidding data; determine the keyword data field and the advertising data field according to the data field; call the smart contract corresponding to the target blockchain to determine the on-chain type of the advertising bidding data in combination with the keyword data field and the advertising data field.

[0125] In one embodiment, the information chain module 30 is also used to construct a keyword chain block according to the advertising bidding data when the target contract function is the first contract function and the chain type is a keyword operation type; after each side chain block reaches a consensus through a consensus algorithm, mark the newly added keywords in the advertising bidding data as being on the shelf; construct a corresponding main chain block for each newly added keyword in the advertising bidding data in a preset order; and add each main chain block to the main chain of the target blockchain.

[0126] In one embodiment, the information on-chain module 30 is further used to determine the bidding order and keyword ranking information of the advertising bidding data according to the smart contract when the target contract function is the first contract function and the on-chain type is the advertising operation type;

[0127] A hash stack is constructed according to the bidding ranking, the advertising bidding data and the keyword ranking information; a side chain block is generated according to the hash stack and published to the target blockchain; after each side chain block reaches consensus through a consensus algorithm, a target side chain corresponding to each side chain block is determined; and each side face block is added to the corresponding target side chain for advertising bidding.

[0128] In one embodiment, the information chain module 30 is also used to determine the delisted keyword according to the advertising bidding data when the target contract function is the second contract function and the chain type is the delisted keyword type; set a delisting flag for the delisting side chain corresponding to the delisted keyword, and identify the delisted keyword in the database; clear the content in the delisting side chain corresponding to the delisted keyword, and add a delisted flag block to the delisting side chain.

[0129] In one embodiment, the information chain module 30 is also used to determine the delisting hash stack according to the advertising bidding data when the target contract function is the second contract function and the chain type is the delisting advertisement type; and recycle and delete the stack in the delisting hash stack.

[0130] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0131] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0132] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the advertising bidding method provided in any embodiment of the present invention, and will not be repeated here.

[0133] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0134] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0136] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An advertisement bidding method, characterized in that: The advertising bidding method comprises: After receiving the advertising bidding data, calling the smart contract corresponding to the target blockchain to determine the type of the advertising bidding data on the blockchain, the target blockchain includes a main chain and multiple side chains; Determine the target contract function according to the on-chain type; The advertising bidding data is updated in the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

2. The advertisement bidding method according to claim 1, characterized in that: Before receiving the advertising bidding data and calling the smart contract corresponding to the target blockchain to determine the on-chain type of the advertising bidding data, the method further includes: Constructing a first contract function for determining the type of on-chain and a second contract function for information recovery; A smart contract is written according to the first contract function and the second contract function and is published to the target blockchain.

3. The advertisement bidding method according to claim 1, characterized in that: The calling of the smart contract corresponding to the target blockchain determines the on-chain type of the advertising bidding data, including: Determining a data field according to the advertisement bidding data; Determine a keyword data field and an advertisement data field according to the data field; The smart contract corresponding to the target blockchain is called to determine the chain type of the advertising bidding data in combination with the keyword data field and the advertisement data field.

4. The advertisement bidding method according to claim 2, characterized in that: The updating of the advertisement bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function for advertisement bidding includes: When the target contract function is the first contract function and the on-chain type is a keyword operation type, constructing a keyword on-chain block according to the advertisement bidding data; After each side chain block passes the consensus algorithm, the newly added keywords in the advertising bidding data are marked as being on the shelf; Constructing corresponding main chain blocks for each newly added keyword in the advertising bidding data according to a preset order; Add each main chain block to the main chain of the target blockchain.

5. The advertisement bidding method according to claim 2, characterized in that: The updating of the advertisement bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function for advertisement bidding includes: When the target contract function is the first contract function and the on-chain type is an advertising operation type, determining the bidding order and keyword ranking information of the advertising bidding data according to the smart contract; Constructing a hash stack according to the bidding ranking, the advertisement bidding data and the keyword ranking information; Generate a sidechain block according to the hash stack and publish it to the target blockchain; After each side chain block passes the consensus algorithm, determine the target side chain corresponding to each side chain block; Each side face block is added to the corresponding target side chain for advertising bidding.

6. The advertisement bidding method according to claim 2, characterized in that: The updating of the advertisement bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function for advertisement bidding includes: When the target contract function is the second contract function and the on-chain type is a delisted keyword type, determining the delisted keyword according to the advertising bidding data; Setting a delisting flag for the delisting side chain corresponding to the delisting keyword, and marking the delisting keyword in a database; The content in the delisting side chain corresponding to the delisting keyword is cleared, and a delisting identification block is added to the delisting side chain.

7. The advertisement bidding method according to claim 2, characterized in that: The updating of the advertisement bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function for advertisement bidding includes: When the target contract function is the second contract function and the on-chain type is a delisted advertisement type, determining a delisted hash stack according to the advertisement bidding data; The stack in the removed hash stack is recycled and deleted.

8. An advertising bidding device, characterized in that: The advertising bidding device comprises: A type determination module, configured to, upon receiving the advertising bidding data, call a smart contract corresponding to a target blockchain to determine the on-chain type of the advertising bidding data, wherein the target blockchain includes a main chain and multiple side chains; A function calling module, used to determine the target contract function according to the on-chain type; The information on-chain module is used to update the advertising bidding data to the corresponding main chain or side chain in the target blockchain through the target contract function to conduct advertising bidding.

9. An advertising bidding device, characterized in that: The advertising bidding device comprises: a memory, a processor, and an advertising bidding program stored in the memory and running on the processor, wherein the advertising bidding program is configured to implement the advertising bidding method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores an advertising bidding program, and when the advertising bidding program is executed by the processor, the advertising bidding method according to any one of claims 1 to 7 is implemented.