Disclosure of Invention
The application aims to solve the problem of insufficient ornamental value of the intelligent typesetting finished product in the prior art, and provides a method for automatically generating publications based on AI content. And also relates to a system for automatically generating publications based on AI content.
The application also provides a method for automatically generating the publication based on the AI content, which comprises the following steps:
inputting data to be processed into a preprocessing content model to generate publication content;
matching publication plates according to the contents, extracting keywords preset based on the plates, and generating auxiliary contents according to the keywords;
generating a publication pre-sample from the publication content and the auxiliary content;
and imaging the pre-sample, and modifying based on the input pattern keywords to generate a publication.
Optionally, the preprocessing model includes:
a voice conversion module, or an image recognition module.
Optionally, the obtaining auxiliary content includes: ranking based on the scores, the expression is as follows:
wherein the saidIs the score of the evaluation, a is the word count total score, B is the relationship total score, and C is the score. The number of the keywords is H, the number of the keywords is i, the number of the relationships is G, and the number of the relationships is +.>Is the total keyword number, said +.>Is the total number of relationships;
and determining content keywords based on the ranking.
Optionally, the publication is pre-sampled, including image data and/or text data.
Optionally, the generating auxiliary content according to the keyword includes:
an image is generated based on the one or more keywords, and a description is generated based on the one or more keywords.
The application also provides a system for automatically generating publications based on AI content, comprising:
the processing module is used for inputting the data to be processed into the preprocessing content model to generate publication content;
the generation module is used for matching publication plates according to the content, extracting keywords preset based on the plates and generating auxiliary content according to the keywords;
the pre-sampling module is used for generating a publication pre-sample according to the publication content and the auxiliary content;
and the publishing module is used for imaging the pre-sample and generating a publication after modifying the pre-sample based on the input pattern keywords.
Optionally, the preprocessing model includes:
a voice conversion module, or an image recognition module.
Optionally, the generating module obtains the auxiliary content includes: ranking based on the scores, the expression is as follows:
wherein the saidIs the score of the evaluation, a is the word count total score, B is the relationship total score, and C is the score. The number of the keywords is H, the number of the keywords is i, the number of the relationships is G, and the number of the relationships is +.>Is the total keyword number, said +.>Is the total number of relationships;
and determining content keywords based on the ranking.
Optionally, the publication is pre-sampled, including image data and/or text data.
Optionally, the pre-sampling module generates auxiliary content according to the keyword, including:
an image is generated based on the one or more keywords, and a description is generated based on the one or more keywords.
The application has the advantages and beneficial effects that:
at application point 1, the publication is automatically generated.
And 2, modifying based on the input pattern keywords to generate a publication.
And 3, generating auxiliary content by the keywords.
The application provides a method for automatically generating publications based on AI content, which comprises the following steps: inputting data to be processed into a preprocessing content model to generate publication content; matching publication plates according to the contents, extracting keywords preset based on the plates, and generating auxiliary contents according to the keywords; generating a publication pre-sample from the publication content and the auxiliary content; and imaging the pre-sample, and modifying based on the input pattern keywords to generate a publication. According to the intelligent typesetting method, the intelligent AI is adopted for typesetting in the whole process, and the AI is adopted for typesetting beautification, so that the finished product ornamental value of the intelligent typesetting is effectively improved.
Detailed Description
The present application is further described in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art may better understand the present application and practice it.
The application provides a method for automatically generating publications based on AI content, which comprises the following steps: inputting data to be processed into a preprocessing content model to generate publication content; matching publication plates according to the contents, extracting keywords preset based on the plates, and generating auxiliary contents according to the keywords; generating a publication pre-sample from the publication content and the auxiliary content; and imaging the pre-sample, and modifying based on the input pattern keywords to generate a publication. According to the intelligent typesetting method, the intelligent AI is adopted for typesetting in the whole process, and the AI is adopted for typesetting beautification, so that the finished product ornamental value of the intelligent typesetting is effectively improved.
FIG. 1 is a schematic flow chart of the automatic generation of publications based on AI content in the application.
Referring to S101 shown in fig. 1 and 3, inputting data to be processed into a preprocessing content model to generate publication content;
the data to be processed comprises: and (5) voice recognition and image-text recognition.
The essence of speech recognition is a pattern recognition based on speech feature parameters, i.e. through learning, the system can classify the input speech according to a certain pattern, and then find out the best matching result according to the decision criteria.
The input speech is first pre-processed, including framing, windowing, pre-emphasis, etc.
And then extracting the characteristics, and selecting characteristic parameters, including: pitch period, formants, short-time average energy or amplitude, linear Prediction Coefficients (LPC), perceptual weighting prediction coefficients (PLP), short-time average zero-crossing rate, linear Prediction Cepstrum Coefficients (LPCC), autocorrelation functions, mel cepstrum coefficients (MFCC), wavelet transform coefficients, empirical mode decomposition coefficients (EMD), gamma-pass filter coefficients (GFCC), and the like.
And finally, extracting the characteristics based on the selected characteristic parameters, generating a template for the test voice according to the training process, and finally, identifying according to a distortion judgment criterion. Common distortion decision criteria include euclidean distance, covariance matrix and bayesian distance.
The image-text recognition refers to character recognition through OCR software.
Through the above processing, the publication contents are obtained, and the content association is also required in the publication contents, because the voice recognition and the image-text recognition can only extract the text contents in the input data, and therefore, the text contents and the picture contents are also required to be associated.
Finally, combining the text content, the image content and the association of the text and the image into the publication content.
Referring to fig. 1, S102 matches a publication plate according to the content, extracts a keyword preset based on the plate, and generates auxiliary content according to the keyword.
The publication board comprises typesetting, framing and other contents, and means that the typesetting and the device are generated according to the publication contents.
Specifically, the typesetting and framing are preset and stored universal templates, and related keywords are also arranged corresponding to the universal templates.
And when typesetting and frame loading are carried out, content statistics is required to be carried out on the content of the publications, sorting and screening of universal templates are carried out based on the content statistics results, and further processing is carried out on the screened results to obtain auxiliary content.
FIG. 2 is a schematic diagram of the sorting and screening of generic templates in the present application.
Referring to fig. 2, S201 first performs content keyword extraction on the content.
These content keywords may be extracted by pre-review extraction specifications, such as extracting only nouns, extracting only nouns after verbs, and so on.
And after the content keywords are extracted, sorting the keywords, for example, sorting the keywords according to the number of the keywords, or sorting the keywords based on the positions of the keywords. Preferably, the ranking of keywords based on location can be performed by using a scoring method:
setting a position weight, for example, evaluating paragraphs to obtain paragraph weights. The paragraph weights are as follows:
wherein the saidIs the score of the evaluation, a is the word count total score, B is the relationship total score, and C is the score. The number of the keywords is H, the number of the keywords is i, the number of the relationships is G, and the number of the relationships is +.>Is the total keyword number, said +.>Is the total number of relationships.
The values A, B and C are preset values greater than 1, and can also be values greater than 10. And then sorting based on the scores, including:
when sorting is performed, firstly, score comparison is performed, namely, the current sorting position is:
wherein j is a new sort sequence number.
Referring to fig. 2, S202 determines content keywords based on the ranking.
And determining the content keywords, namely selecting the first few digits in the reordered keyword sequence to obtain the final content keywords.
Referring to fig. 2, S203 performs ranking and screening of universal templates based on the content keywords.
Specifically, the keywords are associated with the universal templates to obtain keywords for matching, the matched universal templates are ranked in matching degree, and the universal template with the highest matching degree is selected.
Referring to fig. 2, S204 generates auxiliary content based on the universal template.
Comprising the following steps: an image is generated based on the one or more keywords, and a description is generated based on the one or more keywords.
Specifically, the addition of the content in the template format, such as noun addition, time, address and other information and various images, is performed based on the universal template. The determination may be performed by a worker according to actual situations, and will not be described in detail herein.
Please refer to S103 in fig. 1, which generates a publication pre-sample according to the publication content and the auxiliary content.
Specifically, based on the universal template, the publication content and the auxiliary content, a pre-sample of the publication is generated, including addition of all information of the publication, addition of an image according to an association relation between the publication content and the image, adaptation of the image according to the universal template, modification of a format and the like.
Specifically, the universal template is provided with different plates based on the content of the publication, and the different plates are added based on the content of the publication and the auxiliary content of the publication to obtain the final publication.
The pre-sampling is composed of one or more text files in a text format, and is ordered and stored based on a preset plate sequence of the universal template.
And finally outputting the pre-sample, manually adjusting and further normalizing to generate the pre-sample to be processed.
Please refer to S104 in fig. 1, which is to image the pre-sample and modify the pre-sample based on the inputted pattern keyword to generate a publication.
And imaging the pre-sample, namely converting the text file into an image file, and carrying out final finished product output of final decoration based on the image file.
Specifically, after the image file is output, the content thereof cannot be modified, so that the finished product needs to be classified first. Specifically, publications generated based on the universal templates can be divided into two broad categories, namely, modifiable portions and non-modifiable portions. The modifiable portion is a portion that is less associated with the content and the non-modifiable portion is a portion that is more associated. Specifically, when the selection is performed, the determination is performed according to the amount of the publication contents input in the universal template.
Based on the modifiable portion, image recognition is first performed to identify non-modifiable content, such as text, in the modifiable portion. Identifying and extracting the non-modifiable content and the modifiable content, and storing the non-modifiable content.
Extracting the modifiable content, and calculating the relevance of the modifiable content and the non-modifiable content, wherein the expression is as follows:
wherein l is the correlation used for comparison, x is the horizontal axis coordinate of the center point of the non-modifiable content, y is the vertical axis coordinate of the center point of the non-modifiable content,is the coordinates on a plurality of horizontal axes of modifiable content, said +.>Is the coordinates of points on the multi-and vertical axes of the modifiable content.
Setting a threshold value, and when the l is smaller than the threshold value, modifying the modifiable content by taking the non-modifiable content as a pattern keyword.
Specifically, the modifiable content can be scratched out, added into an image generation network as an initial image, input into the content keywords for modification and output, and the method comprises the steps of generating an image based on one or more keywords and generating a description according to the one or more keywords.
And finally, placing the output image to a home position, and placing the non-modifiable content to the home position.
Finally, the publication is obtained.
The application also provides a system for automatically generating publications based on AI content, comprising: a processing module 301, a generating module 302, a pre-sampling module 303, and a publishing module 304.
Referring to fig. 3, a processing module 301 is shown for inputting data to be processed into a preprocessing content model to generate publication content.
The data to be processed comprises: and (5) voice recognition and image-text recognition.
The essence of speech recognition is a pattern recognition based on speech feature parameters, i.e. through learning, the system can classify the input speech according to a certain pattern, and then find out the best matching result according to the decision criteria.
The input speech is first pre-processed, including framing, windowing, pre-emphasis, etc.
And then extracting the characteristics, and selecting characteristic parameters, including: pitch period, formants, short-time average energy or amplitude, linear Prediction Coefficients (LPC), perceptual weighting prediction coefficients (PLP), short-time average zero-crossing rate, linear Prediction Cepstrum Coefficients (LPCC), autocorrelation functions, mel cepstrum coefficients (MFCC), wavelet transform coefficients, empirical mode decomposition coefficients (EMD), gamma-pass filter coefficients (GFCC), and the like.
And finally, extracting the characteristics based on the selected characteristic parameters, generating a template for the test voice according to the training process, and finally, identifying according to a distortion judgment criterion. Common distortion decision criteria include euclidean distance, covariance matrix and bayesian distance.
The image-text recognition refers to character recognition through OCR software.
Through the above processing, the publication contents are obtained, and the content association is also required in the publication contents, because the voice recognition and the image-text recognition can only extract the text contents in the input data, and therefore, the text contents and the picture contents are also required to be associated.
Finally, combining the text content, the image content and the association of the text and the image into the publication content.
Referring to fig. 1, a generating module 302 is shown, which is configured to match a publication board according to the content, extract a keyword preset based on the board, and generate auxiliary content according to the keyword.
The publication board comprises typesetting, framing and other contents, and means that the typesetting and the device are generated according to the publication contents.
Specifically, the typesetting and framing are preset and stored universal templates, and related keywords are also arranged corresponding to the universal templates.
And when typesetting and frame loading are carried out, content statistics is required to be carried out on the content of the publications, sorting and screening of universal templates are carried out based on the content statistics results, and further processing is carried out on the screened results to obtain auxiliary content.
FIG. 2 is a schematic diagram of the sorting and screening of generic templates in the present application.
Referring to fig. 2, S201 first performs content keyword extraction on the content.
These content keywords may be extracted by pre-review extraction specifications, such as extracting only nouns, extracting only nouns after verbs, and so on.
And after the content keywords are extracted, sorting the keywords, for example, sorting the keywords according to the number of the keywords, or sorting the keywords based on the positions of the keywords. Preferably, the ranking of keywords based on location can be performed by using a scoring method:
setting a position weight, for example, evaluating paragraphs to obtain paragraph weights. The paragraph weights are as follows:
wherein the saidIs the score of the evaluation, a is the word count total score, B is the relationship total score, and C is the score. The number of the keywords is H, the number of the keywords is i, the number of the relationships is G, and the number of the relationships is +.>Is the total keyword number, said +.>Is the total number of relationships.
The values A, B and C are preset values greater than 1, and can also be values greater than 10. And then sorting based on the scores, including:
when sorting is performed, firstly, score comparison is performed, namely, the current sorting position is:
wherein j is a new sort sequence number.
Referring to fig. 2, S202 determines content keywords based on the ranking.
And determining the content keywords, namely selecting the first few digits in the reordered keyword sequence to obtain the final content keywords.
Referring to fig. 2, S203 performs ranking and screening of universal templates based on the content keywords.
Specifically, the keywords are associated with the universal templates to obtain keywords for matching, the matched universal templates are ranked in matching degree, and the universal template with the highest matching degree is selected.
Referring to fig. 2, S204 generates auxiliary content based on the universal template.
Comprising the following steps: an image is generated based on the one or more keywords, and a description is generated based on the one or more keywords.
Specifically, the addition of the content in the template format, such as noun addition, time, address and other information and various images, is performed based on the universal template. The determination may be performed by a worker according to actual situations, and will not be described in detail herein.
Please refer to the pre-sampling module 303 shown in fig. 1, which is configured to generate a publication pre-sample according to the publication content and the auxiliary content.
Specifically, based on the universal template, the publication content and the auxiliary content, a pre-sample of the publication is generated, including addition of all information of the publication, addition of an image according to an association relation between the publication content and the image, adaptation of the image according to the universal template, modification of a format and the like.
Specifically, the universal template is provided with different plates based on the content of the publication, and the different plates are added based on the content of the publication and the auxiliary content of the publication to obtain the final publication.
The pre-sampling is composed of one or more text files in a text format, and is ordered and stored based on a preset plate sequence of the universal template.
And finally outputting the pre-sample, manually adjusting and further normalizing to generate the pre-sample to be processed.
Referring to the publishing module 304 shown in fig. 1, the pre-sample is imaged, and a publication is generated after modification based on the input pattern keyword.
And imaging the pre-sample, namely converting the text file into an image file, and carrying out final finished product output of final decoration based on the image file.
Specifically, after the image file is output, the content thereof cannot be modified, so that the finished product needs to be classified first. Specifically, publications generated based on the universal templates can be divided into two broad categories, namely, modifiable portions and non-modifiable portions. The modifiable portion is a portion that is less associated with the content and the non-modifiable portion is a portion that is more associated. Specifically, when the selection is performed, the determination is performed according to the amount of the publication contents input in the universal template.
Based on the modifiable portion, image recognition is first performed to identify non-modifiable content, such as text, in the modifiable portion. Identifying and extracting the non-modifiable content and the modifiable content, and storing the non-modifiable content.
Extracting the modifiable content, and calculating the relevance of the modifiable content and the non-modifiable content, wherein the expression is as follows:
wherein l is the correlation used for comparison, x is the horizontal axis coordinate of the center point of the non-modifiable content, y is the vertical axis coordinate of the center point of the non-modifiable content,is the coordinates on a plurality of horizontal axes of modifiable content, said +.>Is the coordinates of points on the multi-and vertical axes of the modifiable content.
Setting a threshold value, and when the l is smaller than the threshold value, modifying the modifiable content by taking the non-modifiable content as a pattern keyword.
Specifically, the modifiable content can be scratched out, added into an image generation network as an initial image, input into the content keywords for modification and output, and the method comprises the steps of generating an image based on one or more keywords and generating a description according to the one or more keywords.
And finally, placing the output image to a home position, and placing the non-modifiable content to the home position.
Finally, the publication is obtained.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.