Search

CN-121979919-A - Content generation method and device based on diffusion model, electronic equipment and medium

CN121979919ACN 121979919 ACN121979919 ACN 121979919ACN-121979919-A

Abstract

Responding to target prompt information input by a user, and carrying out structural analysis on the target prompt information to obtain an analysis result; the method comprises the steps of obtaining a prompt vector of the analysis result, determining target key value information corresponding to target prompt information based on the prompt vector, searching intermediate features matched with the calculation result in a feature cache space, determining multiplexing features based on the intermediate features, and generating multimedia content according to the multiplexing features. The present disclosure can accelerate the rate of content generation by multiplexing intermediate features by acquiring the intermediate features from the feature cache space.

Inventors

  • Request for anonymity

Assignees

  • 北京电子数智科技有限责任公司

Dates

Publication Date
20260505
Application Date
20260107

Claims (10)

  1. 1. A content generation method based on a diffusion model, the method comprising: Responding to target prompt information input by a user, and carrying out structural analysis on the target prompt information to obtain an analysis result; acquiring a prompt vector of the analysis result, and determining target key value information corresponding to the target prompt information based on the prompt vector, wherein the target key value information comprises a plurality of calculation results; Searching intermediate features matched with the calculation result in a feature cache space; And determining multiplexing characteristics based on the intermediate characteristics, and generating multimedia content according to the multiplexing characteristics.
  2. 2. The method of claim 1, wherein the feature cache space comprises a plurality of candidate features, the looking up in the feature cache space intermediate features that match the calculation result comprising: Obtaining the similarity between the calculation result and the candidate feature; if the similarity is larger than a preset similarity, determining that the candidate feature is matched with the calculation result, and taking the candidate feature as the intermediate feature; determining a multiplexing feature based on the intermediate feature, comprising: and obtaining the number of the jumping steps, and determining the multiplexing characteristic according to the number of the jumping steps and the intermediate characteristic.
  3. 3. The method of claim 2, wherein the obtaining the number of hops and determining the multiplexing feature based on the number of hops and the intermediate feature comprises: Determining a similarity level corresponding to the similarity; Acquiring the jump number according to the similarity level, wherein the similarity level is positively correlated with the jump number; skipping calculation of a target feature between the intermediate feature and the number of hops, and taking the target feature in the feature cache space as the multiplexing feature.
  4. 4. The method of claim 1, wherein the obtaining the hint vector of the parsing result comprises: Searching a block matched with the analysis result in a text cache space, and taking a vector corresponding to the block as a prompt vector of the analysis result.
  5. 5. The method of claim 1, wherein the determining key-value information corresponding to the target hint information based on the hint vector comprises: Determining a target hint vector according to a plurality of hint vectors; And if the vector matched with the target prompt vector exists in the key value cache space, the key value information of the vector is used as the key value information corresponding to the target prompt information.
  6. 6. The method of any one of claims 1 to 5, wherein the parsing result includes at least one of a subject word block, a style word block, a parameter word block, and a negative word block.
  7. 7. A content generation apparatus based on a diffusion model, the apparatus comprising: The analysis module is configured to respond to target prompt information input by a user, and perform structural analysis on the target prompt information to obtain an analysis result; the determining module is configured to acquire a prompt vector of the analysis result, determine key value information corresponding to the target prompt information based on the prompt vector, and the target key value information comprises a plurality of calculation results; the searching module is configured to search the intermediate features matched with the calculation result in the feature cache space; And the generation module is configured to determine a multiplexing characteristic based on the intermediate characteristic and generate multimedia content according to the multiplexing characteristic.
  8. 8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-6.
  9. 9. An electronic device, comprising: a memory having a computer program stored thereon; A processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method according to any of claims 1-6.

Description

Content generation method and device based on diffusion model, electronic equipment and medium Technical Field The disclosure relates to the technical field of artificial intelligence, in particular to a content generation method, a device, electronic equipment and a medium based on a diffusion model. Background With the development of artificial intelligence technology, diffusion Model (Diffusion Model) is widely applied to products and platforms such as image generation, video generation, design content creation and multimedia generation, however, the Diffusion Model has the problems of low efficiency, large time delay and the like when generating multimedia content such as video or image. Therefore, how to more efficiently use the diffusion model to generate the content meeting the user's needs is a technical problem to be solved. Disclosure of Invention In order to overcome the problems in the related art, the present disclosure provides a content generation method, apparatus, electronic device, and medium based on a diffusion model. In a first aspect, the present disclosure provides a content generation method based on a diffusion model, the method comprising: Responding to target prompt information input by a user, and carrying out structural analysis on the target prompt information to obtain an analysis result; acquiring a prompt vector of the analysis result, and determining target key value information corresponding to the target prompt information based on the prompt vector, wherein the target key value information comprises a plurality of calculation results; Searching intermediate features matched with the calculation result in a feature cache space; And determining multiplexing characteristics based on the intermediate characteristics, and generating multimedia content according to the multiplexing characteristics. Optionally, the feature cache space includes a plurality of candidate features, and the searching the feature cache space for the intermediate feature matched with the calculation result includes: Obtaining the similarity between the calculation result and the candidate feature; if the similarity is larger than a preset similarity, determining that the candidate feature is matched with the calculation result, and taking the candidate feature as the intermediate feature; determining a multiplexing feature based on the intermediate feature, comprising: and obtaining the number of the jumping steps, and determining the multiplexing characteristic according to the number of the jumping steps and the intermediate characteristic. Optionally, the acquiring the number of hops and determining the multiplexing feature according to the number of hops and the intermediate feature includes: Determining a similarity level corresponding to the similarity; Acquiring the jump number according to the similarity level, wherein the similarity level is positively correlated with the jump number; skipping calculation of a target feature between the intermediate feature and the number of hops, and taking the target feature in the feature cache space as the multiplexing feature. Optionally, the obtaining the hint vector of the analysis result includes: Searching a block matched with the analysis result in a text cache space, and taking a vector corresponding to the block as a prompt vector of the analysis result. Optionally, the determining, based on the hint vector, key value information corresponding to the target hint information includes: Determining a target hint vector according to a plurality of hint vectors; And if the vector matched with the target prompt vector exists in the key value cache space, the key value information of the vector is used as the key value information corresponding to the target prompt information. Optionally, the parsing result includes at least one of a subject word block, a style word block, a parameter word block, and a negative word block. In a second aspect, the present disclosure provides a content generation apparatus based on a diffusion model, the apparatus comprising: The analysis module is configured to respond to target prompt information input by a user, and perform structural analysis on the target prompt information to obtain an analysis result; the determining module is configured to acquire a prompt vector of the analysis result, determine key value information corresponding to the target prompt information based on the prompt vector, and the target key value information comprises a plurality of calculation results; the searching module is configured to search the intermediate features matched with the calculation result in the feature cache space; And the generation module is configured to determine a multiplexing characteristic based on the intermediate characteristic and generate multimedia content according to the multiplexing characteristic. In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer p