Asynchronous picture generation and analysis method and device

By performing image generation and query analysis asynchronously, and using LLM for query analysis, the problems of low efficiency and poor real-time performance of image generation and analysis methods in the prior art are solved, and more efficient and real-time image generation and analysis effects are achieved.

CN120163899APending Publication Date: 2025-06-17SHANGHAI 2345 NETWORK TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510161171.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the prior art, the image generation and analysis methods are inefficient and have poor real-time performance, making it difficult to meet the needs of large-scale automated testing.

Method used

Provides an asynchronous image generation and analysis method, by obtaining input field data, determine whether the analysis data is included, if not, image generation is performed, and if included, query analysis is performed. Image generation and query analysis are executed asynchronously, and query analysis is used to use LLM to form query analysis results.

Benefits of technology

It improves the efficiency of image generation and analysis, reduces operation steps, achieves higher real-time performance, and is suitable for large-scale automated testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120163899A_ABST
    Figure CN120163899A_ABST
Patent Text Reader

Abstract

The invention provides an asynchronous picture generation and analysis method and device. The problems that in the prior art, a picture generation and analysis method is low in efficiency and poor in real-time performance are solved. The method specifically comprises the following steps of S1, obtaining input field data; s2, if the field data does not comprise any one of the analysis data, the analysis data and the task-id, executing a step S3, otherwise, executing a step S4; s3, assembling picture features and request parameters according to the input field, and calling a picture generation interface to generate a picture according to the request parameters to form the picture; and S4, inputting the input field into the LLM, and performing query analysis through the LLM to form a query analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular, to an asynchronous image generation and analysis method and device. Background Art

[0002] With the rapid development of artificial intelligence technology, image generation and analysis technology has been widely applied in many fields, such as image processing, computer vision, virtual reality, augmented reality, etc. However, when testing the performance of the large language model (LLM) for image generation, traditional testing methods often rely on manual evaluation, which is inefficient and difficult to meet the needs of large-scale automated testing. In addition, during the testing process of LLM performance, it is usually necessary to process a large number of complex images, and the time cost of traditional testing methods is relatively large. Summary of the Invention

[0003] The present invention provides an asynchronous image generation and analysis method and device to solve the problems of low efficiency and poor real-time performance existing in the existing image generation and analysis methods.

[0004] In a first aspect, the present invention provides an asynchronous image generation and analysis method, which specifically includes the following steps:

[0005] Step S1, obtain input field data; wherein, the input field data includes a filter effect id (feature_id) and the number of times / quantity of generated images (count);

[0006] Step S2, if any one of analysis data, parsing data, and task identifier task-id is not included in the input field data, then execute step S3; otherwise, execute step S4;

[0007] Step S3, assemble image features and request parameters according to the input field data, and call an image generation interface according to the request parameters to generate an image, thereby forming an image;

[0008] Step S4, input the input field data into a large language model (LLM), and perform query analysis through the LLM to form a query analysis result.

[0009] Preferably, in step S3, the image generation interface includes but is not limited to the PICPOP interface.

[0010] Preferably, in step S3, if an exception occurs when assembling image features and request parameters according to the input field data to call the image generation result, then an exception prompt for the call is given; otherwise, a successful call prompt is given.

[0011] Preferably, step S3 and step S4 are executed asynchronously.

[0012] Preferably, in step S4, the input field data is input into the LLM, and query analysis is performed through the LLM to form a query analysis result, which specifically includes the following steps:

[0013] Step S401: Input the input field data into the LLM, query the image generation result through the LLM, and form a query result;

[0014] Step S402: If the query result is not empty, execute step S403; otherwise, the query result fails.

[0015] Step S403: Determine whether the query-result of the query result (in this application, query-result is used to determine whether a generation result is queried; if query-result is empty, it means that no generation result is queried; if query-result is not empty, it means that a generation result is queried) is empty. If the query-result of the query result is empty, no generation result is queried; otherwise, execute step S404;

[0016] Step S404: When the query-result of the query result is not empty, parse the query result, and obtain the generation result according to the parsed query result;

[0017] Step S405: Determine whether the cog_results of the generation result (in this application, cog_results is used to determine whether the generation result is empty; if cog_results is empty, the generation result is empty; if cog_results is not empty, the generation result is not empty) is empty. If the cog_results of the generation result is empty, display that the generation result is empty; otherwise, parse the generation result through AI.

[0018] Preferably, in step S405, parsing the generation result through AI specifically includes the following steps:

[0019] Step S405a: Obtain the AI parsing parameters and the generation result, and call the AI Agent to analyze the generation result to form an AI parsing result;

[0020] Step S404b: According to the AI parsing result, form an analysis result of the generation result.

[0021] In this application, the AI parsing parameters represent the parameters used to guide the AI model to parse the image.

[0022] Preferably, an asynchronous image generation and analysis method described in the present invention is implemented based on the Dify platform.

[0023] In a second aspect, the present invention also provides an asynchronous image generation and analysis device, which specifically includes the following modules:

[0024] An input field data acquisition module, configured to acquire input field data; wherein, the input field data includes a filter effect id (feature_id) and the number / count of generated images.

[0025] A first judgment module, communicatively connected to the input field data acquisition module, and configured to perform a branch operation when any one of analysis data, parsing data, and a task identifier task-id is included in the input field data:

[0026] If none of the analysis data, parsing data, and task identifier is included in the input field data, trigger the image generation module;

[0027] If at least one of the analysis data, parsing data, and task identifier is included in the input field data, trigger the query analysis module;

[0028] An image generation module, communicatively connected to the first judgment module, and configured to assemble image features and request parameters according to the input field data, and call an image generation interface according to the request parameters to generate an image, forming an image.

[0029] A query analysis module, communicatively connected to the first judgment module, and configured to input the input field data into an LLM, and perform query analysis through the LLM to form a query analysis result.

[0030] Preferably, in the image generation module, the image generation interface includes but is not limited to the PICPOP interface.

[0031] Preferably, in the image generation module, if an exception occurs when calling the image generation result by assembling the image features and request parameters according to the input field data, an exception prompt for the call is given; otherwise, a successful call prompt is given.

[0032] Preferably, the image generation module and the query analysis module are executed asynchronously.

[0033] Preferably, the query analysis module specifically includes the following sub-modules:

[0034] A first sub-module of query analysis, configured to input the input field data into an LLM, and query the image generation result through the LLM to form a query result;

[0035] The second sub-module of query analysis, which is communicatively connected to the first sub-module of query analysis, is used to execute the third sub-module of query analysis when the query result is not empty; otherwise, the query result fails.

[0036] The third sub-module of query analysis, which is communicatively connected to the second sub-module of query analysis, is used to determine whether the query-result of the query result is empty. If the query-result of the query result is empty, no generation result is queried; otherwise, the fourth sub-module of query analysis is executed.

[0037] The fourth sub-module of query analysis, which is communicatively connected to the third sub-module of query analysis, is used to parse the query result and obtain the generation result according to the parsed query result when the query-result of the query result is not empty.

[0038] The fifth sub-module of query analysis, which is communicatively connected to the fourth sub-module of query analysis, is used to determine whether the cog_results of the generation result is empty. If the cog_results of the generation result is empty, it is displayed that the generation result is empty; otherwise, the generation result is parsed by AI.

[0039] Preferably, the fifth sub-module of query analysis specifically includes the following grandson modules:

[0040] The first grandson module is used to obtain the AI parsing parameters and the generation result, and call the AI Agent to analyze the generation result to form an AI parsing result.

[0041] The second grandson module, which is communicatively connected to the first grandson module, is used to form an analysis result of the generation result according to the AI parsing result.

[0042] Preferably, the asynchronous image generation and analysis device described in the present invention is implemented based on the Dify platform.

[0043] In a third aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the asynchronous image generation and analysis method described in any one of the first aspects of the present application.

[0044] In a fourth aspect, the present invention also provides an electronic device. The electronic device includes: a memory storing a computer program; a processor communicatively connected to the memory and executing the asynchronous image generation and analysis method described in any one of the first aspects of the present application when calling the computer program.

[0045] Compared with the prior art, the present invention has the following obvious prominent substantial features and remarkable advantages:

[0046] The present invention provides a method and device for asynchronous image generation and analysis, which solves the problems of low efficiency and poor real-time performance in the existing image generation and analysis methods. By integrating image generation and image analysis, the cumbersome operation steps are reduced. In addition, this technical solution is implemented based on the Dify platform, which reduces the learning and development costs and is easy for non-developers or those with a weak technical foundation to quickly get started. At the same time, it is also more convenient to adjust to flexibly respond to business changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings that form a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0048] Figure 1 is a flowchart of a method for asynchronous image generation and analysis according to a preferred embodiment of the present invention.

[0049] Figure 2 is a schematic structural diagram of a device for asynchronous image generation and analysis according to a preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] The present invention provides a method and device for asynchronous image generation and analysis. To make the objectives, technical solutions, and effects of the present invention clearer and more definite, the following further elaborates on the present invention with reference to the accompanying drawings and by way of examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0052] Example 1:

[0053] As Figure 1 shown, a method for asynchronous image generation and analysis described in this embodiment specifically includes the following steps:

[0054] Step S1: Obtain input field data; wherein, the input field data includes a filter effect id (feature_id, which is used to match similar parameters, and the style of the feature_id is as follows: "12":{"style_name":"clay","caption":"Clay"}) and the number of times / quantity of generated pictures (count).

[0055] Step S2: If any one of the analysis data, parsing data, and task identifier task-id is not included in the input field data, then execute Step S3; otherwise, execute Step S4.

[0056] Step S3: Assemble picture features and request parameters according to the input field data, and call a picture generation interface (in this embodiment, the picture generation interface is the PICPOP interface) according to the request parameters to generate pictures, forming pictures.

[0057] Optionally, if an exception occurs in the picture generation result when assembling picture features and request parameters according to the input field data, then give a call exception prompt; otherwise, give a call success prompt.

[0058] Step S4: Input the input field data into the LLM, and perform query analysis through the LLM to form a query analysis result.

[0059] In this embodiment, Step S3 and Step S4 are executed asynchronously because a certain amount of time is required in the process of generating pictures through Step S3. At this time, the content described in Step S4 can be executed to save a certain amount of analysis time.

[0060] Optionally, in Step S4, inputting the input field data into the LLM and performing query analysis through the LLM to form a query analysis result specifically includes the following steps:

[0061] Step S401: Input the input field data into the LLM, and query the picture generation result through the LLM to form a query result.

[0062] Step S402: If the query result is not empty, then execute Step S403; otherwise, the query result fails.

[0063] Step S403: Determine whether the query-result of the query result is empty. If the query-result of the query result is empty, then no generation result is queried; otherwise, execute Step S404.

[0064] Step S404: If the query-result of the query result is not empty, parse the query result and obtain a generation result based on the parsed query result.

[0065] Step S405: Determine whether the cog_results of the generation result is empty. If the cog_results of the generation result is empty, display that the generation result is empty; otherwise, parse the generation result through AI.

[0066] Optionally, in step S405, parsing the generation result through AI specifically includes the following steps:

[0067] Step S405a: Obtain AI parsing parameters and the generation result, and call the AI Agent to analyze the generation result to form an AI parsing result.

[0068] Among them, the examples of the AI parsing parameters are as follows:

[0069] {

[0070] "ai_parse_params": json.dumps({

[0071] "img": item["result_files"],

[0072] "question": 'Please act as an expert in image content analysis. According to the following expected criteria: “'+ item["require"] +'”, analyze the image content. Carefully observe the image, identify key information such as the theme, elements, style, etc., and conduct a detailed comparative analysis of the image content with the expected criteria. If the image content meets the expected criteria, reply “Meets requirements”; if not, please elaborate on the reasons for non-compliance, including specific non-compliant elements, style, or other aspects. The analysis process should be objective, accurate, based on clear expected criteria, and avoid subjective assumptions. The output format should be structured text, including a description of the image content, a comparative analysis with the expected criteria, conclusions, and suggestions.',

[0073] "is_public": false

[0074] })

[0075] }

[0076] Through the above AI parsing parameters, it is used to guide the LLM to further analyze the generated image.

[0077] Step S404b: Based on the AI parsing result, form an analysis result of the generation result.

[0078] Example 2:

[0079] As Figure 2 shown, an asynchronous image generation and analysis device described in this embodiment specifically includes an input field data module, a first field module, an image generation module, and a query analysis module; wherein, the first judgment module is communicatively connected to the input field data acquisition module, the image generation module is communicatively connected to the first judgment module, and the query analysis module is communicatively connected to the first judgment module.

[0080] The input field data acquisition module is used to acquire input field data; wherein, the input field data includes a filter effect id (feature_id) and the number / count of generated images.

[0081] The first judgment module is used to perform a branch operation when any one of analysis data, parsing data, and a task identifier task-id is included in the input field data:

[0082] If none of the analysis data, parsing data, and task identifier are included in the input field data, trigger the image generation module; if at least one of the analysis data, parsing data, or task identifier is included in the input field data, trigger the query analysis module.

[0083] The image generation module is used to assemble image features and request parameters according to the input field data, and call an image generation interface according to the request parameters to generate an image, forming an image; wherein, in this embodiment, the image generation interface selects the PICPOP interface.

[0084] Among them, if an exception occurs in the image generation result when assembling the image features and request parameters according to the input field data, an invocation exception prompt is given; otherwise, an invocation success prompt is given.

[0085] The query analysis module is used to input the input field data into the LLM, and perform query analysis through the LLM to form a query analysis result.

[0086] In this embodiment, in order to further improve the efficiency of image generation and analysis, the image generation module and the query analysis module are executed asynchronously.

[0087] Among them, the query analysis module specifically includes a query analysis first sub-module, a query analysis second sub-module, a query analysis third sub-module, a query analysis fourth sub-module, and a query analysis fifth sub-module. Among them, the query analysis second sub-module is communicatively connected to the query analysis first sub-module, the query analysis third sub-module is communicatively connected to the query analysis second sub-module, the query analysis fourth sub-module is communicatively connected to the query analysis third sub-module, and the query analysis fifth sub-module is communicatively connected to the query analysis fourth sub-module.

[0088] The query analysis first sub-module is used to input the input field data into the LLM, query the image generation result through the LLM, and form a query result.

[0089] The query analysis second sub-module is used to execute the query analysis third sub-module when the query result is not empty; otherwise, the query result fails.

[0090] The query analysis third sub-module is used to determine whether the query-result of the query result is empty. If the query-result of the query result is empty, no generation result is queried; otherwise, the query analysis fourth sub-module is executed.

[0091] The query analysis fourth sub-module is used to parse the query result and obtain the generation result according to the parsed query result when the query-result of the query result is not empty.

[0092] The query analysis fifth sub-module is used to determine whether the cog_results of the generation result is empty. If the cog_results of the generation result is empty, it is displayed that the generation result is empty; otherwise, the generation result is parsed by AI.

[0093] Among them, the query analysis fifth sub-module specifically includes the following first grandchild module and second grandchild module.

[0094] The first grandchild module is used to obtain the AI parsing parameters and the generation result, and call the AI Agent to analyze the generation result to form an AI parsing result.

[0095] The second grandchild module, which is communicatively connected to the first grandchild module, is used to form an analysis result of the generation result according to the AI parsing result.

[0096] The specific embodiments of the present invention have been described in detail above, but they are only examples, and the present invention is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions to the present invention are also within the scope of the present invention. Therefore, all equivalent transformations and modifications made without departing from the spirit and scope of the present invention should be covered within the scope of the present invention.

Claims

1. An asynchronous image generation and analysis method, characterized in that: The specific steps include: Step S1, obtaining input field data; Step S2: if the field data does not include any of the analysis data, parsed data and task identifier task-id, then execute step S3; otherwise, execute step S4; Step S3, assembling picture features and request parameters according to the input field data, and calling a picture generation interface according to the request parameters to generate a picture to form a picture; Step S4: input the input field data into the LLM, perform query analysis through the LLM, and form a query analysis result.

2. The asynchronous image generation and analysis method according to claim 1, characterized in that: In step S3, the picture generation interface includes but is not limited to a PICPOP interface.

3. The asynchronous image generation and analysis method according to claim 1, characterized in that: In step S3, if the result of calling the image generation by assembling the image features and request parameters according to the input field data is abnormal, a call abnormality prompt is given; otherwise, a call success prompt is given.

4. The asynchronous image generation and analysis method according to claim 1, characterized in that: Step S3 and step S4 are performed asynchronously.

5. The asynchronous image generation and analysis method according to claim 1, characterized in that: In step S4, the input field data is input into the LLM, and query analysis is performed by the LLM to form a query analysis result, which specifically includes the following steps: Step S401, input the input field data into the LLM, query the picture through the LLM to generate a result, and form a query result; Step S402: If the query result is not empty, then execute step S403; otherwise, the query result fails; Step S403, determining whether the query-result of the query result is empty. If the query-result of the query result is empty, no generated result is found. Otherwise, executing step S404; Step S404: if the query-result of the query result is not empty, parse the query result, and obtain a generated result according to the parsed query result; Step S405, determining whether the cog_results of the generated result is empty. If the cog_results of the generated result is empty, displaying that the generated result is empty. Otherwise, parsing the generated result through AI.

6. The asynchronous image generation and analysis method according to claim 5, characterized in that: In step S405, the generated result is analyzed by AI, which specifically includes the following steps: Step S405a, obtaining AI analysis parameters and generation results, calling AI Agent to analyze the generation results, and forming AI analysis results; Step S404b: forming an analysis result of the generated result according to the AI ​​analysis result.

7. The asynchronous image generation and analysis method according to claim 1, characterized in that: This method is implemented based on the Dify platform.

8. An asynchronous image generation and analysis device, characterized in that: The modules include: An input field data acquisition module is used to acquire input field data; The first judgment module is connected to the input field data acquisition module for executing a branch operation according to whether the field data includes any one of analysis data, parsed data and task identifier task-id: If the field data does not contain any of the analysis data, parsed data and task identifier, triggering the image generation module; If the field data contains at least one of analysis data, parsed data or a task identifier, triggering a query analysis module; A picture generation module, which is in communication with the first judgment module and is used to assemble picture features and request parameters according to the input field data, and call a picture generation interface according to the request parameters to generate a picture to form a picture; The query analysis module is connected to the first judgment module for inputting the input field data into the LLM, performing query analysis through the LLM, and forming a query analysis result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the asynchronous image generation and analysis method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, an asynchronous image generation and analysis method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Asynchronous picture generation and analysis method and asynchronous picture generation and analysis apparatus

    WO2026170803A1