CN114677165A - Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium - Google Patents
Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium Download PDFInfo
- Publication number
- CN114677165A CN114677165A CN202210234310.4A CN202210234310A CN114677165A CN 114677165 A CN114677165 A CN 114677165A CN 202210234310 A CN202210234310 A CN 202210234310A CN 114677165 A CN114677165 A CN 114677165A
- Authority
- CN
- China
- Prior art keywords
- text
- target
- advertisement
- processed
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0241—Advertisements
- G06Q30/0277—Online advertisement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/253—Grammatical analysis; Style critique
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0241—Advertisements
- G06Q30/0251—Targeted advertisements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Finance (AREA)
- Artificial Intelligence (AREA)
- Strategic Management (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Development Economics (AREA)
- Accounting & Taxation (AREA)
- Health & Medical Sciences (AREA)
- Game Theory and Decision Science (AREA)
- General Business, Economics & Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Economics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The disclosure relates to a method, a device, a server and a storage medium for contextual online advertisement delivery, and relates to the technical field of computers. The method comprises the following steps: acquiring a text to be processed; performing context operation on a text to be processed in response to a user, acquiring a target text unit and a target text, and acquiring a word document corresponding table and a candidate sentence library; and acquiring first target advertisement information and second target advertisement information according to the target text unit, the word document corresponding table, the target text and the candidate sentence library, and providing the target text and/or the target text unit, the first target advertisement information and/or the second target advertisement information for the user. Therefore, the user can establish the global view of the language structure and train the sense of language, the purpose of rapidly mastering the language is achieved, meanwhile, the advertisement information related to the learning text is provided for the user, and the click rate of the advertisement is improved while the implantation of the advertisement scene is realized.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a server, and a storage medium for contextual online advertisement delivery.
Background
In the related art, the user performs language learning through some application programs, however, the application program for language learning can only provide translation or pronunciation of a sentence, and the user can only learn meaning or pronunciation of the sentence through the application program for language learning; and the application of language learning is only used for language learning, and the function is single.
Disclosure of Invention
The present disclosure provides a contextual online advertisement delivery method, apparatus, server, and storage medium to at least solve the problem of single function of a language learning application in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a contextual online advertisement delivery method is provided, including: acquiring a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases; responding to the context operation of the user on the text to be processed, and acquiring a target text unit and a target text; acquiring a word document corresponding table and a candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and advertisement information associated with the candidate sentences; acquiring first target advertisement information according to the target text unit and the word document corresponding table; acquiring second target advertisement information according to the target text and the candidate sentence library; and providing the target text and/or the target text unit and the first target advertisement information and/or the second target advertisement information to the user.
According to a second aspect of an embodiment of the present disclosure, there is provided a contextual online advertisement delivery apparatus, including: the text acquisition unit is used for acquiring a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases; the target acquisition unit is used for responding to the context operation of the user on the text to be processed and acquiring a target text unit and a target text; the data acquisition unit is used for acquiring the word document corresponding table and the candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and the advertisement information associated with the candidate sentences; the first information acquisition unit is used for acquiring first target advertisement information according to the target text unit and the word document corresponding table; a second information obtaining unit, configured to obtain second target advertisement information according to the target text and the candidate sentence library; and an information providing unit for providing the target text and/or the target text unit, and the first target advertisement information and/or the second target advertisement information to the user.
According to a third aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the contextual online advertising method as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the contextual online advertisement delivery method as described in the first aspect above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the contextual online advertising method as described above in the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by implementing the embodiment of the disclosure, a text to be processed is obtained; performing context operation on a text to be processed in response to a user, acquiring a target text unit and a target text, and acquiring a word document corresponding table and a candidate sentence library; and acquiring first target advertisement information and second target advertisement information according to the target text unit, the word document corresponding table, the target text and the candidate sentence library, and providing the target text and/or the target text unit, the first target advertisement information and/or the second target advertisement information for the user. Therefore, the context operation realizes the bidirectional operation of text from complex to simple and from simple to complex, is convenient for the user to establish global viewing and training senses, provides the user with advertisement information related to the learning text, can improve the click rate of the advertisement, is also convenient for the user to learn the knowledge related to the text through the advertisement, and achieves the purpose of rapidly mastering the language.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of contextual online advertising according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating contextual operations matching advertisements in a contextual online advertising method in accordance with an illustrative embodiment;
FIG. 3 is a flowchart illustrating S3 in a contextual online advertising method, according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating S2 in a contextual online advertising method, according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating a parse tree, according to an example embodiment;
FIG. 6 is a flowchart illustrating S2 of another contextual online advertising method in accordance with an exemplary embodiment;
FIG. 7 is a flowchart illustrating a further contextual online advertising method S2, according to an example embodiment;
FIG. 8 is a flowchart illustrating S4 in a method of contextual online advertising, according to an exemplary embodiment;
FIG. 9 is a flowchart illustrating another method of contextual online advertising in accordance with an exemplary embodiment S4;
FIG. 10 is a block diagram illustrating a contextual online advertising device in accordance with an exemplary embodiment;
FIG. 11 is a block diagram illustrating a target acquisition unit in a contextual online advertising device in accordance with an exemplary embodiment;
FIG. 12 is a block diagram illustrating another target acquisition unit in a contextual online advertising device in accordance with an exemplary embodiment;
FIG. 13 is a block diagram illustrating yet another target acquisition unit in a contextual online advertising device in accordance with an exemplary embodiment;
fig. 14 is a block diagram illustrating a first information obtaining unit in a contextual online advertising device according to an exemplary embodiment;
fig. 15 is a block diagram illustrating a second information obtaining unit in a text context processing apparatus according to an exemplary embodiment;
FIG. 16 is a block diagram illustrating a computer system of a server in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
Throughout the specification and claims, the term "comprising" is to be interpreted in an open, inclusive sense, i.e., as "including, but not limited to," unless the context requires otherwise. In the description of the specification, the terms "some embodiments" or the like are intended to indicate that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the disclosure. The schematic representations of the terms used above are not necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics may be included in any suitable manner in any one or more embodiments or examples.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
It should be noted that the contextual online advertisement delivery method according to the embodiment of the present disclosure may be executed by the contextual online advertisement delivery apparatus according to the embodiment of the present disclosure, the contextual online advertisement delivery apparatus may be implemented in a software and/or hardware manner, and the contextual online advertisement delivery apparatus may be configured in an electronic device, where the electronic device may install and run a contextual online advertisement delivery program. Electronic devices may include, but are not limited to, hardware devices with various operating systems, such as smartphones, tablets, and the like.
FIG. 1 is a flow diagram illustrating a method of contextual online advertising according to an exemplary embodiment.
As shown in fig. 1, the contextual online advertisement delivery method provided by the embodiment of the present disclosure includes, but is not limited to, the following steps:
S1: acquiring a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases.
It is understood that, in the embodiment of the present disclosure, the to-be-processed text may be a text for language learning of the user, may be provided for the user, or may also be provided for the contextual online advertisement delivery apparatus in the embodiment of the present disclosure, and the to-be-processed text is used for language learning.
In the case that the text to be processed is provided for the user, the user may select an article, or select a segment of text, and paste the selected article to a corresponding position of the context online advertisement delivery device in the embodiment of the present disclosure, so that the context online advertisement delivery device obtains the text to be processed, (in the case that the user inputs an article, the article may be preprocessed in advance by sentence division, and the text to be processed is obtained), and further, the context online advertisement delivery device in the embodiment of the present disclosure is used to process the text provided by the user.
In the case that the text to be processed is provided by the context online advertisement delivery device, in the embodiment of the disclosure, the text data used for the user to learn is stored in the context online advertisement delivery device in advance, and the user selects the corresponding text, so that the context online advertisement delivery device obtains the text selected by the user, obtains the text to be processed, and further can process the text.
In the embodiment of the present disclosure, the text to be processed may be an article or may be a word, and it is understood that the text to be processed includes a plurality of words or phrases, and may include a plurality of words, or a plurality of phrases, or include at least one word and at least one phrase at the same time.
In the embodiment of the present disclosure, in order to facilitate subsequent processing of a to-be-processed text, there is a constraint on the number of words included in the to-be-processed text, and exemplarily, the number of words included in the to-be-processed text is limited to 10 to 35 words, so that when the to-be-processed text is subsequently processed, the time consumed by calculation can be reduced.
It should be noted that the number of words included in the text to be processed may also be limited in other ranges, and may be set according to hardware environments such as a server, and the number of words included in the text to be processed may be increased along with the improvement of hardware performance, which is only used as an illustration here and is not used as a specific limitation to the embodiment of the present disclosure.
It should be noted that, in the embodiment of the present disclosure, the text to be processed may be an english text, or may also be a chinese text, a french text, a german text, an italian text, a japanese text, a korean text, and the like, which is not limited in this embodiment of the present disclosure.
S2: and responding to the context operation of the text to be processed by the user, and acquiring a target text unit and a target text.
It should be noted that, in the embodiment of the present disclosure, the contextual online advertisement delivery device can implement contextual operation on the text to be processed based on the user to obtain the target text unit and the target text.
In the embodiment of the disclosure, the contextual online advertisement delivery device can process the text to be processed based on the contextual operation of the user to obtain at least one target text unit and at least one target text.
In the embodiment of the present disclosure, the context operation of the text to be processed by the user may include an above operation and a below operation, as shown in fig. 2, the above operation may expand the text content of the text to be processed, and add or replace at least one text unit in the text to be processed; the following operations can delete the text content of the text to be processed, and delete at least one text unit in the text to be processed.
In this case, under the condition that the user performs the above operation on the text to be processed, the newly added or replaced text unit is the target text unit, and the new text generated after the text to be processed is newly added or replaced is the target text; under the condition that a user carries out downlink operation on the text to be processed, deleting the text unit of the text to be processed as a target text unit, and generating a new text after the text to be processed passes through the deleted text unit as the target text.
In the embodiment of the present disclosure, a user may perform multiple contextual operations, for example: carrying out the above operations continuously for a plurality of times; or performing a plurality of continuous following operations; or performing the above operation and the below operation multiple times, wherein the order of the above operation and the below operation is not required, and the above operation may be performed at least once before the below operation is performed at least once, or the below operation may be performed at least once before the above operation is performed at least once. After the user performs the above operation or the below operation each time, the target text unit and the target text corresponding to the above operation or the below operation each time can be generated.
It can be understood that, in the embodiment of the present disclosure, the contextual online advertisement delivery device is provided with a key through which the user can perform a contextual operation and a contextual operation, and correspondingly, the contextual operation of the user on the text to be processed may be that the user clicks the key of the contextual operation, and the contextual operation of the user on the text to be processed may be that the user clicks the key of the contextual operation; or the context online advertisement delivery device is provided with a user context operation and a control instruction of the context operation, correspondingly, the user context operation can trigger the control instruction corresponding to the context operation for the user, and the user context operation can trigger the control instruction corresponding to the user operation for the user.
It should be noted that, in the embodiment of the present disclosure, the text to be processed includes a plurality of text units, and the text units may be words or phrases. When the text unit is a word, in the embodiment of the disclosure, the target text unit in the text to be processed is determined according to the part of speech corresponding to the word and the grammatical relation between different words of the text to be processed.
Exemplarily, taking an english text as an example, when a text unit is a word and a corresponding part of speech is an adjective, determining a grammatical relation between the word and another word in the text to be processed, and assuming that a grammatical relation between the word and an adjacent subsequent word is: the parent-child relationship is NP- > JJ + NN, which means that the noun phrase is composed of adjectives (JJ) and nouns (NN), so that the word with the part of speech being an adjective can be determined as a target text unit, and the target text unit in the text to be processed can be deleted under the following operation of the user on the text to be processed, so as to generate the target text.
Therefore, in the embodiment of the disclosure, the grammatical relation between different words or phrases of the text to be processed is adopted for constraint, and the original grammatical relation is not damaged, so that the result of generating the target text conforms to the grammatical specification when the text to be processed is subjected to the following operation.
S3: acquiring a word document corresponding table and a candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and advertisement information associated with the candidate sentences.
The advertisement information may include at least one of text, title, author, abstract text, and link corresponding to the advertisement.
Wherein the text is the character content of the advertisement; the title is the name of the advertisement; the author is a publisher of the advertisement; the abstract text is an abstract generated according to the character content of the advertisement or is a part of the character content of the advertisement; the link is a quick access link of the advertisement, and the specific content of the advertisement can be skipped to and quickly accessed by clicking the link.
As shown in fig. 3, in some embodiments, the above S3 of the embodiments of the present disclosure may include the following steps:
s31: acquiring advertisement corpus data; the advertisement corpus data comprises at least one of a text advertisement, a picture advertisement and a video advertisement.
In the embodiment of the disclosure, the advertisement corpus data can be captured from the network through a crawler tool, or can be independently released and acquired through an advertiser.
It will be appreciated that there may be many types of advertisements that are crawled or obtained from the network for the advertiser's publication, such as: text advertisements, picture advertisements, video advertisements, audio advertisements, etc.
In the embodiment of the present disclosure, the obtained advertisement corpus data includes one or more of a text advertisement, a picture advertisement and a video advertisement.
S32: and acquiring advertisement texts and links of the text advertisements, the picture advertisements and the video advertisements.
In the embodiment of the disclosure, corresponding links can be obtained simultaneously when the text advertisements, the picture advertisements and the video advertisements issued by the advertisers are captured or obtained from the network, and users can quickly access the text advertisements, the picture advertisements and the video advertisements through the links.
The advertisement text of the text advertisement is obtained, and it can be understood that the text advertisement includes some text contents, and the text contents in the text advertisement are obtained to obtain the advertisement text of the text advertisement.
The advertisement text of the picture advertisement is obtained, and it can be understood that the picture advertisement includes an image, and the advertisement text of the picture advertisement is obtained according to the image in the picture advertisement. In the embodiment of the disclosure, the image information in the picture advertisement is identified to generate a section of descriptive words, so that the advertisement text in the picture advertisement can be obtained.
The advertisement text of the video advertisement is obtained, and it can be understood that the video advertisement includes an image and/or an audio, and the advertisement text of the video advertisement is obtained according to the image and/or the audio in the video advertisement.
In the embodiment of the disclosure, the corresponding text information is obtained by performing voice recognition on the audio in the video advertisement, so that the advertisement text in the video advertisement can be obtained; by identifying the images in the video advertisements, a segment of descriptive words is generated, and advertisement texts in the video advertisements can be obtained.
Of course, in the embodiment of the present disclosure, the advertisement text of the video advertisement may also be directly obtained according to the video advertisement, which is not limited to the above embodiment obtained by the method of audio recognition and/or image recognition, and the video advertisement may also be directly input into the video description model to directly generate the advertisement text, for example: template-based Video Caption; the attention mechanism is added on the basis of a Sequence-to-Sequence (Sequence) model, and the attention mechanism distinguishes importance of certain expression (presentation)/feature (feature) weights, which may be specifically referred to methods in the related art, and is not described herein again.
It is understood that the video advertisement includes multiple frames of images, and the amount of computation is huge if the multiple frames of images in the video advertisement are all identified. In the embodiment of the disclosure, the image in the video advertisement is obtained, and the image of a specific frame in the video advertisement can be obtained. Based on this, the acquired image of the specific frame is recognized to reduce the amount of calculation.
In one example, images of particular frames in a video advertisement are acquired at intervals of a preset number of frames, which may be 20 frames, 10 frames, etc. Based on the method, the images of a part of frames in the video advertisement are obtained for subsequent identification, so that the calculated amount can be reduced, the data processing efficiency is improved, and the system performance is improved.
In another example, the at least one particular frame image in the video advertisement is identified based on an image optical flow method, which may be a pyramid-free lucas-kanade optical flow method or a pyramid lucas-kanade optical flow method.
The method comprises the following steps: feature point extraction is carried out on frame images of the video advertisements, optical flow tracking calculation of the feature points is carried out, optical flow parallax change of the feature points between the frame images and tracking matching conditions of front and rear feature points are obtained, and when the change of the feature points of a current frame image is smaller than that of a previous frame image and the change of feature points of existing continuous frames of images is smaller, the current frame image is selected as a specific frame image. Based on the method, the images of a part of frames in the video advertisement are obtained for subsequent identification, so that the calculated amount can be reduced, the data processing efficiency is improved, and the system performance is improved.
In some embodiments, obtaining advertisement text for picture advertisements and video advertisements includes: acquiring images in picture advertisements and video advertisements; and inputting the image into an image description model to generate advertisement text.
In the embodiment of the disclosure, the images in the picture advertisement and the video advertisement are acquired, and the images are input into the classification model or the image description model, so that the advertisement text can be generated.
Wherein, the image description model can be img2txt model. The img2txt model can automatically generate a piece of descriptive text according to the image, and the process can be as follows: firstly, detecting objects (including the types and positions of the objects) in the image, simultaneously outputting the interrelation among the objects, and finally expressing the interrelation by using a reasonable language.
In some embodiments, inputting the image to an image description model, generating advertisement text, comprises: inputting the image into an encoder, acquiring the category and the position of a target object through a target detection model, and generating a feature vector; the feature vectors are input to a decoder to generate advertisement text.
In the embodiment of the disclosure, an image is input to an Encoder, a target object in the image is identified by a detection model to obtain a corresponding vector, the vector is further input to a Decoder, and the vector is mapped into a corresponding character.
The method comprises the steps that an Encoder uses a detection model as a CNN model, corresponding visual features are extracted from images, then the visual features are decoded into an output sequence by the Decoder, word embedding is used as part of the Decoder, the output is the probability of all words in a word list, corresponding description of natural language is generated, and advertisement texts are generated.
In the embodiment of the present disclosure, the basic structure of the CNN model includes two layers, one of which is a feature extraction layer, and the input of each neuron is connected to the local acceptance domain of the previous layer, and extracts the feature of the local acceptance domain. Once the local feature is extracted, the position relation between the local feature and other features is determined; the other is a feature mapping layer, each calculation layer of the network is composed of a plurality of feature mappings, each feature mapping is a plane, and the weights of all neurons on the plane are equal. And a sigmoid function is adopted as an activation function, so that the feature mapping has displacement invariance. Because the neurons share the weight, the number of network parameters is reduced. Typical CNN frameworks are e.g., LeNet-5, AlexNet, VGG-16, ResNeXt-50, etc.
S33: and inputting the advertisement text into the abstract generation model to generate an abstract text.
It can be understood that after the advertisement texts of the text advertisements, the picture advertisements and the video advertisements are obtained, the content of the texts included in the advertisement texts is more, and if the obtained advertisement texts are directly provided for the user, firstly, the user may not obtain the key points of the content from a large amount of text contents, which results in lower interest of the user in browsing the advertisement texts; secondly, a large amount of text content is provided for the user, and the number of advertisement texts which can be provided for the user is reduced due to more content, so that the user is inconvenient to select.
Based on this, in the embodiment of the present disclosure, only a part of the content of the advertisement text may be provided to the user, for example, the title, the first segment of text, the abstract text, and the like of the advertisement text may be provided to the user.
In the embodiment of the disclosure, the advertisement text is input to the abstract generation model, so as to obtain the abstract text of the advertisement text through the abstract generation model. The purpose of generating the abstract text according to the advertisement text is to summarize the input advertisement text and generate an accurate and concise abstract text thereof. There are two ways to generate abstract text, one is an extraction abstract, and the other is an abstract. The abstract is not simply a segment of the pasted characters copied from the input text, but a new word or important summary information is generated, so that the output abstract text is kept smooth and complete.
Illustratively, the abstract generation model may be, for example: a transform model. the transformer model is a deep learning model completely based on a self-attention mechanism, is suitable for parallelization calculation, and mainly comprises two parts: encoders and Decoders, Encoders being the Encoder and Decoders being the Decoder. After the advertisement text is input, the data of the advertisement text is firstly encoded by the Encoders, then the encoded data is transmitted to the Decoders module for decoding, a translated text is obtained after decoding, and the abstract text is generated.
S34: and generating a word document corresponding table and a candidate sentence library according to the advertisement text, the abstract text and the link.
In the embodiment of the disclosure, after the advertisement text, the abstract text and the link are obtained, a word document corresponding table and a candidate sentence library are generated according to the advertisement text, the abstract text and the link. The word document corresponding table comprises a plurality of candidate words, abstract texts and links associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences, abstract texts and links associated with the candidate sentences.
In some embodiments, generating a word document correspondence table from the advertisement text, the summary text, and the links includes: respectively carrying out word segmentation, duplication removal and stop word removal on the advertisement text to obtain candidate words; and establishing an inverted index of the candidate words, the abstract text and the links, and generating a word document corresponding table.
It can be understood that the advertisement text includes many text contents, including a plurality of sentences, the sentences are subjected to word segmentation processing to generate a word set, further the duplication elimination and the stop words are removed, repeated words and stopped words in the word set are removed, the word set is filtered to generate a plurality of candidate words.
Of course, the method for processing the advertisement text to obtain the candidate words may also include other methods besides the above method, and in order to make the obtained candidate words more reasonable, the advertisement text may also be further processed, which is not specifically limited in the embodiment of the present disclosure.
In the embodiment of the disclosure, after the candidate words of the advertisement text are obtained, the inverted indexes of the candidate words, the abstract text and the links are established, and a word document corresponding table is generated.
In the embodiment of the disclosure, in order to distinguish different advertisement texts, the advertisement texts are numbered, and the numbers of the advertisement texts correspond to the corresponding word advertisements, picture advertisements and video advertisements one by one. In the embodiment of the disclosure, the numbers of the text advertisements, the picture advertisements and the video advertisements are unified into the document number. And acquiring candidate words according to the advertisement text, numbering the candidate words, and unifying the candidate words into word numbers.
In the embodiment of the disclosure, an inverted index of candidate words, abstract texts and links is established, an inverted list records a document list of all documents in which a certain candidate word appears and position information of the word appearing in the document, and each record is called as an inverted item (nesting). From the posting list, it can be known which documents contain a certain term.
Illustratively, when the total number of the word advertisements, the picture advertisements and the video advertisements is 10, firstly, acquiring advertisement texts of the word advertisements, the picture advertisements and the video advertisements, including 10 advertisement texts, numbering each advertisement text respectively, and acquiring a document number; and then, acquiring candidate words in each advertisement text, and for convenient subsequent processing of the system, giving a unique word number to each different candidate word, recording which documents contain the word, and obtaining an inverted index after the processing is finished.
In the embodiment of the disclosure, on the basis of obtaining the to-be-ranked indexes of the candidate words and the advertisement texts, links are added corresponding to the advertisement texts, and a word document corresponding table is generated.
In some embodiments, generating the library of candidate sentences from the advertisement text, the abstract text and the links includes: dividing the advertisement text into sentences to obtain candidate sentences; and establishing a corresponding relation between the candidate sentences and the abstract text and the link to generate a candidate sentence library.
It will be appreciated that the advertisement text includes a plurality of text contents, including a plurality of sentences, and that the advertisement text is preprocessed to generate a plurality of candidate sentences.
The method for preprocessing the advertisement text comprises the following steps: and deleting the mark symbols in the advertisement text, then carrying out segmentation treatment, removing overlength or overlength sentences, and selecting the sentences with the vocabulary quantity in a certain interval as candidate sentences.
Illustratively, sentences having a vocabulary number of between 10 and 35 are selected as candidate sentences.
In the embodiment of the disclosure, after the candidate sentences of the advertisement text are acquired, the corresponding relation between the candidate sentences and the abstract text and the link is established, and the candidate sentence library is generated.
In the embodiment of the disclosure, in order to distinguish different advertisement texts, the advertisement texts are numbered, and the numbers of the advertisement texts correspond to the corresponding character advertisements, picture advertisements and video advertisements one by one. In the embodiment of the disclosure, the numbers of the text advertisements, the picture advertisements and the video advertisements are unified into the document number. And acquiring candidate sentences according to the advertisement text, numbering the candidate sentences, and unifying the candidate sentences into sentence numbers.
In the embodiment of the disclosure, the corresponding relationship between the candidate sentences and the abstract text and the link is established, and the document list of all documents including a certain candidate sentence and the position information of the candidate sentence appearing in the document can be obtained according to the corresponding relationship.
Illustratively, when the total number of the word advertisements, the picture advertisements and the video advertisements is 10, firstly, acquiring advertisement texts of the word advertisements, the picture advertisements and the video advertisements, including 10 advertisement texts, numbering each advertisement text respectively, and acquiring a document number; and then, acquiring candidate sentences in each advertisement text, wherein for convenient subsequent processing of the system, each different candidate sentence needs to be endowed with a unique word number, and meanwhile, which documents contain the candidate sentence are recorded, and after the processing is finished, the corresponding relation between the candidate sentences and the document numbers of the advertisement text is obtained.
In the embodiment of the disclosure, on the basis of obtaining the corresponding relationship between the candidate sentences and the document numbers of the advertisement texts, links are added corresponding to the advertisement texts to generate a candidate sentence library.
S4: and acquiring first target advertisement information according to the target text unit and the word document corresponding table, and acquiring second target advertisement information according to the target text and the candidate sentence library.
In the embodiment of the disclosure, on the basis of acquiring a target text unit and a target text after a user performs a context operation on a text to be processed, first target advertisement information is acquired according to the target text unit and a word document correspondence table, and second target advertisement information is acquired according to the target text and a candidate sentence library.
It is understood that the word document correspondence table includes a plurality of candidate words, and advertisement information corresponding to the candidate words, and the advertisement information may include at least one of text, title, author, abstract text, and link corresponding to the advertisement. In the embodiment of the disclosure, a user performs context operation on a text to be processed, may obtain one or more target text units, and further obtains first target advertisement information according to the target text units and the word document correspondence table.
It is further understood that the candidate sentence library includes a plurality of candidate sentences and advertisement information corresponding to the candidate sentences, and the advertisement information may include at least one of text, title, author, abstract text and link corresponding to the advertisement. In the embodiment of the present disclosure, the user performs context operation on the text to be processed, may obtain the target text, and further obtains the second target advertisement information according to the target text and the candidate sentence library.
S5: the user is provided with target text and/or target text units, and first target advertisement information and/or second target advertisement information.
In the embodiment of the disclosure, the target text and the first target advertisement information are provided to the user when the target text and the first target advertisement information are acquired, or the target text and the second target advertisement information are provided to the user when the target text and the second target advertisement information are acquired, or the target text, the first target advertisement information and the second target advertisement information are provided to the user when the target text, the first target advertisement information and the second target advertisement information are acquired.
In the embodiment of the present disclosure, the target text and/or the target text unit and the first target advertisement information and/or the second target advertisement information may be provided to the user by displaying the target text and/or the target text unit and the first target advertisement information and/or the second target advertisement information on the display part of the contextual online advertisement delivery apparatus.
It is to be appreciated that in embodiments of the present disclosure, the target text unit and/or the target text may be provided to the user and may be accompanied by a corresponding interpretation of the target text and/or the target text unit.
Illustratively, taking the text to be processed as english text as an example, the corresponding interpretation of the target text unit is provided, for example: the text to be processed is "blue sky", the target text unit is the adjective "blue" before the noun "sky", and the explanation may be that the part of speech of the target text unit "blue" is an adjective used for modifying the noun "sky".
Furthermore, similar words, such as "cerulean", of the target text unit "blue" can be provided, so that the user can learn more words, and related learning of synonyms or words close to each other can be achieved, and the learning experience of the user is improved.
It is to be understood that, in the embodiments of the present disclosure, translation and speech of the target text and the target text unit may be further provided, and the user may learn the translated text and pronunciation synchronously.
In some embodiments, the contextual online advertisement delivery method provided by the embodiments of the present disclosure further includes: inputting the target text into a grammar analysis model, and providing the target text for a user under the condition that a matched grammar structure exists; in the absence of a matching grammar structure, a context operation error is prompted and exited.
In the embodiment of the disclosure, when a user performs context operation on a text to be processed to generate a target text, the target text needs to be input to a syntax analysis model to determine whether the generated target text can be subjected to semantic analysis or not and whether a matched syntax structure exists or not, when the matched syntax structure exists, the target text is provided for the user, and when the matched syntax structure does not exist, a context operation error is prompted and the user exits. Therefore, the obtained target text can be ensured to conform to the specification of the grammatical structure, and the complete meaning can be expressed, so that the phenomenon that the obtained target text does not conform to the language specification and misguides the user to learn is avoided.
From this, the user can carry out the context operation to the text of treating, the context operation has realized that the text is from exchanging the letter frequently, by exchanging complicated two-way operation, convenience of customers establishes the global view training speech sense of language structure, deepen understanding and understanding to the text structure, reduce the degree of difficulty of language learning, furthermore, in the in-process of studying, can provide the user with the relevant advertising information of study text, on the one hand, the probability that the user browses the advertisement is higher, can improve the click rate of advertisement, on the other hand, the user can deepen the understanding to the text content of study through the advertisement, enrich relevant knowledge, conveniently carry out language learning.
As shown in fig. 4, in some embodiments, the above S2 of the embodiments of the present disclosure may include the following steps:
s21: and responding to the following operation of the user on the text to be processed, inputting the text to be processed into the grammar analysis model, and acquiring a target grammar structure matched with the text to be processed.
It can be understood that, in the embodiment of the present disclosure, before inputting the text to be processed into the parsing model and obtaining the target grammar structure matched with the text to be processed, obtaining the parsing model is further included.
In some embodiments, obtaining the parsing model comprises: obtaining a corpus text; inputting the corpus text into a syntactic component analysis model based on component analysis to generate a syntactic analysis tree; parsing the syntax analysis tree from bottom to top to generate a table structure to obtain a syntax analysis tree library; wherein, the syntax analysis tree library comprises a plurality of corpus text units; the table structure comprises the relationship of parent and child nodes and the relationship of brother nodes; and giving weight to the corpus text unit to generate a syntactic analysis model.
In the embodiment of the present disclosure, the corpus text may be obtained through a public article, and the corpus text is obtained by preprocessing the article. Wherein, the article is preprocessed, which comprises the following steps: deleting the mark symbols in the article, then carrying out segmentation processing, removing overlength or overlength sentences, and selecting the sentences with the vocabulary quantity in a certain interval as the corpus text.
Illustratively, sentences with a vocabulary number between 10 and 35 are selected as corpus texts.
Of course, the corpus text obtained in the embodiment of the present disclosure is not limited to the above example, and may be set according to needs, which is not specifically limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, taking a corpus text as an example of an english text, the corpus text is input to a syntactic component analysis model based on component analysis, for example, in a case that the corpus text is "the medical imaging technology currently has a mass signature in human elementary domains", a syntactic analysis tree is generated as shown in fig. 5, and leaf nodes are words in a sentence; other non-leaf nodes are parts of speech of words and phrase components formed by the words, and the characteristics of the syntactic parse tree are that components close to the root are core components of the sentence, and components close to the leaf nodes are non-core components.
In the embodiment of the present disclosure, after the parsing tree corresponding to the corpus text is obtained, a parsing tree library is obtained. The grammar analysis tree library comprises a plurality of grammar analysis trees generated by the language material texts, and comprises a plurality of language material text units, wherein the language material text units are different nodes of the grammar analysis trees. After weighting the units of text of the material, a parsing model is generated.
In a possible implementation manner, in the embodiment of the present disclosure, the corpus text unit is weighted, and in order to sort the corpus text unit, a corresponding table is generated by a syntax analysis tree, so that the corpus text unit is weighted conveniently.
TABLE 1
In the embodiment of the present disclosure, the english text is taken as an example, and the language tag set of the bingo library is used as the tag used in the english grammar parsing. TreeBank is a large corpus of labeled syntactic and semantic sentence structures, usually in the form of trees, and is therefore called TreeBank (tree bank).
The parse tree representation employs () parenthesized nesting because it takes up little resources and the tree structure is relatively easy to read without software tools. When a sentence is given, the grammar can be parsed in left-to-right order. For example, the sentence dog run may be represented as (S (NP (DT the) or (NN dog)) (VP run)). The labeling specifications are shown in table 1 above. It should be noted that the above examples are only a part of examples, and not all examples are listed, and specifically, reference may be made to the language markup set of the bingo library.
TABLE 2
Illustratively, the corpus text is "image classification and object detection applications are area following more than one node and more than one node, a syntax analysis tree is generated, the syntax analysis tree is parsed from bottom to top, a table structure is generated through conversion according to a tree structure, and a corresponding table structure is generated as shown in table 2 above.
It can be understood that, in the embodiment of the present disclosure, there are a plurality of corpus texts, and after the above-mentioned processing is performed on the plurality of corpus texts, a corresponding table structure is generated, and a weight is given to a unit of the corpus text, so as to generate a parsing model.
In the embodiment of the present disclosure, in the parsing model, symbols and expressions are described:
1) NP- > DT + JJ + NN: the representation NP is generated (resolved) as DT and JJ and NN.
2) JJ ∈ (NP- > DT + JJ + NN, NP- > JJ + NN): represents that JJ matches NP- > DT + JJ + NN and NP- > JJ + NN.
3) JJ ∈ (NP- > DT + JJ + NN, NP- > JJ + NN) & (ORDER (1))): represents that JJ matches NP- > DT + JJ + NN, NP- > JJ + NN, with a weight level of 1.
4) JJ e ((NP- > DT + JJ + NN, NP- > JJ + NN) & (ORDER (1)))/JJ: represents that JJ matches NP- > DT + JJ + NN, NP- > JJ + NN, while statements with a weight level of 1 account for the percentage of all JJ records.
According to the symbol and expression convention, the proportion of the following matching structures is counted:
JJ∈((NP->DT+JJ+NN,NP->JJ+NN)&(ORDER(1)))/JJ;
RB∈((ADVP->RB)&(ORDER(2)))/RB;
PP∈((VP->VBN+NP+PP)&(ORDER(3)))/PP;…。
according to the structure, the database for generating the corresponding table is subjected to statistical analysis to generate a grammar analysis model:
Model={JJ∈(NP->DT+JJ+NN,NP->JJ+NN)&(ORDER(1)))/JJ,...,}。
therefore, the text to be processed is input into the grammar analysis model on the basis of obtaining the grammar analysis model, and the target grammar structure matched with the text to be processed can be obtained.
S22: and acquiring the weight grades corresponding to a plurality of text units in the text to be processed according to the target grammar structure.
S23: in a case where the weighting levels include at least two levels, a first target text unit of the plurality of text units is determined.
In the embodiment of the disclosure, after the text to be processed is input to the grammar analysis model and the target grammar structure matched with the text to be processed is obtained, a plurality of text units corresponding to the text to be processed and the weight levels corresponding to the text units can be obtained. Thereby enabling determination of a first target text unit of the plurality of text units based on the determined weight rank of the text unit.
It can be understood that, in the case that there is only one level for obtaining the weighting level of the text to be processed, the user performs the following operation, and since there is only one level, it is described that the text to be processed is already the text with the most basic structure, and the user cannot perform the following operation, at this time, the user cannot obtain the target text unit even though performing the following operation.
When the weight grades of the acquired texts to be processed are multiple, the user performs the following operation on the texts to be processed each time, and the text unit with the lowest grade can be determined as the first target text unit.
S24: and deleting a first target text unit in the text to be processed to generate a target simplified text.
S25: and acquiring a first target text unit which is a target text unit, and acquiring a target simplified text which is a target text.
In the embodiment of the disclosure, under the condition that the first target text unit is determined, the first target text unit in the text to be processed is deleted, and the target simplified text is generated.
It should be noted that, in the case that the weight level of the text to be processed is multiple, for example, in the case that the weight level is 3 levels, the user may perform a plurality of text operations, in the first text operation, it is determined that the first target text unit is a text unit at a third level, in the second text operation, it is determined that the first target text unit is a text unit at a second level, and at this time, if the user continues the text operation, the first target text unit may not be obtained.
Based on this, when the user performs the following operation each time, the first target text unit is deleted from the text to be processed, so as to generate the target simplified text, and in the same way, under the condition that the first target text unit cannot be obtained, the text units in the text to be processed form the target simplified text with the most basic structure.
It can be understood that, in the embodiment of the present disclosure, the text to be processed is an english text as an example, and the target simplified text of the most basic structure is five basic sentences of english.
Illustratively, the five basic sentence patterns are as follows:
s + V major-minor structure; in this sentence, V is a missing verb, also called autograph (vi).
An S + V + F primary system table structure; in this sentence pattern, V is a verb, and common verb systems include: look, seem, apear, sound, feel, taste, smell, grow, get, fall ill/asleep, stand/site still, become, turn, etc.
S + V + O major-minor structure; in this sentence, V is the transitive verb (vt.), and therefore there is an object.
The S + V + O1+ O2 is a double guest structure; in this sentence, V is a transitive verb with two objects. Common verbs with two objects include give, ask, sting, offer, send, pay, lend, show, tell, buy, get; rob, war, etc.
The S + V + O + C main-minor Bingbu structure.
Wherein, S is the subject; v is predicate; p is a table language; o is an object; o1 ═ indirect object; o2 ═ direct object; c ═ object complement.
Of course, similar concepts may be employed in other texts than the english text, and the embodiments of the present disclosure are not particularly limited thereto.
In some embodiments, in the case where the weighting level has only one level, it is determined that the first target text unit does not exist, and the text to be processed is prompted as the most basic structure text and exits.
It can be understood that, when the text to be processed is input into the parsing model, the target grammar structure matched with the text to be processed is obtained, the weight levels corresponding to the plurality of text units included in the text to be processed are determined according to the target grammar structure, and in the case that only one weight level exists, it is determined that the first target text unit does not exist, and in this case, the text to be processed is prompted to be the most basic structure text and exits.
Taking the example that the text to be processed is an english text, under the condition that the text to be processed is five basic sentence patterns of english, it is determined that the first target text unit does not exist in the text to be processed, and at this time, it is prompted that the text to be processed is the most basic structure text and exits.
As shown in fig. 6, in some embodiments, the above S2 of the embodiments of the present disclosure may include the following steps:
s201: acquiring a restricted vocabulary; wherein, the restriction vocabulary comprises a plurality of restriction words.
S202: and responding to a first upper operation of a user on the text to be processed, inputting the text to be processed into the text generation model, acquiring at least one editing operation according to the limited vocabulary, and generating a target generation text.
S203: and determining text units in the target generation text and the text to be processed, which are different, as second target text units.
And responding to the above operation of the user on the text to be processed, inputting the text to be processed into the text generation model, and generating a second target text unit and a target generation text.
S204: and acquiring a second target text unit which is a target text unit, and acquiring a target generation text which is a target text.
The text generation model can be a lasertager model, the text to be processed is input into the lasertager model, and a series of editing operations are generated to replace text units in the text to be processed to generate the text which is more consistent with the application scene. The 4 editing operations used are: retention (copy a unit of text to output), deletion (delete a unit of text), addition (add a unit of text), and exchange (exchange the order of two units of text).
The added text units are all from a restricted vocabulary, the vocabulary scale can be minimized and the training sample number can be maximized by restricting the vocabulary, and only necessary text units which need to be added to the text to be processed are included; where the text units may be words or phrases.
Limiting the number of text elements in the vocabulary may reduce the amount of corresponding output decisions and prevent the model from adding text elements at will. Only a part of the text units need to be modified since the input and output text are highly overlapping. The method can predict and edit operation accurately in parallel, and obviously improve the speed of generating the text end to end.
In the embodiment of the disclosure, the restricted vocabulary can be constructed based on a specific field, a specific direction, or the like, so that when a user performs a first above operation on a text to be processed, a second target text unit can be purposefully and pointedly obtained to obtain a target generated text. And when the first target advertisement information is acquired based on the second target text unit and the second target advertisement information is acquired based on the target generation text, the acquired advertisement information can be associated with a specific field or a specific direction, corresponding advertisement information is provided for a user, and the method and the device can be better applied to advertisement promotion.
In some embodiments, a first number of text units included in the target generation text is obtained; and under the condition that the first number is larger than a first preset threshold, responding to a first upper operation of the user on the text to be processed, prompting that the generated text reaches an upper limit and exiting.
It can be understood that, in the embodiment of the present disclosure, the user may perform the first above operation multiple times, and as the target generation text is generated multiple times, the number of text units included in the obtained target generation text also increases, and the number of text units included is greater, the time required by the system to perform data processing inevitably increases, and the calculation efficiency inevitably decreases.
Based on this, in the embodiment of the present disclosure, statistics is performed on text unit data included in the target generated text, a first number of text units included in the target generated text is obtained, and if there is a first above operation of the user in the case that the first number is greater than a first preset threshold, the generated text is prompted to reach an upper limit and exit.
The first preset threshold may be 100, 80, or 50, and the like, and may be set according to the computing power of the server used by the system and the network bandwidth, which are not specifically limited in the embodiment of the present disclosure.
As shown in fig. 7, in some embodiments, the above S2 of the embodiments of the present disclosure may include the following steps:
s2001: and in response to a second previous operation of the user on the text to be processed, dividing the text to be processed into at least one text unit sequence according to a preset condition.
In the embodiment of the disclosure, on the basis of the to-be-processed text, in response to a second previous operation of the user on the to-be-processed text, a text unit is added in the to-be-processed text to enrich the to-be-processed text, so that the to-be-processed text is convenient for the user to learn, and the use experience of the user is improved.
The preset condition may be that adjacent preset number of text units are sequentially divided into a text unit sequence. The units of text may be words or phrases.
For example, the preset number may be two, or may be four, or may also be six, and the like, and the embodiment of the present disclosure does not specifically limit this.
In one possible implementation manner, the text to be processed is an english text, for example, the text to be processed is: "size are elementary for a model".
Starting with the sliding window from the beginning of the sentence, every 2 or 4 predictions are made as a sequence of text units, here the example uses 4 words. (this parameter can be set according to a system training model).
Window marking schematic: the first sequence of text units generated by the first sliding window is "size are for", the second sequence of text units generated by the second sliding window is "are for a", and the third sequence of text units generated by the third sliding window is "import for a model".
S2002: and inputting the text unit sequence into the trained word vector model, and predicting to obtain a third target text unit.
In the embodiment of the present disclosure, the trained word vector model may be a trained Distributed Representation coding model. Sequentially inputting the text unit sequence to the trained word vector model, and predicting to obtain a corresponding third target text unit, as an example, as shown in table 3 below:
previous2 | previous1 | next1 | next2 | out |
second of preamble | First of preamble | First of all | The second after | Output of |
Sample | size | are | important | Is free of |
size | are | important | for | very |
are | important | for | a | Is free of |
import | for | a | model | Is free of |
for | a | model | learning |
TABLE 3
The third target text unit is the text unit of out/output column in table 3 above.
S2003: and traversing the text to be processed, and determining a first reserved position in the text to be processed corresponding to the third target text unit.
In the embodiment of the disclosure, the text to be processed is traversed, and the first reserved position in the text to be processed corresponding to the third target text unit is obtained.
S2004: and adding the third target text unit to the first reserved position of the text to be processed to generate a target newly added text.
S2005: and acquiring a third target text unit which is a target text unit, and acquiring a target newly added text which is the target text.
In the embodiment of the disclosure, in response to the first and second previous operations of the user, a target newly added text is generated: "Sample size area change import for a learning model". Wherein "very" and "learning" are the third target text units.
On the basis of the first and second operations, responding to the second operation of the user, continuing to use the above process to obtain a text unit sequence, sequentially inputting the text unit sequence to the trained word vector model, and predicting to obtain a third target text unit, as shown in table 4 below for example:
previous2 | previous1 | next1 | next2 | out |
second of preamble | First of preamble | The first one after | Subsequent second one | Output the output |
Sample | size | are | very | Is composed of |
… | … | … | … | Is composed of |
for | a | learning | a | machine |
a | learning | model | Is composed of |
TABLE 4
And responding to the second previous operation of the user for the second time, and generating a target newly added text: "sample size area version import for a machine learning model", which is the third target text unit, is generated on the basis of the previous time.
It should be noted that the above example is only used as an illustration, and in the embodiment of the present disclosure, the user may also perform the second above operation multiple times, which is not specifically limited by the embodiment of the present disclosure.
Based on the above, in the embodiment of the disclosure, on the basis of not changing the original syntax semantics, in response to the second previous operation of the user on the text to be processed, the text is added on the basis of the text to be processed, and the vocabulary of the user can be enriched.
In some embodiments, a second number of text units included in the target newly added text is obtained; and under the condition that the second number is larger than a second preset threshold, responding to a second previous operation of the user, prompting that the newly added text reaches the upper limit and exiting.
It can be understood that, in the embodiment of the present disclosure, the user may perform the second previous operation multiple times, and as the second previous operation multiple times, the number of text units included in the obtained target newly-added text also increases, the number of text units included in the target newly-added text is larger, the time required by the system to perform data processing inevitably increases, and the calculation efficiency inevitably decreases.
Based on this, in the embodiment of the present disclosure, the data of the text units included in the target newly added text is counted, the second number of the text units included in the target newly added text is obtained, and if the second number is greater than the second preset threshold, if there is a second previous operation of the user, the newly added text is prompted to reach the upper limit and exit.
The second preset threshold may be 100, 80, 50, or the like, and may be set according to the server power used by the system and the network bandwidth, which are not specifically limited in the embodiment of the present disclosure.
In some embodiments, the second preset threshold is equal to the first preset threshold.
As shown in fig. 8, in some embodiments, the above S4 of the embodiments of the present disclosure may include the following steps:
s41: and inputting the target text unit into the trained word vector model to generate a target word vector.
In the embodiment of the present disclosure, the trained word vector model may be a trained Distributed Representation coding model, and the target text unit is input to the trained word vector model, so that the target word vector can be generated.
S42: and calculating the similarity between the target word vector and the candidate word vector generated by the candidate words in the word document corresponding table.
In the embodiment of the present disclosure, candidate words are input to the trained word vector model, and a candidate word vector can be generated.
And the candidate words are multiple, multiple candidate word vectors can be obtained, and the similarity between the target word vector of the target text unit and each candidate word vector is calculated in sequence.
S43: and according to the similarity, determining the advertisement information associated with the candidate word with the maximum similarity of the target word vector as first target advertisement information.
In the embodiment of the disclosure, under the condition that the similarity between the target word vector of the target text unit and each candidate word vector is obtained, one candidate word vector with the maximum similarity can be determined according to the similarity, the advertisement information associated with the candidate word vector with the maximum similarity can be determined according to the word document correspondence table, and then the advertisement information associated with the candidate word vector with the maximum similarity is determined to be the first target advertisement information.
In some embodiments, in the case of obtaining a plurality of target text units, obtaining first target advertisement information according to the target text units and the word document look-up table includes: and traversing the plurality of target text units, acquiring the target text units with the word attributes being nouns or adjectives, matching the target text units with the candidate words in the word document comparison table, and acquiring first target advertisement information.
It can be understood that, in general, the contents of an advertisement relate to more things, and a related introduction is performed for a certain thing, it is conceivable that the most contents included in the advertisement are words whose word attributes are nouns or adjectives, and targeted advertisement information can be preferentially acquired by screening a plurality of acquired target text units whose word attributes are nouns or adjectives, so that the acquired first target advertisement information is prevented from being disordered, and the click rate of the advertisement can be improved.
In some embodiments, the contextual online advertisement delivery method provided in the embodiments of the present disclosure further includes: obtaining a trained word vector model, wherein the method comprises the following steps: acquiring a training data set; and inputting the training data set into the word vector model, and training the word vector model to generate a trained word vector model.
In the embodiment of the present disclosure, taking an english text as an example, a training data set is obtained, a corpus may be an english novel in a text format of a public version, a sentence in the english novel is subjected to word segmentation, and the training data set is generated through a sliding window (a window length may be set, exemplarily set as a target word, and two words adjacent to each other in front and back, totaling four adjacent words) on the basis of word segmentation.
It should be noted that the window length may be set, and the window length may also be 3, to obtain the target word and a word adjacent to each other before and after the target word, to sum up two adjacent words, to generate the training data set. Alternatively, the window length may be 7, etc., and may be set as necessary.
In one possible implementation, a training data set is obtained, the training data set is input to a word vector model, and a method for training the word vector model is as follows:
example sentence: the technology currently has a macro peptide signature in human antigens. Traversing the whole sentence through a sliding window, for example, setting the length of the sliding window to 5, the first two words and the last two words of each word are used as input, and the output is the target word.
Example sentence generated training data set, as shown in table 5 below:
previous2 | previous1 | next1 | next2 | out |
second of preamble | First of preamble | The first one after | The second after | Output of |
/ | / | technology | currently | the |
/ | the | currently | has | technology |
the | technology | has | made | currently |
technology | currently | made | significant | has |
currently | has | significant | progress | made |
has | made | progress | in | significant |
made | significant | in | many | progress |
significant | progress | many | important | in |
progress | in | important | domains | many |
in | many | domains | / | important |
many | important | / | / | domains |
TABLE 5
In this embodiment of the present disclosure, the word vector model may be a Distributed reconstruction coding model, and after the training data set is obtained, the training data set is sequentially input to the word vector model Distributed reconstruction coding model, and the word vector model is trained to generate a trained word vector model.
As shown in fig. 9, in some embodiments, the above S4 of the embodiments of the present disclosure may further include the following steps:
s401: and inputting the target text into the statement vector model to generate a target text vector.
The statement vector model can be a doc2vec model, a Bag of Words model, a TF-IDF model, a BERT model and the like. Bag of Words (BOW): and constructing a text vector based on the occurrence times of the words in the text, wherein the size of the vector is the size of the word list. The tool that can be used is doc2bow in gensim. TF-IDF: on the basis of the BOW, the vector size is still equal to the vocabulary size, taking into account the importance of each word. A tool that can be used is tfidfmode in gensim. In the embodiment of the disclosure, the target text is input into the sentence vector model, and the target text vector corresponding to the target text can be obtained.
S402: and calculating the similarity between the target text vector and the candidate sentence vector generated by the candidate sentence in the candidate sentence library.
In the embodiment of the present disclosure, the candidate sentences are input to the sentence vector model, and the candidate sentence vectors corresponding to the candidate sentences can be obtained. The candidate sentences can obtain a plurality of candidate sentence vectors, and the similarity between the target text vector of the target text unit and each candidate sentence vector is calculated in sequence.
S403: and according to the similarity, determining the advertisement information associated with the candidate sentence with the maximum similarity of the target text vector as second target advertisement information.
In the embodiment of the disclosure, under the condition that the similarity between the target text vector of the target text and each candidate statement vector is obtained, one candidate statement vector with the maximum similarity can be determined according to the similarity, the advertisement information associated with the candidate statement vector with the maximum similarity can be determined according to the candidate statement library, and then the advertisement information associated with the candidate statement vector with the maximum similarity is determined as the second target advertisement information.
In some embodiments, in the presence of a plurality of first targeted advertising information and/or a plurality of second targeted advertising information, providing the first targeted advertising information and/or the second targeted advertising information to the user comprises: sequencing the plurality of first target advertisement information and/or the plurality of second target advertisement information according to a preset rule; and selecting to provide the first target advertisement information and/or the second target advertisement information with the preset number of the top-ranked first target advertisement information and/or second target advertisement information to the user.
In the embodiment of the present disclosure, in the case where the target text and/or the target text unit and the first target advertisement information and/or the second target advertisement information are displayed by the display part of the contextual online advertisement delivery apparatus, and the target text and/or the target text unit and the first target advertisement information and/or the second target advertisement information are provided to the user, it is conceivable that the content that can be displayed by the display part of the contextual online advertisement delivery apparatus is limited.
Based on this, under the condition that a plurality of first target advertisement information and/or a plurality of second target advertisement information are/is obtained, the plurality of first target advertisement information and/or the plurality of second target advertisement information can be sorted according to a preset rule; and selecting to provide the first target advertisement information and/or the second target advertisement information with the preset number of the top-ranked first target advertisement information and/or second target advertisement information to the user.
The preset rules can be advertisement click quantity, advertisement browsing quantity, random sequencing, advertisement information category sequencing and the like. The preset number may be determined according to the size of the content that can be displayed by the display component of the contextual online advertisement delivery device, which is not specifically limited by the embodiment of the present disclosure.
In the embodiment of the present disclosure, a first target advertisement information and a second target advertisement information, which are ranked in the top by a preset number, are provided to a user, and a recall method is adopted, for example: collaborative filtering, FM (organization machine), FFM (Field-aware organization Machines), graph models, two-tower models, DNN models, Deep Retrieval algorithms, and the like.
It can be understood that the content ranked further up belongs to the content of interest to the user, with the higher degree of association with the text to be processed. In the embodiment of the disclosure, a ranking model of a deep learning algorithm can be used, and a stable level can be achieved through optimizing the model and adjusting parameters, or inputting a large amount of valuable sample data through training.
The results of recalls are sorted by sorting, and top k (k is generally a single digit) results are used as final output of the advertisement recommendation system. The algorithm commonly used in the ranking stage: LR (logistic regression), FM (factorization machine), deepFM, and the like. During the process of using the context operation, the user can browse returned advertisement information, abstract texts, links and the like through recalling and sequencing of the recommendation system.
Fig. 10 is a block diagram illustrating a contextual online advertising device in accordance with an exemplary embodiment.
As shown in fig. 10, the contextual online advertisement delivery apparatus 1 includes: a text acquisition unit 11, an object acquisition unit 12, a data acquisition unit 13, a first information acquisition unit 14, a second information acquisition unit 15, and an information providing unit 16.
A text acquisition unit 11, configured to acquire a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases.
And the target acquiring unit 12 is configured to, in response to a user performing a context operation on the text to be processed, acquire a target text unit and a target text.
A data obtaining unit 13, configured to obtain a word document correspondence table and a candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and advertisement information associated with the candidate sentences.
A first information obtaining unit 14, configured to obtain first target advertisement information according to the target text unit and the word document correspondence table.
And a second information obtaining unit 15, configured to obtain second target advertisement information according to the target text and the candidate sentence library.
And an information providing unit 16 for providing the user with the target text and/or the target text unit, and the first target advertisement information and/or the second target advertisement information.
As shown in fig. 11, in some embodiments, the target obtaining unit 12 includes: a grammar structure obtaining module 121, a weight level obtaining module 122, a first target text unit determining module 123, a target simplified text generating module 124, and a first data obtaining module 125.
And the grammar structure obtaining module 121 is configured to respond to the following operation of the user on the text to be processed, input the text to be processed into the grammar analysis model, and obtain a target grammar structure matched with the text to be processed.
And a weight level obtaining module 122, configured to obtain, according to the target syntax structure, weight levels corresponding to multiple text units in the text to be processed.
A first target text unit determining module 123, configured to determine a first target text unit of the plurality of text units if the weighting levels include at least two levels.
And the target simplified text generation module 124 is configured to delete a first target text unit in the text to be processed, so as to generate a target simplified text.
The first data obtaining module 125 is configured to obtain a first target text unit that is a target text unit, and obtain a target simplified text that is a target text.
As shown in fig. 12, in some embodiments, the object obtaining unit 12 includes: a restricted vocabulary obtaining module 126, a second target data generating module 127, and a first data obtaining module 128.
A restricted vocabulary acquisition module 126 for acquiring a restricted vocabulary; wherein the restricted vocabulary includes a plurality of restricted words.
The second target data generation module 127 is configured to, in response to a first previous operation on the to-be-processed text by the user, input the to-be-processed text into the text generation model, obtain at least one editing operation according to the restricted vocabulary, and generate a target generation text; and acquiring at least one second target text unit of which the target generation text is different from the text to be processed.
The second data obtaining module 128 is configured to obtain a second target text unit that is a target text unit, and obtain a target generation text that is a target text.
As shown in fig. 13, in some embodiments, the object obtaining unit 12 includes: a text unit sequence acquiring module 1201, a third target text unit generating module 1202, a position acquiring module 1203, a target additional text generating module 1204 and a third data acquiring module 1205.
The text unit sequence acquiring module 1201 is configured to, in response to a second previous operation of the user on the text to be processed, divide the text to be processed into at least one text unit sequence according to a preset condition.
And a third target text unit generating module 1202, configured to input the text unit sequence to the trained word vector model, and predict to obtain a third target text unit.
The position obtaining module 1203 is configured to traverse the to-be-processed text, and determine a first reserved position in the to-be-processed text corresponding to the third target text unit.
And a target new text generating module 1204, configured to add the third target text unit to the first reserved location of the to-be-processed text, and generate a target new text.
The third data obtaining module 1205 is configured to obtain a third target text unit that is a target text unit, and obtain a target new text that is a target text.
In some embodiments, the data obtaining unit 13 is specifically configured to obtain advertisement corpus data; the advertisement corpus data comprises at least one of a character advertisement, a picture advertisement and a video advertisement; acquiring advertisement texts and links of character advertisements, picture advertisements and video advertisements; inputting the advertisement text into an abstract generating model to generate an abstract text; and generating a word document corresponding table and a candidate sentence library according to the advertisement text, the abstract text and the link.
In some embodiments, the data acquiring unit 13 is further configured to acquire images in the picture advertisement and the video advertisement; and inputting the image to an image description model to generate advertisement text.
In some embodiments, the data obtaining unit 13 is further configured to input the image to an encoder, obtain the category and the position of the target object through a classification model or a target detection model, and generate a feature vector; the feature vectors are input to a decoder to generate advertisement text.
In some embodiments, the data obtaining unit 13 is further configured to perform word segmentation, duplicate removal, and stop word removal on the advertisement text, respectively, to obtain candidate words; and establishing an inverted index of the candidate words, the abstract text and the links, and generating a word document corresponding table.
In some embodiments, the data obtaining unit 13 is further configured to perform sentence segmentation on the advertisement text to obtain candidate sentences; and establishing a corresponding relation between the candidate sentences and the abstract text and the links to generate a candidate sentence library.
As shown in fig. 14, in some embodiments, the first information obtaining unit 14 includes: a target word vector generating module 141, a first similarity calculating module 142 and a first target advertisement information determining module 143.
And a target word vector generating module 141, configured to input the target text unit to the trained word vector model, and generate a target word vector.
The first similarity calculation module 142 is configured to calculate a similarity between the target word vector and a candidate word vector generated by a candidate word in the word document correspondence table.
And the first target advertisement information determining module 143 is configured to determine, according to the similarity, the advertisement information associated with the candidate word with the largest similarity of the target word vectors as the first target advertisement information.
As shown in fig. 15, in some embodiments, the second information acquiring unit 15 includes: a target text vector generation module 151, a second similarity calculation module 152, and a second target advertisement information determination module 153.
And a target text vector generation module 151, configured to input the target text into the sentence vector model, and generate a target text vector.
And a second similarity calculation module 152, configured to calculate a similarity between the target text vector and a candidate sentence vector generated by a candidate sentence in the candidate sentence library.
And the second target advertisement information determining module 153 is configured to determine, according to the similarity, the advertisement information associated with the candidate sentence with the maximum similarity of the target text vector as the second target advertisement information.
In some embodiments, in the case of obtaining a plurality of target text units, the first information obtaining unit 14 is specifically configured to traverse the plurality of target text units, obtain a target text unit with a term attribute of a noun or an adjective, match the target text unit with a candidate word in the term document comparison table, and obtain the first target advertisement information.
In some embodiments, in the case that there are a plurality of first target advertisement information and/or a plurality of second target advertisement information, the information providing unit 16 is specifically configured to sort the plurality of first target advertisement information and/or the plurality of second target advertisement information according to a preset rule; and selecting to provide the first target advertisement information and/or the second target advertisement information with the preset number of the top-ranked first target advertisement information and/or second target advertisement information to the user.
In some embodiments, the information providing unit 16 is further configured to input the target text into the parsing model, and in case that there is a matching grammatical structure, provide the target text to the user; in the absence of a matching grammar structure, a context operation error is prompted and exited.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The beneficial effects that the contextual online advertisement delivery device provided by the embodiment of the present disclosure can obtain are the same as those obtained by the contextual online advertisement delivery method provided in the above example, and are not described herein again.
Fig. 16 is a block diagram of a computer system 600 for a server for a contextual online advertising method, according to an example embodiment.
The server shown in fig. 16 is only an example, and should not bring any limitation to the function and the use range of the embodiment of the present disclosure.
The computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 606 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: a storage portion 606 including a hard disk and the like; and a communication section 607 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 607 performs communication processing via a network such as the internet. Drivers 608 are also connected to the I/O interface 605 as needed. A removable medium 609 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 608 as necessary, so that a computer program read out therefrom is mounted into the storage section 606 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 607 and/or installed from the removable medium 609. The above-described functions defined in the method of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a receiving unit, an obtaining unit, a establishing unit, and a matching unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, a receiving unit may also be described as a "unit that receives a statistical request".
In order to implement the above embodiments, the present disclosure also provides a storage medium.
Wherein the instructions in the storage medium, when executed by a processor of the electronic device, enable the electronic device to perform the contextual online advertising method as previously described. For example, the storage medium may be a ROM (Read Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
To implement the above embodiments, the present disclosure also provides a computer program product, which when executed by a processor of an electronic device, enables the electronic device to execute the contextual online advertisement delivery method as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (18)
1. A contextual online advertisement delivery method, comprising:
acquiring a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases;
responding to the context operation of the user on the text to be processed, and acquiring a target text unit and a target text;
acquiring a word document corresponding table and a candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and advertisement information associated with the candidate sentences;
Acquiring first target advertisement information according to the target text unit and the word document corresponding table;
acquiring second target advertisement information according to the target text and the candidate sentence library; and
providing the target text and/or the target text unit, and the first target advertisement information and/or the second target advertisement information to the user.
2. The method of claim 1, wherein the performing a contextual operation on the text to be processed in response to the user inputting the text to be processed to obtain a target text unit and a target text comprises:
responding to the following operation of the user on the text to be processed, inputting the text to be processed into a grammar analysis model, and acquiring a target grammar structure matched with the text to be processed;
acquiring weight grades corresponding to a plurality of text units in the text to be processed according to the target grammar structure;
determining a first target text unit of a plurality of the text units if the weighting levels include at least two levels;
deleting the first target text unit in the text to be processed to generate a target simplified text;
And acquiring the first target text unit which is the target text unit, and acquiring the target simplified text which is the target text.
3. The method according to claim 1 or 2, wherein the performing a context operation on the text to be processed in response to the user inputting the text to be processed to obtain a target text unit and a target text comprises:
acquiring a restricted vocabulary; wherein the restriction vocabulary includes a plurality of restriction words;
responding to a first previous operation of the user on the text to be processed, inputting the text to be processed into a text generation model, acquiring at least one editing operation according to the limited vocabulary, and generating a target generation text;
determining a text unit of the target generation text, which is different from the text to be processed, as a second target text unit;
and acquiring the second target text unit which is the target text unit, and acquiring the target generation text which is the target text.
4. The method according to claim 1 or 2, wherein the performing a context operation on the text to be processed in response to the user inputting the text to be processed to obtain a target text unit and a target text comprises:
Responding to a second previous operation of the user on the text to be processed, and dividing the text to be processed into at least one text unit sequence according to a preset condition;
inputting the text unit sequence into a trained word vector model, and predicting to obtain a third target text unit;
traversing the text to be processed, and determining a first reserved position in the text to be processed corresponding to the third target text unit;
adding the third target text unit to the first reserved position of the text to be processed to generate a target newly added text;
and acquiring the third target text unit which is the target text unit, and acquiring the target newly added text which is the target text.
5. The method of claim 1, wherein said obtaining a word document correspondence table and a corpus of candidate sentences comprises:
acquiring advertisement corpus data; the advertisement corpus data comprises at least one of a character advertisement, a picture advertisement and a video advertisement;
acquiring advertisement texts and links of the text advertisements, the picture advertisements and the video advertisements;
inputting the advertisement text into an abstract generation model to generate an abstract text;
And generating the word document corresponding table and the candidate sentence library according to the advertisement text, the abstract text and the link.
6. The method of claim 5, wherein obtaining advertisement text for the picture advertisement and the video advertisement comprises:
acquiring images in the picture advertisement and the video advertisement;
and inputting the image to an image description model to generate the advertisement text.
7. The method of claim 6, wherein inputting the image to an image description model, generating the advertisement text, comprises:
inputting the image into an encoder, acquiring the category and the position of a target object through a classification model or a target detection model, and generating a feature vector;
and inputting the feature vector to a decoder to generate the advertisement text.
8. The method of any of claims 5 to 7, wherein generating the word document correspondence table from the advertisement text, the summary text, and the link comprises:
performing word segmentation, duplicate removal and stop word removal on the advertisement text respectively to obtain the candidate words;
And establishing an inverted index of the candidate words, the abstract text and the link, and generating a word document corresponding table.
9. The method according to any one of claims 5 to 7, wherein said generating said sentence library candidate based on said advertisement text, said abstract text and said link comprises:
the advertisement text is divided into sentences to obtain the candidate sentences;
and establishing the corresponding relation between the candidate sentences and the abstract texts and the links to generate the candidate sentence library.
10. The method of claim 1, wherein obtaining first target advertisement information according to the target text unit and the word document correspondence table comprises:
inputting the target text unit into a trained word vector model to generate a target word vector;
calculating the similarity between the target word vector and a candidate word vector generated by the candidate words in the word document corresponding table;
and according to the similarity, determining the advertisement information associated with the candidate word with the maximum similarity of the target word vector as the first target advertisement information.
11. The method of claim 1, wherein said obtaining second targeted advertisement information based on said target text and said sentence library candidate comprises:
Inputting the target text into a statement vector model to generate a target text vector;
calculating the similarity between the target text vector and candidate sentence vectors generated by the candidate sentences in the candidate sentence library;
and according to the similarity, determining the advertisement information associated with the candidate sentence with the maximum similarity of the target text vector as the second target advertisement information.
12. The method of claim 1, wherein in case of obtaining a plurality of the target text units, obtaining first target advertisement information according to the target text units and the word document look-up table comprises:
traversing a plurality of target text units, acquiring the target text units with the word attributes being nouns or adjectives, matching the target text units with the candidate words in the word document comparison table, and acquiring the first target advertisement information.
13. The method according to claim 1, wherein in a case where there are a plurality of the first targeted advertisement information and/or a plurality of the second targeted advertisement information, the providing the first targeted advertisement information and/or the second targeted advertisement information to the user comprises:
Sequencing the plurality of first target advertisement information and/or the plurality of second target advertisement information according to a preset rule;
and selecting to provide the first target advertisement information and/or the second target advertisement information which are ranked in the top preset number for the user.
14. The method of claim 1, further comprising:
inputting the target text into a grammar analysis model, and providing the target text to the user under the condition that a matched grammar structure exists;
in the absence of a matching grammar structure, a context operation error is prompted and exited.
15. A contextual online advertising device, comprising:
the text acquisition unit is used for acquiring a text to be processed; the text to be processed comprises a plurality of text units, and the text units are words or phrases;
the target obtaining unit is used for responding to the context operation of the user on the text to be processed and obtaining a target text unit and a target text;
the data acquisition unit is used for acquiring the word document corresponding table and the candidate sentence library; the word document corresponding table comprises a plurality of candidate words and advertisement information associated with the candidate words, and the candidate sentence library comprises a plurality of candidate sentences and advertisement information associated with the candidate sentences;
The first information acquisition unit is used for acquiring first target advertisement information according to the target text unit and the word document corresponding table;
a second information obtaining unit, configured to obtain second target advertisement information according to the target text and the candidate sentence library; and
an information providing unit, configured to provide the target text and/or the target text unit, and the first target advertisement information and/or the second target advertisement information to the user.
16. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 14.
17. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 14.
18. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 14.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210234310.4A CN114677165A (en) | 2022-03-10 | 2022-03-10 | Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210234310.4A CN114677165A (en) | 2022-03-10 | 2022-03-10 | Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114677165A true CN114677165A (en) | 2022-06-28 |
Family
ID=82071599
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210234310.4A Pending CN114677165A (en) | 2022-03-10 | 2022-03-10 | Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114677165A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115204123A (en) * | 2022-07-29 | 2022-10-18 | 北京知元创通信息技术有限公司 | Analysis method, analysis device and storage medium for collaborative editing of document |
-
2022
- 2022-03-10 CN CN202210234310.4A patent/CN114677165A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115204123A (en) * | 2022-07-29 | 2022-10-18 | 北京知元创通信息技术有限公司 | Analysis method, analysis device and storage medium for collaborative editing of document |
CN115204123B (en) * | 2022-07-29 | 2023-02-17 | 北京知元创通信息技术有限公司 | Collaborative editing document analysis method, analysis device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106650943B (en) | Auxiliary writing method and device based on artificial intelligence | |
CN112131350B (en) | Text label determining method, device, terminal and readable storage medium | |
CN111324728A (en) | Text event abstract generation method and device, electronic equipment and storage medium | |
CN111259631B (en) | Referee document structuring method and referee document structuring device | |
CN111553159B (en) | Question generation method and system | |
CN113032552B (en) | Text abstract-based policy key point extraction method and system | |
WO2024131054A1 (en) | Rich-media document auxiliary generation apparatus | |
CN116975615A (en) | Task prediction method and device based on video multi-mode information | |
CN117709866A (en) | Method and system for generating bidding document and computer readable storage medium | |
CN110598095B (en) | Method, device and storage medium for identifying article containing specified information | |
CN114281948A (en) | Summary determination method and related equipment thereof | |
Singh et al. | Generation and evaluation of hindi image captions of visual genome | |
CN114677165A (en) | Contextual online advertisement delivery method, contextual online advertisement delivery device, contextual online advertisement delivery server and storage medium | |
CN116860959A (en) | Extraction type abstract method and system combining local topic and hierarchical structure information | |
Yu et al. | TCR: Short Video Title Generation and Cover Selection with Attention Refinement | |
Ciurez et al. | Automatic categorization of educational videos according to learning styles | |
CN114547435B (en) | Content quality identification method, device, equipment and readable storage medium | |
CN116956818A (en) | Text material processing method and device, electronic equipment and storage medium | |
CN114238617A (en) | Industry hotspot recommendation method and system | |
CN115130453A (en) | Interactive information generation method and device | |
Nuyts et al. | Explicitly Representing Syntax Improves Sentence-to-Layout Prediction of Unexpected Situations | |
CN111666437A (en) | Image-text retrieval method and device based on local matching | |
CN117708308B (en) | RAG natural language intelligent knowledge base management method and system | |
CN118170933B (en) | Construction method and device of multi-mode corpus data oriented to scientific field | |
CN116226677B (en) | Parallel corpus construction method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |