CN109784165A - Generation method, device, terminal and the storage medium of poem content - Google Patents

Generation method, device, terminal and the storage medium of poem content Download PDF

Info

Publication number
CN109784165A
CN109784165A CN201811520555.3A CN201811520555A CN109784165A CN 109784165 A CN109784165 A CN 109784165A CN 201811520555 A CN201811520555 A CN 201811520555A CN 109784165 A CN109784165 A CN 109784165A
Authority
CN
China
Prior art keywords
poem
information
content
picture
generation method
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
Application number
CN201811520555.3A
Other languages
Chinese (zh)
Inventor
王杰
庄伯金
王少军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811520555.3A priority Critical patent/CN109784165A/en
Publication of CN109784165A publication Critical patent/CN109784165A/en
Pending legal-status Critical Current

Links

Abstract

The present invention relates to natural language processing technique fields, provide generation method, device, terminal and the storage medium of a kind of poem content.The generation method of the poem content includes: the picture for obtaining client and uploading;The picture material for extracting the picture analyzes described image content, obtains the context information that described image content is included;The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is back to the client.The present invention realizes the picture according to upload, generates the poem content to match with the image content, enriches poem generating mode, promotes user experience.

Description

Generation method, device, terminal and the storage medium of poem content
Technical field
The present invention relates to natural language processing technique field more particularly to a kind of generation methods of poem content, device, end End and storage medium.
Background technique
With the fast development of deep learning, using convolutional neural networks and Recognition with Recurrent Neural Network as the deep learning frame of representative Frame is used widely in computer vision and natural language processing field.In natural language processing field, traditional poem is raw At a machine translation problem is counted as, using a upper poem as original language, next poem passes through as object language Statistical machine translation model is translated, and plus the rhymed equal constraint of level and oblique tone, obtains a complete poem of head.
But the text information that current poem content automatic generation method can only be inputted by user, such as keyword, language The information such as sentence carry out intelligent generation, and generation form is single, lack flexibility, can not adapt to diversified demand.
Summary of the invention
The present invention provides generation method, device, terminal and the storage medium of a kind of poem content, to solve in current poem The problem of generation form for holding generation method is single, lacks flexibility, can not adapt to diversified demand.
To solve the above problems, the present invention adopts the following technical scheme:
The present invention provides a kind of generation method of poem content, includes the following steps:
Obtain the picture that client uploads;
The picture material for extracting the picture analyzes described image content, obtains described image content and is included Context information;
The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is returned To the client.
Optionally, the context information includes Entity Semantics information and relationship semantic information, described to described image content The step of being analyzed, comprising:
Multi-level mapping is carried out to described image content using convolutional neural networks model, obtains the reality in picture material Body semantic information and relationship semantic information;
The step of poem information that the acquisition matches with the context information, comprising:
The style of poem content to be generated is generated according to the Entity Semantics information and relationship semantic information;
Obtain the poem information to match with the style.
Optionally, described that multi-level mapping is carried out to the figure content picture using convolutional neural networks model, obtain figure As the step of Entity Semantics information and relationship semantic information in content, comprising:
Preliminary treatment is carried out to the picture material close to picture boundary using the bottom neuron of convolutional neural networks model;
The local message of each pictorial element in picture material is identified using the middle layer neuron of convolutional neural networks model;
According to preliminary processing results and local message, image is extracted using the high-rise neuron of convolutional neural networks model The global information of content;
The global information is inputted in LSTM model, the Entity Semantics information and relationship semanteme letter in picture material are obtained Breath.
Optionally, the generation method of the poem content further include:
According to the Entity Semantics information and relationship semantic information, the base of entity in picture material is extracted using corpus This information;
According to the essential information, high frequency vocabulary relevant to the essential information is obtained using textRank algorithm;
Obtain the poem information comprising the high frequency vocabulary.
Optionally, described and according to the poem information generate poem content the step of, comprising:
According to the high frequency vocabulary of the poem information, each sentence is generated with the high frequency vocabulary using sequence to series model The poem content being the theme.
Optionally, described and according to the poem information generate poem content after, further includes:
Assessment models are constructed, are scored using poem content of the assessment models to generation;
When the verse score value in poem content is lower than preset value, the verse is re-generated, until in poem The score value of all verses in appearance stops when being all higher than preset value.
Optionally, described the step of being scored using poem content of the assessment models to generation, comprising:
According to the collocation frequency in poem content between words, using the assessment models to the continuity of poem content into Row scoring;
According to the correspondence that sound between words is restrained, the verse of front and back two in poem content is carried out using the assessment models Scoring;
According to rhymed rule, scored using the assessment models the rhymed of poem content.
A kind of generating means of poem content provided by the invention, comprising:
Module is obtained, for obtaining the picture of client upload;
Analysis module analyzes described image content for extracting the picture material of the picture, obtains the figure The context information for being included as content;
Generation module, for obtaining the poem information to match with the context information, and it is raw according to the poem information The client is back at poem content.
The present invention provides a kind of terminal, including memory and processor, is stored with computer-readable finger in the memory It enables, when the computer-readable instruction is executed by the processor, so that the processor executes as above described in any item poems The step of generation method of word content.
The present invention provides a kind of storage medium, is stored thereon with computer program, and the computer program is held by processor When row, the generation method of as above described in any item poem contents is realized.
Compared with the existing technology, technical solution of the present invention at least has following advantage:
The generation method of poem content provided by the invention is mentioned from the picture after obtaining the picture that client uploads Picture material is taken out, and described image content is analyzed, to obtain the context information that described image content is included;Then The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is back to the visitor Family end gets rid of the limitation of descriptor so as to generate the poem content to match with the image content according to picture, enriches Poem generating mode promotes user experience.
The generation method of poem content provided by the invention, also using convolutional neural networks model to described image content Multi-level mapping is carried out, the Entity Semantics information and relationship semantic information in picture material are obtained, then according to the entity Semantic information and relationship semantic information generate the style of poem content to be generated, are believed with obtaining the poem to match with the style Breath improves the generation quality of poem to generate the poem of reflection picture material style.
The generation method of poem content provided by the invention can also utilize the assessment models by constructing assessment models It scores the poem content of generation;When the verse scoring in poem content is lower than preset value, weight is carried out to the verse It generates, until the scoring of all verses in poem content stops when being all higher than preset value, it is good to guarantee to have in the poem generated Good quality.
Detailed description of the invention
Fig. 1 is the implementation environment figure of the generation method of the poem content provided in one embodiment of the invention;
Fig. 2 is a kind of embodiment flow diagram of generation method of poem content of the present invention;
Fig. 3 is a kind of embodiment module frame chart of generating means of poem content of the present invention;
Fig. 4 is the internal structure block diagram of terminal in one embodiment of the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
In some processes of the description in description and claims of this specification and above-mentioned attached drawing, contain according to Multiple operations that particular order occurs, but it should be clearly understood that these operations can not be what appears in this article suitable according to its Sequence is executed or is executed parallel, and the serial number of operation such as S11, S12 etc. be only used for distinguishing each different operation, serial number It itself does not represent and any executes sequence.In addition, these processes may include more or fewer operations, and these operations can To execute or execute parallel in order.It should be noted that the description such as " first " herein, " second ", is for distinguishing not Same message, equipment, module etc., does not represent sequencing, does not also limit " first " and " second " and be different type.
It will appreciated by the skilled person that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
It will appreciated by the skilled person that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description in which the same or similar labels are throughly indicated same or similar element or has same or like function Element.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this Embodiment in invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Fig. 1 is the implementation environment figure of the generation method of the poem content provided in one embodiment, as shown in Figure 1, at this In implementation environment, including server 110, terminal 120.Terminal 120 is connect by network with server, is pacified in the terminal 120 Equipped with corresponding client, user can generate corresponding poem according to the picture by client uploading pictures, server 110 Content is simultaneously back to client.Wherein, above-mentioned network may include internet, 2G/3G/4G, wifi etc..
It should be noted that server 110 can be independent physical server or terminal, it is also possible to multiple physics clothes The server cluster for device composition of being engaged in can be to provide the basic cloud computing service such as Cloud Server, cloud database, cloud storage and CDN Cloud Server.
Terminal 120 can be smart phone, tablet computer, laptop, desktop computer, intelligent sound box, intelligent hand Table etc., however, it is not limited to this.
Referring to Fig. 2, a kind of generation method of poem content provided by the present invention, in one of embodiment, packet Include following steps:
S21, the picture that client uploads is obtained;
User can be the photo of shooting by terminal to server uploading pictures, the picture, download on the net Picture or paint.
S22, the picture material for extracting the picture, analyze described image content, obtain described image content institute The context information for including;
In the present embodiment, after server gets the picture of user's upload, picture material is extracted from the picture, such as Extract the characteristic information of picture, such as color characteristic, textural characteristics, shape feature, spatial relation characteristics;Then to the figure As content is analyzed, the personage for including in picture material and object and its correlation between them are analyzed, and obtain institute State the context information that picture material is included, wherein the context information may include between the entity, tone, entity of picture material The information such as correlation.
S23, the poem information to match with the context information is obtained, and poem content is generated according to the poem information It is back to the client.
In the present embodiment, the poem to match with the context information letter can be obtained according to the context information of picture material Breath, and the verse to be matched according to the poem Automatic generation of information and context information, such as by screening to poem information, replace It the modes such as changes, delete, integrating, generating new verse, and select the highest verse of matching degree, poem content is obtained, to express figure The picture material of piece.It wherein, include poem model needed for generating poem content in the poem information, it is such as first to Tang poetry 300 It carries out punctuate to meet, after the deletion of paragraph, generates poem model.
The generation method of poem content provided by the invention is mentioned from the picture after obtaining the picture that client uploads Picture material is taken out, and described image content is analyzed, to obtain the context information that described image content is included;Then The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is back to the visitor Family end gets rid of the limitation of descriptor so as to generate the poem content to match with the image content according to picture, enriches Poem generating mode promotes user experience.
Optionally, the context information includes Entity Semantics information and relationship semantic information, described to described image content The step of being analyzed, comprising:
Multi-level mapping is carried out to described image content using convolutional neural networks model, obtains the reality in picture material Body semantic information and relationship semantic information;
In the present embodiment, different layers are made respectively to picture material using the neuron of convolutional neural networks different levels Secondary processing, to obtain the Entity Semantics information and relationship semantic information in picture material, the Entity Semantics information includes Pictorial element in picture material further includes other characteristic informations in pictorial element such as sky, bird or the pictorial element of tree, As sky be it is blue, tree is straight etc..Relationship of the relationship semantic information between entity and entity, if bird flies in the sky, Fish such as swims at the mapping relations.
The step of poem information that the acquisition matches with the context information, comprising:
The style of poem content to be generated is generated according to the Entity Semantics information and relationship semantic information;
Obtain the poem information to match with the style.
In the present embodiment, the poem information in resources bank is segmented using Chinese lexical analysis tool, is obtained Corresponding vocabulary, such as to " withered vine on an old tree dusk crow, small bridge over the flowing stream other " in poem information can segment for " withered rattan, veteran, confused crow, Foot bridge, flowing water, other ", and corresponding poem style is matched to each participle, is stored in vocabulary.When generating poem content, It can be obtained from vocabulary and picture material according to all Entity Semantics information and relationship semantic information obtained in picture material The poem style to match, such as include bird, sky, sea, fish Entity Semantics information in picture material, relationship semantic information is Bird is freeed ballooning in the sky, and fish is played heartily in the sea, then corresponding poem content is then easily cheerful and light-hearted style, is generated similar In the poem content of " Hai Kuo appoints bird to fly with fish dive, sky ".For another example, when the entity in picture material is sky, sunset clouds, bird, lake When water, relationship semantic information is that sky joins together with water, and in the sky, then corresponding poem content is then aestheticism for bird and sunset clouds Style is similar to the poem content of " sunset clouds flies together with lonely duck, and it is of the same colour that autumn waters -- limid eyes are total to the vast of heaven ".
It is in one embodiment, described that multi-level mapping is carried out to the figure content picture using convolutional neural networks model, The step of obtaining the Entity Semantics information and relationship semantic information in picture material, comprising:
Preliminary treatment is carried out to the picture material close to picture boundary using the bottom neuron of convolutional neural networks model;
In the present embodiment, the bottom neuron of convolutional neural networks model handles the boundary of image, such as can be right The operation such as blurred or deleted close to the incomplete pictorial element of picture boundary, to prepare for subsequent be further processed.
The local message of each pictorial element in picture material is identified using the middle layer neuron of convolutional neural networks model;
In the present embodiment, the middle layer neuron of convolutional neural networks model can describe more complicated picture material, than Such as the head of bird or wing in picture, image element attributes are tentatively judged.
According to preliminary processing results and local message, image is extracted using the high-rise neuron of convolutional neural networks model The global information of content;
The local message that high-rise neuron can be identified according to the result and middle layer neuron of BORDER PROCESSING, to the complete of image Office's information extracts, such as the pictorial elements such as bird, sky or lake surface in image.
The global information is inputted in LSTM model, the Entity Semantics information and relationship semanteme letter in picture material are obtained Breath.
In the present embodiment, it is handled using global information of the LSTM model to input, obtains owning in picture material Entity Semantics information and relationship semantic information, for example, including sky, bird, sea, fish entity, LSTM model in picture material Frequency is arranged in pairs or groups by the relationship between sky and bird, Yu Yuhai according to entity.Wherein, the LSTM model is one kind of RNN model Improved model.In LSTM model, the traditional neural member in RNN model, each storage unit and one are replaced using storage unit A input gate, an out gate and one are associated across the noiseless internal state for being sent into itself of time step.Compared to RNN Model, LSTM model have stronger memory capability, can remember longer historical information, be widely used in image analysis.
The present invention carries out multi-level processing to the figure content picture by convolutional neural networks model, with comprehensive assurance figure The picture material of piece generates the poem content for covering all key images information of the picture substantially.
In one embodiment, the generation method of the poem content further include:
According to the Entity Semantics information and relationship semantic information, the base of entity in picture material is extracted using corpus This information;
According to the essential information, high frequency vocabulary relevant to the essential information is obtained using textRank algorithm;
Obtain the poem information comprising the high frequency vocabulary.
In the present embodiment, according to the Entity Semantics information and relationship semantic information, entity is obtained using corpus The essential informations such as classification, attribute and relationship, to be obtained by textRank algorithm related to entity according to the essential information The high frequency vocabulary of connection, such as according to the relationship of bird, sky and bird and sky, the high frequencies such as hovered, circled in the air, soared to great heights Vocabulary, to generate the poem being the theme with the high frequency vocabulary according to the high frequency vocabulary.In addition, after obtaining high frequency vocabulary, also Can be according to the existing frequency of high frequency words remittance abroad just, the high frequency vocabulary for selecting the frequency of occurrences forward, as the master for generating poem content Topic.Wherein, the textRank algorithm is a kind of algorithm for doing keyword extraction, can be used for extracting phrase and automatic Abstract.The method for extracting keyword phrase is based on keyword extraction, can simply think: if several keywords extracted exist It is adjacent in text, then constituting a key phrase being extracted.
Optionally, described and according to the poem information generate poem content the step of, comprising:
According to the high frequency vocabulary of the poem information, each sentence is generated with the high frequency vocabulary using sequence to series model The poem content being the theme.
Specifically, when generating each hexameter, the essential information of acquisition and high frequency words Correspondent are crossed into sequence to sequence Model generates the verse of every a line reflection high frequency vocabulary, so that the hexameter generated can take into account fluency and take into account meaning. For the sequence to series model (Seq2Seq) just as a translation model, input is a sequence (such as English sentence Son), output is also a sequence (such as translator of French corresponding to the english sentence), be can be used for the Sequence Transformed of domain For the sequence in another domain, and text can be generated at any time, and the list entries of this model and the length of output sequence are variable Change.
In one embodiment, described and according to the poem information generate poem content after, further includes:
Assessment models are constructed, are scored using poem content of the assessment models to generation;
When the verse score value in poem content is lower than preset value, the verse is re-generated, until in poem The score value of all verses in appearance stops when being all higher than preset value.
In the present embodiment, by constructing assessment models, continuity, globality and signature can be carried out to the poem content of generation The assessment of rhythm etc. regenerates the lower verse of score, to guarantee the indices of the poem content generated preferable In the range of, it improves poem and generates quality.Wherein, when assessing the various aspects of poem content, the scoring of various aspects is obtained Afterwards, a comprehensive score can be also obtained according to the scoring of various aspects, when the comprehensive score is lower than default score value, to described Poem content is re-generated;Only this aspect can also accordingly be adjusted when the scoring in poem content in a certain respect is lower It is whole, such as when the rhymed scoring of the poem of generation is not met the requirements, individually adjust the rhymed of poem content.
Optionally, described the step of being scored using poem content of the assessment models to generation, comprising:
According to the collocation frequency in poem content between words, using the assessment models to the continuity of poem content into Row scoring;
According to the correspondence that sound between words is restrained, the verse of front and back two in poem content is carried out using the assessment models Scoring;
According to rhymed rule, scored using the assessment models the rhymed of poem content.
In the present embodiment, the mode that can use high frequency collocation calculates the frequency that front and back is arranged in pairs or groups between word to obtain accordingly Score with characterize verse continuity evaluation;The matching that poem content is evaluated using the correspondence of corpus sound rule, is not existed Vocabulary in sound rule initiation, can calculate the similarity of other words in the hexameter of front and back two to judge the correlation of remaining word, into And the globality of poem content is evaluated;Also using the rhymed rule of poem, commenting for rhymed aspect is carried out to the poem of generation Valence obtains the preferable poem content of total quality so that the indices to poem are all assessed.
Referring to FIG. 3, the embodiment of the present invention also provides a kind of generating means of poem content, in a kind of the present embodiment, Including obtaining module 31, analysis module 32 and generation module 33.Wherein,
Module 31 is obtained, for obtaining the picture of client upload;
User can be the photo of shooting by terminal to server uploading pictures, the picture, download on the net Picture or paint.
Analysis module 32 is analyzed described image content, described in acquisition for extracting the picture material of the picture The context information that picture material is included;
In the present embodiment, after server gets the picture of user's upload, picture material is extracted from the picture, such as Extract the characteristic information of picture, such as color characteristic, textural characteristics, shape feature, spatial relation characteristics;Then to the figure As content is analyzed, the personage for including in picture material and object and its correlation between them are analyzed, and obtain institute State the context information that picture material is included, wherein the context information may include between the entity, tone, entity of picture material The information such as correlation.
Generation module 33, for obtaining the poem information to match with the context information, and according to the poem information It generates poem content and is back to the client.
In the present embodiment, the poem to match with the context information letter can be obtained according to the context information of picture material Breath, and the verse to be matched according to the poem Automatic generation of information and context information, such as by screening to poem information, replace It the modes such as changes, delete, integrating, generating new verse, and select the highest verse of matching degree, poem content is obtained, to express figure The picture material of piece.It wherein, include poem model needed for generating poem content in the poem information, it is such as first to Tang poetry 300 It carries out punctuate to meet, after the deletion of paragraph, generates poem model.
The generating means of poem content provided by the invention are mentioned from the picture after obtaining the picture that client uploads Picture material is taken out, and described image content is analyzed, to obtain the context information that described image content is included;Then The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is back to the visitor Family end gets rid of the limitation of descriptor so as to generate the poem content to match with the image content according to picture, enriches Poem generating mode promotes user experience.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 4 shows the block diagram of the part-structure of mobile phone relevant to terminal provided in an embodiment of the present invention.With reference to figure 4, mobile phone include: radio frequency (Radio Frequency, RF) circuit 610, memory 620, input unit 630, display unit 640, Sensor 650, voicefrequency circuit 660, Wireless Fidelity (wireless fidelity, WiFi) module 670, processor 680 and The components such as power supply 690.It will be understood by those skilled in the art that handset structure shown in Fig. 4 does not constitute the restriction to mobile phone, It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
It is specifically introduced below with reference to each component parts of the Fig. 4 to mobile phone:
RF circuit 610 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, handled to processor 680;In addition, the data for designing uplink are sent to base station.In general, RF circuit packet Include but be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier, LNA), duplexer etc..In addition, RF circuit 60 can also be communicated with network and other equipment by wireless communication. Any communication standard or agreement, including but not limited to global system for mobile communications (Global can be used in above-mentioned wireless communication System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE)), Email, short message service (Short Messaging Service, SMS) etc..
Memory 620 can be used for storing computer-readable store instruction and module, and processor 680 is stored in by operation The computer-readable store instruction and module of memory 620, thereby executing the various function application and data processing of mobile phone. Memory 620 can mainly include storing program area and storage data area, wherein storing program area can storage program area, at least Application program needed for one function (such as sound-playing function, image player function etc.) etc.;Storage data area can store root Created data (such as audio data, phone directory etc.) etc. are used according to mobile phone.In addition, memory 620 may include high speed Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or Other volatile solid-state parts.
Input unit 630 can be used for receiving the number or character information of input, and generate the user setting with mobile phone 600 And the related key signals input of function control.Specifically, input unit 630 may include touch panel 631 and other inputs Equipment 632.Touch panel 631, also referred to as touch screen, collecting the touch operation of user on it or nearby, (for example user makes With the operation of any suitable object or attachment such as finger, stylus on touch panel 631 or near touch panel 631), and Corresponding attachment device is driven according to preset formula.Optionally, touch panel 631 may include touch detecting apparatus and touching Touch two parts of controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation bring letter Number, transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into Contact coordinate, then give processor 680, and order that processor 680 is sent can be received and executed.Furthermore, it is possible to using The multiple types such as resistance-type, condenser type, infrared ray and surface acoustic wave realize touch panel 631.It is defeated in addition to touch panel 631 Entering unit 630 can also include other input equipments 632.Specifically, other input equipments 632 can include but is not limited to physics One of keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.
Display unit 640 can be used for showing information input by user or be supplied to user information and mobile phone it is various Menu.Display unit 640 may include display panel 641, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) it is aobvious to configure Show panel 641.Further, touch panel 631 can cover display panel 641, when touch panel 631 detect it is on it or attached After close touch operation, processor 680 is sent to determine the type of touch event, is followed by subsequent processing device 680 according to touch event Type corresponding visual output is provided on display panel 641.Although in Fig. 4, touch panel 631 and display panel 641 It is that the input and input function of mobile phone are realized as two independent components, but in some embodiments it is possible to by touch-control Panel 631 and display panel 641 are integrated and that realizes mobile phone output and input function.
Mobile phone 600 may also include at least one sensor 650, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 641, and proximity sensor can close display panel when mobile phone is moved in one's ear 641 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 660, loudspeaker 661, microphone 662 can provide the audio interface between user and mobile phone.Audio-frequency electric Electric signal after the audio data received conversion can be transferred to loudspeaker 661, be converted to sound by loudspeaker 661 by road 660 Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 662, is turned after being received by voicefrequency circuit 660 It is changed to audio data, then by after the processing of audio data output processor 680, such as another mobile phone is sent to through RF circuit 610, Or audio data is exported to memory 620 to be further processed.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 670 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 4 is shown WiFi module 670, but it is understood that, and it is not belonging to must be configured into for mobile phone 600, it is can according to need completely not Change in the range of the essence of invention and omits.
Processor 680 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes computer-readable store instruction and/or the module being stored in memory 620, and call and be stored in storage Data in device 620 execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, it handles Device 680 may include one or more processing units;Preferably, processor 680 can integrate application processor and modulation /demodulation processing Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 680.
Mobile phone 600 further includes the power supply 690 (such as battery) powered to all parts, it is preferred that power supply can pass through electricity Management system and processor 680 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.
Although being not shown, mobile phone 600 can also include camera, bluetooth module etc., and details are not described herein.
In embodiments of the present invention, when the computer-readable store instruction and module that are stored in memory 620 are processed When device executes, processor 680 may make to realize the generation method of above-mentioned poem content, and realizes in illustrated embodiment in poem The function of corresponding module in the generating means of appearance.
In one embodiment, the invention also provides a kind of storage medium for being stored with computer-readable instruction, the meters When calculation machine readable instruction is executed by one or more processors, so that one or more processors execute the life of above-mentioned poem content At method.For example, the storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light number According to storage equipment etc..
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a storage medium, the program When being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can for magnetic disk, CD, only Read non-volatile memory mediums or random access memory (Random such as storage memory (Read-Only Memory, ROM) Access Memory, RAM) etc..
Based on the above embodiments it is found that the maximum beneficial effect of the present invention is:
Generation method, device, terminal and the storage medium of poem content provided by the invention obtain the figure that client uploads After piece, picture material is extracted from the picture, and analyze described image content, to obtain described image content institute The context information for including;Then the poem information to match with the context information is obtained, and is generated according to the poem information Poem content is back to the client, rich so as to generate the poem content to match with the image content according to picture Rich poem generating mode, promotes user experience.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

1. a kind of generation method of poem content, which comprises the steps of:
Obtain the picture that client uploads;
The picture material for extracting the picture analyzes described image content, obtains the feelings that described image content is included Scape information;
The poem information to match with the context information is obtained, and poem content is generated according to the poem information and is back to institute State client.
2. the generation method of poem content according to claim 1, which is characterized in that the context information includes entity language Adopted information and relationship semantic information, described the step of described image content is analyzed, comprising:
Multi-level mapping is carried out to described image content using convolutional neural networks model, obtains the entity language in picture material Adopted information and relationship semantic information;
The step of poem information that the acquisition matches with the context information, comprising:
The style of poem content to be generated is generated according to the Entity Semantics information and relationship semantic information;
Obtain the poem information to match with the style.
3. the generation method of poem content according to claim 2, which is characterized in that described to utilize convolutional neural networks mould Type carries out multi-level mapping to the figure content picture, obtains Entity Semantics information in picture material and relationship semantic information Step, comprising:
Preliminary treatment is carried out to the picture material close to picture boundary using the bottom neuron of convolutional neural networks model;
The local message of each pictorial element in picture material is identified using the middle layer neuron of convolutional neural networks model;
According to preliminary processing results and local message, picture material is extracted using the high-rise neuron of convolutional neural networks model Global information;
The global information is inputted in LSTM model, the Entity Semantics information and relationship semantic information in picture material are obtained.
4. the generation method of poem content according to claim 2, which is characterized in that further include:
According to the Entity Semantics information and relationship semantic information, the basic letter of entity in picture material is extracted using corpus Breath;
According to the essential information, high frequency vocabulary relevant to the essential information is obtained using textRank algorithm;
Obtain the poem information comprising the high frequency vocabulary.
5. the generation method of poem content according to claim 4, which is characterized in that described and according to the poem information The step of generating poem content, comprising:
According to the high frequency vocabulary of the poem information, each sentence is generated based on the high frequency vocabulary using sequence to series model The poem content of topic.
6. the generation method of poem content according to claim 1, which is characterized in that described and according to the poem information After generation poem content, further includes:
Assessment models are constructed, are scored using poem content of the assessment models to generation;
When the verse score value in poem content is lower than preset value, the verse is re-generated, until in poem content The score values of all verses stop when being all higher than preset value.
7. the generation method of poem content according to claim 6, which is characterized in that described to utilize the assessment models pair The step of poem content of generation is scored, comprising:
According to the collocation frequency in poem content between words, commented using continuity of the assessment models to poem content Point;
According to the correspondence that sound between words is restrained, two verses in front and back in poem content are commented using the assessment models Point;
According to rhymed rule, scored using the assessment models the rhymed of poem content.
8. a kind of generating means of poem content characterized by comprising
Module is obtained, for obtaining the picture of client upload;
Analysis module analyzes described image content for extracting the picture material of the picture, obtains in described image Hold included context information;
Generation module generates poem for obtaining the poem information to match with the context information, and according to the poem information Word content is back to the client.
9. a kind of terminal, which is characterized in that including memory and processor, computer-readable finger is stored in the memory It enables, when the computer-readable instruction is executed by the processor, so that the processor is executed as appointed in claim 1 to 7 The step of generation method of poem content described in one.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is held by processor When row, the generation method of the poem content as described in any one of claims 1 to 7 is realized.
CN201811520555.3A 2018-12-12 2018-12-12 Generation method, device, terminal and the storage medium of poem content Pending CN109784165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811520555.3A CN109784165A (en) 2018-12-12 2018-12-12 Generation method, device, terminal and the storage medium of poem content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811520555.3A CN109784165A (en) 2018-12-12 2018-12-12 Generation method, device, terminal and the storage medium of poem content

Publications (1)

Publication Number Publication Date
CN109784165A true CN109784165A (en) 2019-05-21

Family

ID=66495897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811520555.3A Pending CN109784165A (en) 2018-12-12 2018-12-12 Generation method, device, terminal and the storage medium of poem content

Country Status (1)

Country Link
CN (1) CN109784165A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232180A (en) * 2019-06-06 2019-09-13 北京师范大学 A kind of automatic proposition method and system towards classic poetry assessment
CN110245339A (en) * 2019-06-20 2019-09-17 北京百度网讯科技有限公司 Article generation method, device, equipment and storage medium
CN111797262A (en) * 2020-06-24 2020-10-20 北京小米松果电子有限公司 Poetry generation method and device, electronic equipment and storage medium
CN111814488A (en) * 2020-07-22 2020-10-23 网易(杭州)网络有限公司 Poetry generation method and device, electronic equipment and readable storage medium
CN113794915A (en) * 2021-09-13 2021-12-14 海信电子科技(武汉)有限公司 Server, display equipment, poetry and song endowing generation method and media asset playing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480132A (en) * 2017-07-25 2017-12-15 浙江工业大学 A kind of classic poetry generation method of image content-based
CN107832292A (en) * 2017-11-02 2018-03-23 合肥工业大学 A kind of conversion method based on the image of neural network model to Chinese ancient poetry
US20180150444A1 (en) * 2016-11-28 2018-05-31 Microsoft Technology Licensing, Llc Constructing a Narrative Based on a Collection of Images
CN108874779A (en) * 2018-06-21 2018-11-23 东北大学 The control method that system is write the poem according to figure established based on K8s cluster

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180150444A1 (en) * 2016-11-28 2018-05-31 Microsoft Technology Licensing, Llc Constructing a Narrative Based on a Collection of Images
CN107480132A (en) * 2017-07-25 2017-12-15 浙江工业大学 A kind of classic poetry generation method of image content-based
CN107832292A (en) * 2017-11-02 2018-03-23 合肥工业大学 A kind of conversion method based on the image of neural network model to Chinese ancient poetry
CN108874779A (en) * 2018-06-21 2018-11-23 东北大学 The control method that system is write the poem according to figure established based on K8s cluster

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232180A (en) * 2019-06-06 2019-09-13 北京师范大学 A kind of automatic proposition method and system towards classic poetry assessment
CN110232180B (en) * 2019-06-06 2020-11-03 北京师范大学 Automatic proposition method and system for ancient poetry evaluation
CN110245339A (en) * 2019-06-20 2019-09-17 北京百度网讯科技有限公司 Article generation method, device, equipment and storage medium
CN111797262A (en) * 2020-06-24 2020-10-20 北京小米松果电子有限公司 Poetry generation method and device, electronic equipment and storage medium
CN111814488A (en) * 2020-07-22 2020-10-23 网易(杭州)网络有限公司 Poetry generation method and device, electronic equipment and readable storage medium
CN113794915A (en) * 2021-09-13 2021-12-14 海信电子科技(武汉)有限公司 Server, display equipment, poetry and song endowing generation method and media asset playing method

Similar Documents

Publication Publication Date Title
CN109784165A (en) Generation method, device, terminal and the storage medium of poem content
CN109783798A (en) Method, apparatus, terminal and the storage medium of text information addition picture
CN109145303A (en) Name entity recognition method, device, medium and equipment
CN106845390B (en) Video title generation method and device
CN110276075A (en) Model training method, name entity recognition method, device, equipment and medium
CN104239535B (en) A kind of method, server, terminal and system for word figure
CN107943860A (en) The recognition methods and device that the training method of model, text are intended to
CN110232696A (en) A kind of method of image region segmentation, the method and device of model training
CN104951432B (en) The method and device that a kind of pair of information is handled
CN105005563B (en) A kind of abstraction generating method and device
CN107784114A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
CN105303149B (en) The methods of exhibiting and device of character image
CN109599079A (en) A kind of generation method and device of music
CN107959883A (en) Video editing method for pushing, system and intelligent mobile terminal
CN109063583A (en) A kind of learning method and electronic equipment based on read operation
CN110334344A (en) A kind of semanteme intension recognizing method, device, equipment and storage medium
CN110166828A (en) A kind of method for processing video frequency and device
CN108228720B (en) Identify method, system, device, terminal and the storage medium of target text content and original image correlation
CN104123937A (en) Method, device and system for reminding setting
CN108062404A (en) Processing method, device, readable storage medium storing program for executing and the terminal of facial image
CN109815363A (en) Generation method, device, terminal and the storage medium of lyrics content
CN108959274A (en) A kind of interpretation method and server of application program
CN110704661A (en) Image classification method and device
CN110443769A (en) Image processing method, image processing apparatus and terminal device
CN109947650A (en) Script step process methods, devices and systems

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