A method for judging NFT-related public opinion based on fine-grained semantics and the twin-tower model
Through the method of discovery of NFT -related public opinion based on the dual -tower model, the fine grain semantics of NFT and social media tweets are extracted, and the problem of difficulty monitoring NFT public opinion risks in existing technology has been solved. Safety monitoring of activities.
Patent Information
- Application Number
- CN202410615771.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-05-17
AI Technical Summary
The prior art is difficult to accurately and timely locate the corresponding performance of NFTs on social media, and it fails to effectively monitor the security and public opinion risks of NFT off-chain activities.
Using the method of discovery of NFT -related public opinion based on the dual -tower model, the fine grain semantic semantic semantic semantic semantics of the BERT dual -tower model and the social media tweet text, and the similarity of the segmentation level is to determine the correlation between the tweet and the NFT.
The accurate judgment of NFT related public opinion has been realized, the risk of public opinion has been reduced, and the reliability and security of the NFT chain activities have been enhanced.
Smart Images

Figure CN118395976B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of public opinion analysis technology, and in particular to a method for determining NFT-related public opinion based on fine-grained semantics and a dual-tower model. Background Art
[0002] NFT (Non-Fungible Token) is a digital asset stored on the blockchain. With the development of Web3.0, more and more decentralized applications have attracted people's attention, and the forms of NFT are emerging in an endless stream. NFTs on multiple public chains such as Ethereum and Polygon are created in multiple forms such as pictures, videos, and music based on blockchain smart contracts and traded through blockchain. There is a close connection between the NFT trading market and social media. NFT trading is essentially an on-chain trading activity, but it is usually accompanied by active off-chain social media activities. NFT issuers promote their NFT works through social media platforms, and social media users can boost the popularity of NFTs and expand their influence under the development of public opinion. NFT has both asset attributes and content attributes. With the help of social media public opinion trends, the NFT market also hides the risk of asset speculation. At the same time, NFT inherits the characteristics of blockchain decentralization, data immutability, and transaction privacy protection. The spread of many unaudited NFT content on social media will cause greater public opinion risks.
[0003] In traditional text keyword retrieval, it is relatively difficult to understand the semantic information of word segmentation. In the data stream of social media tweets related to NFTs, colloquial propaganda expressions and a large number of abbreviations pose a huge challenge to keyword retrieval. At the same time, tweets on social media may use a combination of certain segmentations from the basic information of the NFT to re-refer to the NFT. In order to accurately and timely locate the corresponding performance of NFTs on social media and promote reliable supervision of NFT off-chain activities, it is urgent to propose a method to solve the security of NFT off-chain activities and monitor the technical problems of NFT public opinion risks. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a method for discovering NFT-related public opinion based on the dual-tower model. This method extracts the fine-grained semantics of each text segmentation in the sequence based on the Bert (Bidirectional Encoder Representation from Transformers) dual-tower model based on the input NFT basic information, as well as the user name of the tweet publisher on social media, the tweet content and other text information, and measures the similarity at the segmentation level between the dual-towers, and outputs the judgment on whether the tweet is related to the NFT, thereby determining the associated public opinion of the NFT.
[0005] A method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model, comprising the following steps:
[0006] (1) Obtain tweet data and normalize tweet content, and construct tweet prompts and NFT prompts;
[0007] (2) Use the Bert pre-trained word segmenter to segment the tweet prompt sentence and the NFT prompt sentence, and add labels to the obtained word sequences;
[0008] (3) Construct a Bert dual-tower model, namely, tweet Bert and NFT Bert; input the word sequence obtained in step (2) into tweet Bert and NFT Bert respectively to obtain the word segmentation representation of the word sequence;
[0009] (4) Construct a fine-grained semantic measurement module for the Bert twin-tower model, aggregate all the results of the twin-tower model interaction phase, construct a similarity matrix at the word segmentation semantic level, and pool it;
[0010] (5) The two binary samples of the tweet prompt sentence are combined into the dual-tower model training, and the pooling result is mapped to the interval (0,1) using the Sigmoid function. The cross entropy loss function is used to optimize the model loss to complete the adjustment of the model.
[0011] Furthermore, the step (1) includes the following sub-steps:
[0012] (1.1) Obtain tweet data on social media through crawlers or APIs, and the text content includes the tweet content and the username of the tweet publisher;
[0013] (2.2) Normalize the content of tweets, process non-English characters in the content of tweets, convert all letters to lowercase, replace external links with http url, retain usernames starting with the @ symbol, and use a space between @ and username; use a space between # and the topic tag starting with the # symbol; treat punctuation marks in tweets as independent words;
[0014] (3.3) Construct a tweet prompt sentence in the format of "{tweet publisher username}:{normalized tweet content}";
[0015] (3.4) Construct an NFT prompt sentence in the format of "asset name:{NFT Token name},collection:{NFTCollection name},description:{information in the NFT Description column}".
[0016] Furthermore, the step (2) includes the following sub-steps:
[0017] (2.1) For each pair of tweet prompt sentence ST and NFT prompt sentence SN, use the Bert pre-trained tokenizer BertTokenizer to segment the words and obtain word sequences VT and VN respectively, where the length of VT is 256 and the length of VN is 32. The excess part will be truncated and the insufficient part will be filled;
[0018] (2.2) Add the [CLS] tag to the beginning of the word sequence VN and VT respectively, so that the model can learn the overall semantics of the sentence, expressed as:
[0019] VT={[CLS],t1,t2,…,t255};
[0020] VN={[CLS],n1,n2,…,n31}.
[0021] Furthermore, the step (3) includes the following sub-steps:
[0022] (3.3) Construct the Bert dual-tower model, denoted as tweet Bert and NFT Bert respectively, and initialize it using the parameters of the Bert pre-trained model;
[0023] (3.4) Input VT and VN into the Bert tweet Bert and NFT Bert of the Bert twin tower model respectively. Each word segmentation label will correspond to a feature representation, and finally the word segmentation representation of the word sequence is obtained. It is expressed as:
[0024] PT = {pt [cls] ,pt1,pt2,...,pt 255};
[0025] PN = {pn [cls] , pn1, pn2, ..., pn 31}.
[0026] Furthermore, the step (4) includes the following sub-steps:
[0027] (4.1) Build a fine-grained semantic measurement module for the Bert twin tower model to achieve interactive simulation of each fine-grained semantic level of NFT information and tweet information. i,j ;
[0028]
[0029] (4.2) Aggregate all the results of the two-tower model interaction stage Construct the similarity matrix of word segmentation semantic level
[0030] (4.3) Construct the AdaptiveAvgPool2d pooling layer and pool the SimMap similarity matrix data into
[0031] Specifically, in the dual-tower model interaction phase in step (4), if the semantic vector corresponding to the word segmentation is calculated again in the fully connected layer; for each word segmentation pt in the tweet Bert i , by the most similar word segmentation semantic vector pn in NFTBert j , their similarity Sim i,j As the score of the tweet segmentation, the sum of all segmentation scores is finally calculated to represent the degree of association between the tweet and the NFT; it is also possible to use the [CLS] corresponding semantic vectors of the tweet Bert and NFTBert separately to represent the similarity between the two prompt sentences at the sentence semantic level, and also represent the degree of association between the NFT and the tweet.
[0032] Furthermore, the step (5) includes the following sub-steps:
[0033] (5.1) For each tweet prompt sentence ST, a related NFT prompt sentence SN+ and a non-related NFT prompt sentence SN- are selected during the training sample screening process; therefore, during the training process, each tweet prompt sentence ST has two binary sample combinations<ST,SN+> ,<ST,SN-> Ability to enter dual-tower model training to achieve a balance between positive and negative samples;
[0034] (5.2) Use the Sigmoid function to map the pooling result p output in the interaction phase of the dual-tower model to the interval (0,1), p′=Sigmoid(p); where p′ represents the degree of correlation between the tweet prompt sentence ST and the NFT prompt sentence SN calculated by the model;
[0035] (5.3) y∈{0, 1} represents the label under the actual situation, indicating whether the tweet prompt sentence ST and the NFT prompt sentence SN are related. The cross entropy loss function is used to optimize the model loss:
[0036] Loss(p′)=-y(1-p′)log(p′)-(1-y)p′log(1-p′).
[0037] The present invention also provides an NFT-related public opinion determination device based on fine-grained semantics and a dual-tower model, comprising the following modules:
[0038] Building modules: Obtain tweet data and normalize tweet content, build tweet prompts and NFT prompts;
[0039] Labeling module: Use the Bert pre-trained word segmenter to segment the tweet prompt sentence and the NFT prompt sentence, and add labels to the obtained word sequences;
[0040] Input module: Build the Bert dual-tower model, namely, tweet Bert and NFT Bert; input the word sequence obtained by the labeling module into tweet Bert and NFT Bert respectively to obtain the word segmentation representation of the word sequence;
[0041] Constructing the pooling module: Building the fine-grained semantic measurement module of the Bert twin-tower model, aggregating all the results of the twin-tower model interaction phase, constructing the similarity matrix at the word segmentation semantic level and pooling it;
[0042] Optimization and adjustment module: The two binary samples of the tweet prompt sentence are combined into the dual-tower model training, and the pooling result is mapped to the (0,1) interval using the Sigmoid function. The cross entropy loss function is used to optimize the model loss to complete the adjustment of the model.
[0043] The present invention further provides an electronic device, comprising:
[0044] one or more processors;
[0045] A memory for storing one or more programs;
[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the NFT-related public opinion judgment method based on fine-grained semantics and the dual-tower model.
[0047] And a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the NFT-related public opinion determination method based on fine-grained semantics and the dual-tower model.
[0048] The beneficial effects of the present invention are as follows:
[0049] 1. Starting from the fine-grained semantics of Bert text segmentation, in line with the characteristics of NFT-related public opinion (many abbreviations and abbreviations), by adding the [CLS] segmentation tag and using the dual-tower model to interact with each other at the segmentation semantic level, the local semantics and global semantic information of the segmentation are integrated to construct a similarity matrix at the segmentation semantic level to realize the determination of NFT-related public opinion.
[0050] 2. The construction of the prompt sentence takes into account the potential text with semantic information, including the NFT Description and the username of the tweet publisher. The architecture of the dual-tower model reduces the amount of computation brought by the self-attention mechanism. Compared with the concatenation of a single Bert input NFT and a tweet prompt sentence, the dual-tower model can process longer tweets, decouple the tweet data source and the NFT data source, and is more suitable for the model to run online in real time.
[0051] It can be seen from the above embodiments that the present application
[0052] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0054] Figure 1 This is a model architecture diagram of the NFT-related public opinion determination method based on fine-grained semantics and the dual-tower model of the present invention;
[0055] Figure 2 This is a flow chart of the NFT-related public opinion determination method based on fine-grained semantics and the dual-tower model of the present invention. DETAILED DESCRIPTION
[0056] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0057] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0058] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0059] In order to more clearly explain the technical solutions and advantages of the present invention, the present invention is further described in detail with reference to embodiments and accompanying drawings. Note that the specific embodiments described herein are only used to explain the present invention, not to limit the present invention.
[0060] like Figure 1 and Figure 2 As shown, where:
[0061] 1. NFT and tweet data cleaning and prompt construction perform the following steps:
[0062] Step 1: Get tweet data on social media through crawlers or APIs. The text content includes the tweet content and the username of the tweet publisher.
[0063] Step 2: Normalize the content of tweets, process non-English characters in the content of tweets, convert all letters to lowercase, replace external links with http url, retain usernames starting with the @ symbol, and separate @ and usernames with a space; hashtags starting with the # symbol, and separate # and the topic with a space; treat punctuation marks in tweets as independent words;
[0064] Step 3, construct a tweet prompt sentence in the format of "{tweeter's username}:{normalized tweet content}"; for example: "elijayne_artist:#digitalart day number-"toward light" limited editionminted on@user#nft#cryptoart#digitalartist#artistontwitter#nftartists httpurlhttpurl"
[0065] Step 4. Construct an NFT prompt sentence in the format of "asset name:{NFT Token name},collection:{NFTCollection name},description:{information in the NFT Description column}."; for example: "assetname:eli jayne art studio,collection:toward light.description:egrosi"
[0066] 2. The Bert word segmentation construction phase performs the following steps:
[0067] Step 5: For each pair of tweet prompt sentence ST and NFT prompt sentence SN, use the Bert pre-trained tokenizer BertTokenizer to segment the words and obtain word sequences VT and VN respectively, where the length of VT is 256 and the length of VN is 32. The excess part will be truncated and the insufficient part will be filled;
[0068] Step 6: Add [CLS] tags to the beginning of word sequences VN and VT respectively, so that the model can learn the overall semantics of the sentence, expressed as:
[0069] VT={[CLS],t1,t2,…,t255};
[0070] VN={[CLS],n1,n2,…,n31};
[0071] Step 7: Build the Bert dual-tower model, denoted as Tweet Bert and NFT Bert, and initialize it using the parameters of the Bert pre-trained model;
[0072] Step 8: Input VT and VN into the Bert tweet Bert and NFT Bert of the Bert twin tower model respectively. Each word segmentation label will correspond to a feature representation, and finally the word segmentation representation of the word sequence will be obtained. It is expressed as:
[0073] PT = {pt [cls] ,pt1,pt2,...,pt 255};
[0074] PN = {pn [cls] , pn1, pn2, ..., pn 31};
[0075] 3. The following steps are performed during the interaction phase of the twin tower model:
[0076] Step 9: Build the fine-grained semantic measurement module of the Bert twin tower model to realize the interaction Simulation of each fine-grained semantic level of NFT information and tweet information i,j ;
[0077]
[0078] Step 10: Aggregate all the results of the two-tower model interaction phase Construct the similarity matrix of word segmentation semantic level
[0079] Step 11: Construct the AdaptiveAvgPool2d pooling layer and pool the SimMap similarity matrix data into
[0080] 4. The model fine-tuning stage performs the following steps:
[0081] Step 12: For each tweet prompt sentence ST, select an associated NFT prompt sentence SN+ and an unassociated NFT prompt sentence SN- during the training sample screening process. Therefore, during the training process, each tweet prompt sentence ST has two binary sample combinations:<ST,SN+> (positive sample),<ST,SN-> (Negative samples) can be used in the dual-tower model training to achieve a balance between positive and negative samples. For example: <“elijayne_artist:#digitalart day number-"toward light"limitededition minted on@user#nft#cryptoart#digitalartist#artistontwitter#nftartistshttpurl httpurl”, “asset name:eli jayne art studio,collection:towardlight.description:egrosi”> represents<ST,SN+> (positive example);<ST,SN-> (negative samples);
[0082] Step 13: Use the Sigmoid function to map the pooling result p outputted in the interaction phase of the dual-tower model to the interval (0, 1), p′=Sigmoid(p); where p′ represents the degree of correlation between the tweet prompt sentence ST and the NFT prompt sentence SN calculated by the model;
[0083] Step 14, y∈{0,1} represents the label under the actual situation, indicating whether the tweet prompt sentence ST and the NFT prompt sentence SN are related, and the cross entropy loss function is used to optimize the model loss:
[0084] Loss(p′)=-y(1-p′)log(p′)-(1-y)p′log(1-p′)
[0085] The present invention also provides an NFT-related public opinion determination device based on fine-grained semantics and a dual-tower model, comprising the following modules:
[0086] Building modules: Obtain tweet data and normalize tweet content, build tweet prompts and NFT prompts;
[0087] Labeling module: Use the Bert pre-trained word segmenter to segment the tweet prompt sentence and the NFT prompt sentence, and add labels to the obtained word sequences;
[0088] Input module: Build the Bert dual-tower model, namely, tweet Bert and NFT Bert; input the word sequence obtained by the labeling module into tweet Bert and NFT Bert respectively to obtain the word segmentation representation of the word sequence;
[0089] Constructing the pooling module: Building the fine-grained semantic measurement module of the Bert twin-tower model, aggregating all the results of the twin-tower model interaction phase, constructing the similarity matrix at the word segmentation semantic level and pooling it;
[0090] Optimization and adjustment module: The two binary samples of the tweet prompt sentence are combined into the dual-tower model training, and the pooling result is mapped to the (0,1) interval using the Sigmoid function. The cross entropy loss function is used to optimize the model loss to complete the adjustment of the model.
[0091] The present invention further provides an electronic device, comprising:
[0092] one or more processors;
[0093] A memory for storing one or more programs;
[0094] When the one or more programs are executed by the one or more processors, the one or more processors implement the NFT-related public opinion judgment method based on fine-grained semantics and the dual-tower model.
[0095] And a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the NFT-related public opinion determination method based on fine-grained semantics and the dual-tower model.
[0096] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0097] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for determining NFT-related public opinion based on fine-grained semantics and the twin-tower model, characterized in that: The following steps are involved: (1) Obtain tweet data and normalize tweet content, and construct tweet prompts and NFT prompts; (2) Use the Bert pre-trained word segmenter to segment the tweet prompt sentence and the NFT prompt sentence, and add labels to the obtained word sequences; (3) Construct a Bert dual-tower model, namely, tweet Bert and NFT Bert; input the word sequence obtained in step (2) into tweet Bert and NFT Bert respectively to obtain the word segmentation representation of the word sequence; (4) Construct a fine-grained semantic measurement module of the Bert twin-tower model, aggregate all the results of the twin-tower model interaction phase, construct a similarity matrix at the word segmentation semantic level and pool it; specifically: (4.1) Build a fine-grained semantic measurement module for the Bert twin tower model to achieve interactive simulation of each fine-grained semantic level of NFT information and tweet information. i,j ; (4.2) Aggregate all the results of the two-tower model interaction stage Construct the similarity matrix of word segmentation semantic level (4.3) Construct the AdaptiveAvgPool2d pooling layer and pool the SimMap similarity matrix data into (5) The two binary samples of the tweet prompt sentence are combined into the dual-tower model training, and the pooling result is mapped to the interval (0,1) using the Sigmoid function. The cross entropy loss function is used to optimize the model loss to complete the adjustment of the model.
2. According to claim 1, a method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model is characterized in that: The step (1) comprises the following sub-steps: (1.1) Obtain tweet data on social media through crawlers or APIs, and the text content includes the tweet content and the username of the tweet publisher; (2.2) Normalize the content of tweets, process non-English characters in the content of tweets, convert all letters to lowercase, replace external links with http url, retain usernames starting with the @ symbol, and use a space between @ and username; use a space between # and the topic tag starting with the # symbol; treat punctuation marks in tweets as independent words; (3.3) Construct a tweet prompt sentence in the format of "{tweet publisher username}:{normalized tweet content}"; (3.4) Construct an NFT prompt sentence in the format of "asset name:{NFT Token name},collection:{NFTCollection name},description:{information in the NFT Description column}".
3. According to claim 1, a method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model is characterized in that: The step (2) comprises the following sub-steps: (2.1) For each pair of tweet prompt sentence ST and NFT prompt sentence SN, use the Bert pre-trained tokenizer BertTokenizer to segment the words and obtain word sequences VT and VN respectively, where the length of VT is 256 and the length of VN is 32. The excess part will be truncated and the insufficient part will be filled; (2.2) Add the [CLS] tag to the beginning of the word sequence VN and VT respectively, so that the model can learn the overall semantics of the sentence, expressed as: VT={[CLS],t1,t2,…,t255}; VN={[CLS],n1,n2,…,n31}.
4. According to claim 1, a method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model is characterized in that: The step (3) comprises the following sub-steps: (3.3) Construct the Bert dual-tower model, denoted as tweet Bert and NFT Bert respectively, and initialize it using the parameters of the Bert pre-trained model; (3.4) Input VT and VN into the Bert tweet Bert and NFT Bert of the Bert twin tower model respectively. Each word segmentation label will correspond to a feature representation, and finally the word segmentation representation of the word sequence is obtained. It is expressed as: PT={pt [cls] ,pt1,pt2,...,pt 255 }; PN={pn [cls] ,pn1,pn2,...,pn 31 }。 5. According to claim 1, a method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model is characterized in that: In the dual-tower model interaction phase in step (4), if the semantic vector corresponding to the word segmentation is calculated again in the fully connected layer; for each word segmentation pt of the tweet Bert i , by the most similar word segmentation semantic vector pn in NFTBert j , their similarity Sim i,j As the score of the tweet segmentation, the sum of all segmentation scores is finally calculated to represent the degree of association between the tweet and the NFT; it is also possible to use the [CLS] corresponding semantic vectors of the tweet Bert and NFTBert separately to represent the similarity of the two prompt sentences at the sentence semantic level.
6. According to claim 1, a method for determining NFT-related public opinion based on fine-grained semantics and a twin-tower model is characterized in that: The step (5) comprises the following sub-steps: (5.1) For each tweet prompt sentence ST, a related NFT prompt sentence SN+ and a non-related NFT prompt sentence SN- are selected during the training sample screening process; therefore, during the training process, each tweet prompt sentence ST has two binary sample combinations<ST,SN+> ,<ST,SN-> Ability to enter dual-tower model training to achieve a balance between positive and negative samples; (5.2) Use the Sigmoid function to map the pooling result p output in the interaction phase of the dual-tower model to the interval (0,1), p′=Sigmoid(p); where p′ represents the degree of correlation between the tweet prompt sentence ST and the NFT prompt sentence SN calculated by the model; (5.3) y∈{0, 1} represents the label under the actual situation, indicating whether the tweet prompt sentence ST and the NFT prompt sentence SN are related. The cross entropy loss function is used to optimize the model loss: Loss(p′)=-y(1-p′)log(p′)-(1-y)p′log(1-p′).
7. A device for judging NFT-related public opinion based on fine-grained semantics and a twin-tower model, characterized in that: Includes the following modules: Building modules: Obtain tweet data and normalize tweet content, build tweet prompts and NFT prompts; Labeling module: Use the Bert pre-trained word segmenter to segment the tweet prompt sentence and the NFT prompt sentence, and add labels to the obtained word sequences; Input module: Build the Bert dual-tower model, namely, tweet Bert and NFT Bert; input the word sequence obtained by the labeling module into tweet Bert and NFT Bert respectively to obtain the word segmentation representation of the word sequence; Constructing the pooling module: Building the fine-grained semantic measurement module of the Bert twin-tower model, aggregating all the results of the twin-tower model interaction phase, constructing the similarity matrix at the word segmentation semantic level and pooling it; Specifically: build a fine-grained semantic measurement module for the Bert twin tower model to achieve the interaction Simulation of each fine-grained semantic level of NFT information and tweet information i,j ; Aggregate all the interactive phase results of the two-tower model Construct the similarity matrix of word segmentation semantic level Construct the AdaptiveAvgPool2d pooling layer to pool the SimMap similarity matrix data into Optimization and adjustment module: The two binary samples of the tweet prompt sentence are combined into the dual-tower model training, and the pooling result is mapped to the (0,1) interval using the Sigmoid function. The cross entropy loss function is used to optimize the model loss to complete the adjustment of the model.
8. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Event relevance classification model training method and device and text processing method and device
CN115809334A
Digital collection leasing method, device and equipment and storage medium
CN117011005A